generated-configure.sh revision 1652:b545f7d7cf6d
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
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826COOKED_BUILD_NUMBER
827JDK_VERSION
828COPYRIGHT_YEAR
829MACOSX_BUNDLE_ID_BASE
830MACOSX_BUNDLE_NAME_BASE
831COMPANY_NAME
832JDK_RC_PLATFORM_NAME
833PRODUCT_SUFFIX
834PRODUCT_NAME
835LAUNCHER_NAME
836MILESTONE
837JDK_BUILD_NUMBER
838JDK_UPDATE_VERSION
839JDK_MICRO_VERSION
840JDK_MINOR_VERSION
841JDK_MAJOR_VERSION
842USER_RELEASE_SUFFIX
843COMPRESS_JARS
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856BASH_ARGS
857SETFILE
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862PATCH
863TIME
864STAT
865HG
866READELF
867OTOOL
868LDD
869ZIP
870UNZIP
871FIND_DELETE
872OUTPUT_SYNC
873OUTPUT_SYNC_SUPPORTED
874MAKE
875CHECK_TOOLSDIR_MAKE
876CHECK_TOOLSDIR_GMAKE
877CHECK_MAKE
878CHECK_GMAKE
879PKGHANDLER
880CONFIGURESUPPORT_OUTPUTDIR
881OUTPUT_ROOT
882CONF_NAME
883SPEC
884SDKROOT
885XCODEBUILD
886BUILD_VARIANT_RELEASE
887DEBUG_CLASSFILES
888FASTDEBUG
889VARIANT
890DEBUG_LEVEL
891MACOSX_UNIVERSAL
892INCLUDE_SA
893JVM_VARIANT_CORE
894JVM_VARIANT_ZEROSHARK
895JVM_VARIANT_ZERO
896JVM_VARIANT_KERNEL
897JVM_VARIANT_MINIMAL1
898JVM_VARIANT_CLIENT
899JVM_VARIANT_SERVER
900JVM_VARIANTS
901JVM_INTERPRETER
902JDK_VARIANT
903SET_OPENJDK
904CANONICAL_TOPDIR
905ORIGINAL_TOPDIR
906TOPDIR
907PATH_SEP
908ZERO_ARCHDEF
909DEFINE_CROSS_COMPILE_ARCH
910LP64
911OPENJDK_TARGET_OS_EXPORT_DIR
912OPENJDK_TARGET_CPU_JLI_CFLAGS
913OPENJDK_TARGET_CPU_OSARCH
914OPENJDK_TARGET_CPU_ISADIR
915OPENJDK_TARGET_CPU_LIBDIR
916OPENJDK_TARGET_CPU_LEGACY_LIB
917OPENJDK_TARGET_CPU_LEGACY
918REQUIRED_OS_VERSION
919REQUIRED_OS_NAME
920COMPILE_TYPE
921OPENJDK_TARGET_CPU_ENDIAN
922OPENJDK_TARGET_CPU_BITS
923OPENJDK_TARGET_CPU_ARCH
924OPENJDK_TARGET_CPU
925OPENJDK_TARGET_OS_ENV
926OPENJDK_TARGET_OS_TYPE
927OPENJDK_TARGET_OS
928OPENJDK_BUILD_CPU_ENDIAN
929OPENJDK_BUILD_CPU_BITS
930OPENJDK_BUILD_CPU_ARCH
931OPENJDK_BUILD_CPU
932OPENJDK_BUILD_OS_ENV
933OPENJDK_BUILD_OS_TYPE
934OPENJDK_BUILD_OS
935OPENJDK_BUILD_AUTOCONF_NAME
936OPENJDK_TARGET_AUTOCONF_NAME
937target_os
938target_vendor
939target_cpu
940target
941host_os
942host_vendor
943host_cpu
944host
945build_os
946build_vendor
947build_cpu
948build
949CPIO
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RM
971PRINTF
972NAWK
973MV
974MKTEMP
975MKDIR
976LS
977LN
978HEAD
979FIND
980FILE
981EXPR
982ECHO
983DIRNAME
984DIFF
985DATE
986CUT
987CP
988COMM
989CMP
990CHMOD
991CAT
992BASH
993BASENAME
994DATE_WHEN_CONFIGURED
995ORIGINAL_PATH
996CONFIGURE_COMMAND_LINE
997target_alias
998host_alias
999build_alias
1000LIBS
1001ECHO_T
1002ECHO_N
1003ECHO_C
1004DEFS
1005mandir
1006localedir
1007libdir
1008psdir
1009pdfdir
1010dvidir
1011htmldir
1012infodir
1013docdir
1014oldincludedir
1015includedir
1016localstatedir
1017sharedstatedir
1018sysconfdir
1019datadir
1020datarootdir
1021libexecdir
1022sbindir
1023bindir
1024program_transform_name
1025prefix
1026exec_prefix
1027PACKAGE_URL
1028PACKAGE_BUGREPORT
1029PACKAGE_STRING
1030PACKAGE_VERSION
1031PACKAGE_TARNAME
1032PACKAGE_NAME
1033PATH_SEPARATOR
1034SHELL'
1035ac_subst_files=''
1036ac_user_opts='
1037enable_option_checking
1038with_target_bits
1039enable_openjdk_only
1040with_custom_make_dir
1041with_jdk_variant
1042with_jvm_interpreter
1043with_jvm_variants
1044enable_debug
1045with_debug_level
1046with_devkit
1047with_sys_root
1048with_sysroot
1049with_tools_dir
1050with_toolchain_path
1051with_extra_path
1052with_sdk_name
1053with_conf_name
1054with_output_sync
1055with_builddeps_conf
1056with_builddeps_server
1057with_builddeps_dir
1058with_builddeps_group
1059enable_headful
1060enable_hotspot_test_in_build
1061with_cacerts_file
1062enable_unlimited_crypto
1063with_milestone
1064with_update_version
1065with_user_release_suffix
1066with_build_number
1067with_copyright_year
1068with_boot_jdk
1069with_add_source_root
1070with_override_source_root
1071with_adds_and_overrides
1072with_override_langtools
1073with_override_corba
1074with_override_jaxp
1075with_override_jaxws
1076with_override_hotspot
1077with_override_nashorn
1078with_override_jdk
1079with_import_hotspot
1080with_toolchain_type
1081with_toolchain_version
1082with_jtreg
1083with_extra_cflags
1084with_extra_cxxflags
1085with_extra_ldflags
1086enable_warnings_as_errors
1087enable_debug_symbols
1088enable_zip_debug_info
1089enable_native_coverage
1090with_x
1091with_cups
1092with_cups_include
1093with_freetype
1094with_freetype_include
1095with_freetype_lib
1096with_freetype_src
1097enable_freetype_bundling
1098with_alsa
1099with_alsa_include
1100with_alsa_lib
1101with_libjpeg
1102with_giflib
1103with_lcms
1104with_libpng
1105with_zlib
1106with_stdc__lib
1107with_msvcr_dll
1108with_msvcp_dll
1109with_dxsdk
1110with_dxsdk_lib
1111with_dxsdk_include
1112with_num_cores
1113with_memory_size
1114with_jobs
1115with_boot_jdk_jvmargs
1116with_sjavac_server_java
1117enable_sjavac
1118enable_precompiled_headers
1119enable_ccache
1120with_ccache_dir
1121'
1122      ac_precious_vars='build_alias
1123host_alias
1124target_alias
1125BASENAME
1126BASH
1127CAT
1128CHMOD
1129CMP
1130COMM
1131CP
1132CUT
1133DATE
1134DIFF
1135DIRNAME
1136ECHO
1137EXPR
1138FILE
1139FIND
1140HEAD
1141LN
1142LS
1143MKDIR
1144MKTEMP
1145MV
1146NAWK
1147PRINTF
1148RM
1149SH
1150SORT
1151TAIL
1152TAR
1153TEE
1154TOUCH
1155TR
1156UNAME
1157UNIQ
1158WC
1159WHICH
1160XARGS
1161AWK
1162GREP
1163EGREP
1164FGREP
1165SED
1166CYGPATH
1167READLINK
1168DF
1169CPIO
1170UNZIP
1171ZIP
1172LDD
1173OTOOL
1174READELF
1175HG
1176STAT
1177TIME
1178PATCH
1179DSYMUTIL
1180XATTR
1181CODESIGN
1182SETFILE
1183PKG_CONFIG
1184JAVA
1185JAVAC
1186JAVAH
1187JAR
1188JARSIGNER
1189CC
1190CFLAGS
1191LDFLAGS
1192LIBS
1193CPPFLAGS
1194CXX
1195CXXFLAGS
1196CCC
1197CPP
1198CXXCPP
1199AS
1200AR
1201LIPO
1202STRIP
1203NM
1204GNM
1205OBJCOPY
1206OBJDUMP
1207BUILD_CC
1208BUILD_CXX
1209BUILD_LD
1210JTREGEXE
1211XMKMF
1212FREETYPE_CFLAGS
1213FREETYPE_LIBS
1214ALSA_CFLAGS
1215ALSA_LIBS
1216LCMS_CFLAGS
1217LCMS_LIBS
1218PNG_CFLAGS
1219PNG_LIBS
1220LIBFFI_CFLAGS
1221LIBFFI_LIBS
1222CCACHE'
1223
1224
1225# Initialize some variables set by options.
1226ac_init_help=
1227ac_init_version=false
1228ac_unrecognized_opts=
1229ac_unrecognized_sep=
1230# The variables have the same names as the options, with
1231# dashes changed to underlines.
1232cache_file=/dev/null
1233exec_prefix=NONE
1234no_create=
1235no_recursion=
1236prefix=NONE
1237program_prefix=NONE
1238program_suffix=NONE
1239program_transform_name=s,x,x,
1240silent=
1241site=
1242srcdir=
1243verbose=
1244x_includes=NONE
1245x_libraries=NONE
1246
1247# Installation directory options.
1248# These are left unexpanded so users can "make install exec_prefix=/foo"
1249# and all the variables that are supposed to be based on exec_prefix
1250# by default will actually change.
1251# Use braces instead of parens because sh, perl, etc. also accept them.
1252# (The list follows the same order as the GNU Coding Standards.)
1253bindir='${exec_prefix}/bin'
1254sbindir='${exec_prefix}/sbin'
1255libexecdir='${exec_prefix}/libexec'
1256datarootdir='${prefix}/share'
1257datadir='${datarootdir}'
1258sysconfdir='${prefix}/etc'
1259sharedstatedir='${prefix}/com'
1260localstatedir='${prefix}/var'
1261includedir='${prefix}/include'
1262oldincludedir='/usr/include'
1263docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1264infodir='${datarootdir}/info'
1265htmldir='${docdir}'
1266dvidir='${docdir}'
1267pdfdir='${docdir}'
1268psdir='${docdir}'
1269libdir='${exec_prefix}/lib'
1270localedir='${datarootdir}/locale'
1271mandir='${datarootdir}/man'
1272
1273ac_prev=
1274ac_dashdash=
1275for ac_option
1276do
1277  # If the previous option needs an argument, assign it.
1278  if test -n "$ac_prev"; then
1279    eval $ac_prev=\$ac_option
1280    ac_prev=
1281    continue
1282  fi
1283
1284  case $ac_option in
1285  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1286  *=)   ac_optarg= ;;
1287  *)    ac_optarg=yes ;;
1288  esac
1289
1290  # Accept the important Cygnus configure options, so we can diagnose typos.
1291
1292  case $ac_dashdash$ac_option in
1293  --)
1294    ac_dashdash=yes ;;
1295
1296  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1297    ac_prev=bindir ;;
1298  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1299    bindir=$ac_optarg ;;
1300
1301  -build | --build | --buil | --bui | --bu)
1302    ac_prev=build_alias ;;
1303  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1304    build_alias=$ac_optarg ;;
1305
1306  -cache-file | --cache-file | --cache-fil | --cache-fi \
1307  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1308    ac_prev=cache_file ;;
1309  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1310  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1311    cache_file=$ac_optarg ;;
1312
1313  --config-cache | -C)
1314    cache_file=config.cache ;;
1315
1316  -datadir | --datadir | --datadi | --datad)
1317    ac_prev=datadir ;;
1318  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1319    datadir=$ac_optarg ;;
1320
1321  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1322  | --dataroo | --dataro | --datar)
1323    ac_prev=datarootdir ;;
1324  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1325  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1326    datarootdir=$ac_optarg ;;
1327
1328  -disable-* | --disable-*)
1329    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1330    # Reject names that are not valid shell variable names.
1331    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332      as_fn_error $? "invalid feature name: $ac_useropt"
1333    ac_useropt_orig=$ac_useropt
1334    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335    case $ac_user_opts in
1336      *"
1337"enable_$ac_useropt"
1338"*) ;;
1339      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1340	 ac_unrecognized_sep=', ';;
1341    esac
1342    eval enable_$ac_useropt=no ;;
1343
1344  -docdir | --docdir | --docdi | --doc | --do)
1345    ac_prev=docdir ;;
1346  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1347    docdir=$ac_optarg ;;
1348
1349  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1350    ac_prev=dvidir ;;
1351  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1352    dvidir=$ac_optarg ;;
1353
1354  -enable-* | --enable-*)
1355    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1356    # Reject names that are not valid shell variable names.
1357    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1358      as_fn_error $? "invalid feature name: $ac_useropt"
1359    ac_useropt_orig=$ac_useropt
1360    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1361    case $ac_user_opts in
1362      *"
1363"enable_$ac_useropt"
1364"*) ;;
1365      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1366	 ac_unrecognized_sep=', ';;
1367    esac
1368    eval enable_$ac_useropt=\$ac_optarg ;;
1369
1370  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1371  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1372  | --exec | --exe | --ex)
1373    ac_prev=exec_prefix ;;
1374  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1375  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1376  | --exec=* | --exe=* | --ex=*)
1377    exec_prefix=$ac_optarg ;;
1378
1379  -gas | --gas | --ga | --g)
1380    # Obsolete; use --with-gas.
1381    with_gas=yes ;;
1382
1383  -help | --help | --hel | --he | -h)
1384    ac_init_help=long ;;
1385  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1386    ac_init_help=recursive ;;
1387  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1388    ac_init_help=short ;;
1389
1390  -host | --host | --hos | --ho)
1391    ac_prev=host_alias ;;
1392  -host=* | --host=* | --hos=* | --ho=*)
1393    host_alias=$ac_optarg ;;
1394
1395  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1396    ac_prev=htmldir ;;
1397  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1398  | --ht=*)
1399    htmldir=$ac_optarg ;;
1400
1401  -includedir | --includedir | --includedi | --included | --include \
1402  | --includ | --inclu | --incl | --inc)
1403    ac_prev=includedir ;;
1404  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1405  | --includ=* | --inclu=* | --incl=* | --inc=*)
1406    includedir=$ac_optarg ;;
1407
1408  -infodir | --infodir | --infodi | --infod | --info | --inf)
1409    ac_prev=infodir ;;
1410  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1411    infodir=$ac_optarg ;;
1412
1413  -libdir | --libdir | --libdi | --libd)
1414    ac_prev=libdir ;;
1415  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1416    libdir=$ac_optarg ;;
1417
1418  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1419  | --libexe | --libex | --libe)
1420    ac_prev=libexecdir ;;
1421  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1422  | --libexe=* | --libex=* | --libe=*)
1423    libexecdir=$ac_optarg ;;
1424
1425  -localedir | --localedir | --localedi | --localed | --locale)
1426    ac_prev=localedir ;;
1427  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1428    localedir=$ac_optarg ;;
1429
1430  -localstatedir | --localstatedir | --localstatedi | --localstated \
1431  | --localstate | --localstat | --localsta | --localst | --locals)
1432    ac_prev=localstatedir ;;
1433  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1434  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1435    localstatedir=$ac_optarg ;;
1436
1437  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1438    ac_prev=mandir ;;
1439  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1440    mandir=$ac_optarg ;;
1441
1442  -nfp | --nfp | --nf)
1443    # Obsolete; use --without-fp.
1444    with_fp=no ;;
1445
1446  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1447  | --no-cr | --no-c | -n)
1448    no_create=yes ;;
1449
1450  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1451  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1452    no_recursion=yes ;;
1453
1454  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1455  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1456  | --oldin | --oldi | --old | --ol | --o)
1457    ac_prev=oldincludedir ;;
1458  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1459  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1460  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1461    oldincludedir=$ac_optarg ;;
1462
1463  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1464    ac_prev=prefix ;;
1465  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1466    prefix=$ac_optarg ;;
1467
1468  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1469  | --program-pre | --program-pr | --program-p)
1470    ac_prev=program_prefix ;;
1471  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1472  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1473    program_prefix=$ac_optarg ;;
1474
1475  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1476  | --program-suf | --program-su | --program-s)
1477    ac_prev=program_suffix ;;
1478  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1479  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1480    program_suffix=$ac_optarg ;;
1481
1482  -program-transform-name | --program-transform-name \
1483  | --program-transform-nam | --program-transform-na \
1484  | --program-transform-n | --program-transform- \
1485  | --program-transform | --program-transfor \
1486  | --program-transfo | --program-transf \
1487  | --program-trans | --program-tran \
1488  | --progr-tra | --program-tr | --program-t)
1489    ac_prev=program_transform_name ;;
1490  -program-transform-name=* | --program-transform-name=* \
1491  | --program-transform-nam=* | --program-transform-na=* \
1492  | --program-transform-n=* | --program-transform-=* \
1493  | --program-transform=* | --program-transfor=* \
1494  | --program-transfo=* | --program-transf=* \
1495  | --program-trans=* | --program-tran=* \
1496  | --progr-tra=* | --program-tr=* | --program-t=*)
1497    program_transform_name=$ac_optarg ;;
1498
1499  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1500    ac_prev=pdfdir ;;
1501  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1502    pdfdir=$ac_optarg ;;
1503
1504  -psdir | --psdir | --psdi | --psd | --ps)
1505    ac_prev=psdir ;;
1506  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1507    psdir=$ac_optarg ;;
1508
1509  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510  | -silent | --silent | --silen | --sile | --sil)
1511    silent=yes ;;
1512
1513  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1514    ac_prev=sbindir ;;
1515  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1516  | --sbi=* | --sb=*)
1517    sbindir=$ac_optarg ;;
1518
1519  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1520  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1521  | --sharedst | --shareds | --shared | --share | --shar \
1522  | --sha | --sh)
1523    ac_prev=sharedstatedir ;;
1524  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1525  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1526  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1527  | --sha=* | --sh=*)
1528    sharedstatedir=$ac_optarg ;;
1529
1530  -site | --site | --sit)
1531    ac_prev=site ;;
1532  -site=* | --site=* | --sit=*)
1533    site=$ac_optarg ;;
1534
1535  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1536    ac_prev=srcdir ;;
1537  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1538    srcdir=$ac_optarg ;;
1539
1540  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1541  | --syscon | --sysco | --sysc | --sys | --sy)
1542    ac_prev=sysconfdir ;;
1543  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1544  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1545    sysconfdir=$ac_optarg ;;
1546
1547  -target | --target | --targe | --targ | --tar | --ta | --t)
1548    ac_prev=target_alias ;;
1549  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1550    target_alias=$ac_optarg ;;
1551
1552  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1553    verbose=yes ;;
1554
1555  -version | --version | --versio | --versi | --vers | -V)
1556    ac_init_version=: ;;
1557
1558  -with-* | --with-*)
1559    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1560    # Reject names that are not valid shell variable names.
1561    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1562      as_fn_error $? "invalid package name: $ac_useropt"
1563    ac_useropt_orig=$ac_useropt
1564    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1565    case $ac_user_opts in
1566      *"
1567"with_$ac_useropt"
1568"*) ;;
1569      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1570	 ac_unrecognized_sep=', ';;
1571    esac
1572    eval with_$ac_useropt=\$ac_optarg ;;
1573
1574  -without-* | --without-*)
1575    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1576    # Reject names that are not valid shell variable names.
1577    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1578      as_fn_error $? "invalid package name: $ac_useropt"
1579    ac_useropt_orig=$ac_useropt
1580    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1581    case $ac_user_opts in
1582      *"
1583"with_$ac_useropt"
1584"*) ;;
1585      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1586	 ac_unrecognized_sep=', ';;
1587    esac
1588    eval with_$ac_useropt=no ;;
1589
1590  --x)
1591    # Obsolete; use --with-x.
1592    with_x=yes ;;
1593
1594  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1595  | --x-incl | --x-inc | --x-in | --x-i)
1596    ac_prev=x_includes ;;
1597  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1598  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1599    x_includes=$ac_optarg ;;
1600
1601  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1602  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1603    ac_prev=x_libraries ;;
1604  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1605  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1606    x_libraries=$ac_optarg ;;
1607
1608  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1609Try \`$0 --help' for more information"
1610    ;;
1611
1612  *=*)
1613    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1614    # Reject names that are not valid shell variable names.
1615    case $ac_envvar in #(
1616      '' | [0-9]* | *[!_$as_cr_alnum]* )
1617      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1618    esac
1619    eval $ac_envvar=\$ac_optarg
1620    export $ac_envvar ;;
1621
1622  *)
1623    # FIXME: should be removed in autoconf 3.0.
1624    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1625    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1626      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1627    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1628    ;;
1629
1630  esac
1631done
1632
1633if test -n "$ac_prev"; then
1634  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1635  as_fn_error $? "missing argument to $ac_option"
1636fi
1637
1638if test -n "$ac_unrecognized_opts"; then
1639  case $enable_option_checking in
1640    no) ;;
1641    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1642    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1643  esac
1644fi
1645
1646# Check all directory arguments for consistency.
1647for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1648		datadir sysconfdir sharedstatedir localstatedir includedir \
1649		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1650		libdir localedir mandir
1651do
1652  eval ac_val=\$$ac_var
1653  # Remove trailing slashes.
1654  case $ac_val in
1655    */ )
1656      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1657      eval $ac_var=\$ac_val;;
1658  esac
1659  # Be sure to have absolute directory names.
1660  case $ac_val in
1661    [\\/$]* | ?:[\\/]* )  continue;;
1662    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1663  esac
1664  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1665done
1666
1667# There might be people who depend on the old broken behavior: `$host'
1668# used to hold the argument of --host etc.
1669# FIXME: To remove some day.
1670build=$build_alias
1671host=$host_alias
1672target=$target_alias
1673
1674# FIXME: To remove some day.
1675if test "x$host_alias" != x; then
1676  if test "x$build_alias" = x; then
1677    cross_compiling=maybe
1678  elif test "x$build_alias" != "x$host_alias"; then
1679    cross_compiling=yes
1680  fi
1681fi
1682
1683ac_tool_prefix=
1684test -n "$host_alias" && ac_tool_prefix=$host_alias-
1685
1686test "$silent" = yes && exec 6>/dev/null
1687
1688
1689ac_pwd=`pwd` && test -n "$ac_pwd" &&
1690ac_ls_di=`ls -di .` &&
1691ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1692  as_fn_error $? "working directory cannot be determined"
1693test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1694  as_fn_error $? "pwd does not report name of working directory"
1695
1696
1697# Find the source files, if location was not specified.
1698if test -z "$srcdir"; then
1699  ac_srcdir_defaulted=yes
1700  # Try the directory containing this script, then the parent directory.
1701  ac_confdir=`$as_dirname -- "$as_myself" ||
1702$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1703	 X"$as_myself" : 'X\(//\)[^/]' \| \
1704	 X"$as_myself" : 'X\(//\)$' \| \
1705	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1706$as_echo X"$as_myself" |
1707    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1708	    s//\1/
1709	    q
1710	  }
1711	  /^X\(\/\/\)[^/].*/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\/\)$/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\).*/{
1720	    s//\1/
1721	    q
1722	  }
1723	  s/.*/./; q'`
1724  srcdir=$ac_confdir
1725  if test ! -r "$srcdir/$ac_unique_file"; then
1726    srcdir=..
1727  fi
1728else
1729  ac_srcdir_defaulted=no
1730fi
1731if test ! -r "$srcdir/$ac_unique_file"; then
1732  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1733  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1734fi
1735ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1736ac_abs_confdir=`(
1737	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1738	pwd)`
1739# When building in place, set srcdir=.
1740if test "$ac_abs_confdir" = "$ac_pwd"; then
1741  srcdir=.
1742fi
1743# Remove unnecessary trailing slashes from srcdir.
1744# Double slashes in file names in object file debugging info
1745# mess up M-x gdb in Emacs.
1746case $srcdir in
1747*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1748esac
1749for ac_var in $ac_precious_vars; do
1750  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1751  eval ac_env_${ac_var}_value=\$${ac_var}
1752  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1754done
1755
1756#
1757# Report the --help message.
1758#
1759if test "$ac_init_help" = "long"; then
1760  # Omit some internal or obsolete options to make the list less imposing.
1761  # This message is too long to be a string in the A/UX 3.1 sh.
1762  cat <<_ACEOF
1763\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1764
1765Usage: $0 [OPTION]... [VAR=VALUE]...
1766
1767To assign environment variables (e.g., CC, CFLAGS...), specify them as
1768VAR=VALUE.  See below for descriptions of some of the useful variables.
1769
1770Defaults for the options are specified in brackets.
1771
1772Configuration:
1773  -h, --help              display this help and exit
1774      --help=short        display options specific to this package
1775      --help=recursive    display the short help of all the included packages
1776  -V, --version           display version information and exit
1777  -q, --quiet, --silent   do not print \`checking ...' messages
1778      --cache-file=FILE   cache test results in FILE [disabled]
1779  -C, --config-cache      alias for \`--cache-file=config.cache'
1780  -n, --no-create         do not create output files
1781      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1782
1783Installation directories:
1784  --prefix=PREFIX         install architecture-independent files in PREFIX
1785                          [$ac_default_prefix]
1786  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1787                          [PREFIX]
1788
1789By default, \`make install' will install all the files in
1790\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1791an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1792for instance \`--prefix=\$HOME'.
1793
1794For better control, use the options below.
1795
1796Fine tuning of the installation directories:
1797  --bindir=DIR            user executables [EPREFIX/bin]
1798  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1799  --libexecdir=DIR        program executables [EPREFIX/libexec]
1800  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1801  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1802  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1803  --libdir=DIR            object code libraries [EPREFIX/lib]
1804  --includedir=DIR        C header files [PREFIX/include]
1805  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1806  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1807  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1808  --infodir=DIR           info documentation [DATAROOTDIR/info]
1809  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1810  --mandir=DIR            man documentation [DATAROOTDIR/man]
1811  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1812  --htmldir=DIR           html documentation [DOCDIR]
1813  --dvidir=DIR            dvi documentation [DOCDIR]
1814  --pdfdir=DIR            pdf documentation [DOCDIR]
1815  --psdir=DIR             ps documentation [DOCDIR]
1816_ACEOF
1817
1818  cat <<\_ACEOF
1819
1820X features:
1821  --x-includes=DIR    X include files are in DIR
1822  --x-libraries=DIR   X library files are in DIR
1823
1824System types:
1825  --build=BUILD     configure for building on BUILD [guessed]
1826  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1827  --target=TARGET   configure for building compilers for TARGET [HOST]
1828_ACEOF
1829fi
1830
1831if test -n "$ac_init_help"; then
1832  case $ac_init_help in
1833     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1834   esac
1835  cat <<\_ACEOF
1836
1837Optional Features:
1838  --disable-option-checking  ignore unrecognized --enable/--with options
1839  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1840  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1841  --enable-openjdk-only   suppress building custom source even if present
1842                          [disabled]
1843  --enable-debug          set the debug level to fastdebug (shorthand for
1844                          --with-debug-level=fastdebug) [disabled]
1845  --disable-headful       disable building headful support (graphical UI
1846                          support) [enabled]
1847  --enable-hotspot-test-in-build
1848                          run the Queens test after Hotspot build [disabled]
1849  --enable-unlimited-crypto
1850                          Enable unlimited crypto policy [disabled]
1851  --disable-warnings-as-errors
1852                          do not consider native warnings to be an error
1853                          [enabled]
1854  --disable-debug-symbols disable generation of debug symbols [enabled]
1855  --disable-zip-debug-info
1856                          disable zipping of debug-info files [enabled]
1857  --enable-native-coverage
1858                          enable native compilation with code coverage
1859                          data[disabled]
1860  --disable-freetype-bundling
1861                          disable bundling of the freetype library with the
1862                          build result [enabled on Windows or when using
1863                          --with-freetype, disabled otherwise]
1864  --enable-sjavac         use sjavac to do fast incremental compiles
1865                          [disabled]
1866  --disable-precompiled-headers
1867                          disable using precompiled headers when compiling C++
1868                          [enabled]
1869  --enable-ccache         enable using ccache to speed up recompilations
1870                          [disabled]
1871
1872Optional Packages:
1873  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1874  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1875  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1876                          support it), e.g. --with-target-bits=32 [guessed]
1877  --with-custom-make-dir  Deprecated. Option is kept for backwards
1878                          compatibility and is ignored
1879  --with-jdk-variant      JDK variant to build (normal) [normal]
1880  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1881  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1882                          client, minimal1, kernel, zero, zeroshark, core)
1883                          [server]
1884  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1885                          optimized (HotSpot build only)) [release]
1886  --with-devkit           use this devkit for compilers, tools and resources
1887  --with-sys-root         alias for --with-sysroot for backwards compatability
1888  --with-sysroot          use this directory as sysroot
1889  --with-tools-dir        alias for --with-toolchain-path for backwards
1890                          compatibility
1891  --with-toolchain-path   prepend these directories when searching for
1892                          toolchain binaries (compilers etc)
1893  --with-extra-path       prepend these directories to the default path
1894  --with-sdk-name         use the platform SDK of the given name. [macosx]
1895  --with-conf-name        use this as the name of the configuration [generated
1896                          from important configuration options]
1897  --with-output-sync      set make output sync type if supported by make.
1898                          [recurse]
1899  --with-builddeps-conf   use this configuration file for the builddeps
1900  --with-builddeps-server download and use build dependencies from this server
1901                          url
1902  --with-builddeps-dir    store downloaded build dependencies here
1903                          [/localhome/builddeps]
1904  --with-builddeps-group  chgrp the downloaded build dependencies to this
1905                          group
1906  --with-cacerts-file     specify alternative cacerts file
1907  --with-milestone        Set milestone value for build [internal]
1908  --with-update-version   Set update version value for build [b00]
1909  --with-user-release-suffix
1910                          Add a custom string to the version string if build
1911                          number is not set.[username_builddateb00]
1912  --with-build-number     Set build number value for build [b00]
1913  --with-copyright-year   Set copyright year value for build [current year]
1914  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1915  --with-add-source-root  for each and every source directory, look in this
1916                          additional source root for the same directory; if it
1917                          exists and have files in it, include it in the build
1918  --with-override-source-root
1919                          for each and every source directory, look in this
1920                          override source root for the same directory; if it
1921                          exists, use that directory instead and ignore the
1922                          directory in the original source root
1923  --with-adds-and-overrides
1924                          use the subdirs 'adds' and 'overrides' in the
1925                          specified directory as add-source-root and
1926                          override-source-root
1927  --with-override-langtools
1928                          use this langtools dir for the build
1929  --with-override-corba   use this corba dir for the build
1930  --with-override-jaxp    use this jaxp dir for the build
1931  --with-override-jaxws   use this jaxws dir for the build
1932  --with-override-hotspot use this hotspot dir for the build
1933  --with-override-nashorn use this nashorn dir for the build
1934  --with-override-jdk     use this jdk dir for the build
1935  --with-import-hotspot   import hotspot binaries from this jdk image or
1936                          hotspot build dist dir instead of building from
1937                          source
1938  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1939                          to show possible values [platform dependent]
1940  --with-toolchain-version
1941                          the version of the toolchain to look for, use
1942                          '--help' to show possible values [platform
1943                          dependent]
1944  --with-jtreg            Regression Test Harness [probed]
1945  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1946  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1947  --with-extra-ldflags    extra flags to be used when linking jdk
1948  --with-x                use the X Window System
1949  --with-cups             specify prefix directory for the cups package
1950                          (expecting the headers under PATH/include)
1951  --with-cups-include     specify directory for the cups include files
1952  --with-freetype         specify prefix directory for the freetype package
1953                          (expecting the libraries under PATH/lib and the
1954                          headers under PATH/include)
1955  --with-freetype-include specify directory for the freetype include files
1956  --with-freetype-lib     specify directory for the freetype library
1957  --with-freetype-src     specify directory with freetype sources to
1958                          automatically build the library (experimental,
1959                          Windows-only)
1960  --with-alsa             specify prefix directory for the alsa package
1961                          (expecting the libraries under PATH/lib and the
1962                          headers under PATH/include)
1963  --with-alsa-include     specify directory for the alsa include files
1964  --with-alsa-lib         specify directory for the alsa library
1965  --with-libjpeg          use libjpeg from build system or OpenJDK source
1966                          (system, bundled) [bundled]
1967  --with-giflib           use giflib from build system or OpenJDK source
1968                          (system, bundled) [bundled]
1969  --with-lcms             use lcms2 from build system or OpenJDK source
1970                          (system, bundled) [bundled]
1971  --with-libpng           use libpng from build system or OpenJDK source
1972                          (system, bundled) [bundled]
1973  --with-zlib             use zlib from build system or OpenJDK source
1974                          (system, bundled) [bundled]
1975  --with-stdc++lib=<static>,<dynamic>,<default>
1976                          force linking of the C++ runtime on Linux to either
1977                          static or dynamic, default is static with dynamic as
1978                          fallback
1979  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1980                          (Windows only) [probed]
1981  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1982                          (Windows only) [probed]
1983  --with-dxsdk            Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-dxsdk-include    Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-num-cores        number of cores in the build system, e.g.
1990                          --with-num-cores=8 [probed]
1991  --with-memory-size      memory (in MB) available in the build system, e.g.
1992                          --with-memory-size=1024 [probed]
1993  --with-jobs             number of parallel jobs to let make run [calculated
1994                          based on cores and memory]
1995  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1996                          invocations of boot JDK, overriding the default
1997                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1998                          -enableassertions"
1999  --with-sjavac-server-java
2000                          use this java binary for running the sjavac
2001                          background server [Boot JDK java]
2002  --with-ccache-dir       where to store ccache files [~/.ccache]
2003
2004Some influential environment variables:
2005  BASENAME    Override default value for BASENAME
2006  BASH        Override default value for BASH
2007  CAT         Override default value for CAT
2008  CHMOD       Override default value for CHMOD
2009  CMP         Override default value for CMP
2010  COMM        Override default value for COMM
2011  CP          Override default value for CP
2012  CUT         Override default value for CUT
2013  DATE        Override default value for DATE
2014  DIFF        Override default value for DIFF
2015  DIRNAME     Override default value for DIRNAME
2016  ECHO        Override default value for ECHO
2017  EXPR        Override default value for EXPR
2018  FILE        Override default value for FILE
2019  FIND        Override default value for FIND
2020  HEAD        Override default value for HEAD
2021  LN          Override default value for LN
2022  LS          Override default value for LS
2023  MKDIR       Override default value for MKDIR
2024  MKTEMP      Override default value for MKTEMP
2025  MV          Override default value for MV
2026  NAWK        Override default value for NAWK
2027  PRINTF      Override default value for PRINTF
2028  RM          Override default value for RM
2029  SH          Override default value for SH
2030  SORT        Override default value for SORT
2031  TAIL        Override default value for TAIL
2032  TAR         Override default value for TAR
2033  TEE         Override default value for TEE
2034  TOUCH       Override default value for TOUCH
2035  TR          Override default value for TR
2036  UNAME       Override default value for UNAME
2037  UNIQ        Override default value for UNIQ
2038  WC          Override default value for WC
2039  WHICH       Override default value for WHICH
2040  XARGS       Override default value for XARGS
2041  AWK         Override default value for AWK
2042  GREP        Override default value for GREP
2043  EGREP       Override default value for EGREP
2044  FGREP       Override default value for FGREP
2045  SED         Override default value for SED
2046  CYGPATH     Override default value for CYGPATH
2047  READLINK    Override default value for READLINK
2048  DF          Override default value for DF
2049  CPIO        Override default value for CPIO
2050  UNZIP       Override default value for UNZIP
2051  ZIP         Override default value for ZIP
2052  LDD         Override default value for LDD
2053  OTOOL       Override default value for OTOOL
2054  READELF     Override default value for READELF
2055  HG          Override default value for HG
2056  STAT        Override default value for STAT
2057  TIME        Override default value for TIME
2058  PATCH       Override default value for PATCH
2059  DSYMUTIL    Override default value for DSYMUTIL
2060  XATTR       Override default value for XATTR
2061  CODESIGN    Override default value for CODESIGN
2062  SETFILE     Override default value for SETFILE
2063  PKG_CONFIG  path to pkg-config utility
2064  JAVA        Override default value for JAVA
2065  JAVAC       Override default value for JAVAC
2066  JAVAH       Override default value for JAVAH
2067  JAR         Override default value for JAR
2068  JARSIGNER   Override default value for JARSIGNER
2069  CC          C compiler command
2070  CFLAGS      C compiler flags
2071  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2072              nonstandard directory <lib dir>
2073  LIBS        libraries to pass to the linker, e.g. -l<library>
2074  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2075              you have headers in a nonstandard directory <include dir>
2076  CXX         C++ compiler command
2077  CXXFLAGS    C++ compiler flags
2078  CPP         C preprocessor
2079  CXXCPP      C++ preprocessor
2080  AS          Override default value for AS
2081  AR          Override default value for AR
2082  LIPO        Override default value for LIPO
2083  STRIP       Override default value for STRIP
2084  NM          Override default value for NM
2085  GNM         Override default value for GNM
2086  OBJCOPY     Override default value for OBJCOPY
2087  OBJDUMP     Override default value for OBJDUMP
2088  BUILD_CC    Override default value for BUILD_CC
2089  BUILD_CXX   Override default value for BUILD_CXX
2090  BUILD_LD    Override default value for BUILD_LD
2091  JTREGEXE    Override default value for JTREGEXE
2092  XMKMF       Path to xmkmf, Makefile generator for X Window System
2093  FREETYPE_CFLAGS
2094              C compiler flags for FREETYPE, overriding pkg-config
2095  FREETYPE_LIBS
2096              linker flags for FREETYPE, overriding pkg-config
2097  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2098  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2099  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2100  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2101  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2102  PNG_LIBS    linker flags for PNG, overriding pkg-config
2103  LIBFFI_CFLAGS
2104              C compiler flags for LIBFFI, overriding pkg-config
2105  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2106  CCACHE      Override default value for CCACHE
2107
2108Use these variables to override the choices made by `configure' or to help
2109it to find libraries and programs with nonstandard names/locations.
2110
2111Report bugs to <build-dev@openjdk.java.net>.
2112OpenJDK home page: <http://openjdk.java.net>.
2113_ACEOF
2114ac_status=$?
2115fi
2116
2117if test "$ac_init_help" = "recursive"; then
2118  # If there are subdirs, report their specific --help.
2119  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2120    test -d "$ac_dir" ||
2121      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2122      continue
2123    ac_builddir=.
2124
2125case "$ac_dir" in
2126.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2127*)
2128  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2129  # A ".." for each directory in $ac_dir_suffix.
2130  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2131  case $ac_top_builddir_sub in
2132  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2133  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2134  esac ;;
2135esac
2136ac_abs_top_builddir=$ac_pwd
2137ac_abs_builddir=$ac_pwd$ac_dir_suffix
2138# for backward compatibility:
2139ac_top_builddir=$ac_top_build_prefix
2140
2141case $srcdir in
2142  .)  # We are building in place.
2143    ac_srcdir=.
2144    ac_top_srcdir=$ac_top_builddir_sub
2145    ac_abs_top_srcdir=$ac_pwd ;;
2146  [\\/]* | ?:[\\/]* )  # Absolute name.
2147    ac_srcdir=$srcdir$ac_dir_suffix;
2148    ac_top_srcdir=$srcdir
2149    ac_abs_top_srcdir=$srcdir ;;
2150  *) # Relative name.
2151    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2152    ac_top_srcdir=$ac_top_build_prefix$srcdir
2153    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2154esac
2155ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2156
2157    cd "$ac_dir" || { ac_status=$?; continue; }
2158    # Check for guested configure.
2159    if test -f "$ac_srcdir/configure.gnu"; then
2160      echo &&
2161      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2162    elif test -f "$ac_srcdir/configure"; then
2163      echo &&
2164      $SHELL "$ac_srcdir/configure" --help=recursive
2165    else
2166      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2167    fi || ac_status=$?
2168    cd "$ac_pwd" || { ac_status=$?; break; }
2169  done
2170fi
2171
2172test -n "$ac_init_help" && exit $ac_status
2173if $ac_init_version; then
2174  cat <<\_ACEOF
2175OpenJDK configure jdk9
2176generated by GNU Autoconf 2.69
2177
2178Copyright (C) 2012 Free Software Foundation, Inc.
2179This configure script is free software; the Free Software Foundation
2180gives unlimited permission to copy, distribute and modify it.
2181_ACEOF
2182  exit
2183fi
2184
2185## ------------------------ ##
2186## Autoconf initialization. ##
2187## ------------------------ ##
2188
2189# ac_fn_c_try_compile LINENO
2190# --------------------------
2191# Try to compile conftest.$ac_ext, and return whether this succeeded.
2192ac_fn_c_try_compile ()
2193{
2194  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195  rm -f conftest.$ac_objext
2196  if { { ac_try="$ac_compile"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_compile") 2>conftest.err
2204  ac_status=$?
2205  if test -s conftest.err; then
2206    grep -v '^ *+' conftest.err >conftest.er1
2207    cat conftest.er1 >&5
2208    mv -f conftest.er1 conftest.err
2209  fi
2210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2211  test $ac_status = 0; } && {
2212	 test -z "$ac_c_werror_flag" ||
2213	 test ! -s conftest.err
2214       } && test -s conftest.$ac_objext; then :
2215  ac_retval=0
2216else
2217  $as_echo "$as_me: failed program was:" >&5
2218sed 's/^/| /' conftest.$ac_ext >&5
2219
2220	ac_retval=1
2221fi
2222  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2223  as_fn_set_status $ac_retval
2224
2225} # ac_fn_c_try_compile
2226
2227# ac_fn_cxx_try_compile LINENO
2228# ----------------------------
2229# Try to compile conftest.$ac_ext, and return whether this succeeded.
2230ac_fn_cxx_try_compile ()
2231{
2232  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233  rm -f conftest.$ac_objext
2234  if { { ac_try="$ac_compile"
2235case "(($ac_try" in
2236  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2237  *) ac_try_echo=$ac_try;;
2238esac
2239eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2240$as_echo "$ac_try_echo"; } >&5
2241  (eval "$ac_compile") 2>conftest.err
2242  ac_status=$?
2243  if test -s conftest.err; then
2244    grep -v '^ *+' conftest.err >conftest.er1
2245    cat conftest.er1 >&5
2246    mv -f conftest.er1 conftest.err
2247  fi
2248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2249  test $ac_status = 0; } && {
2250	 test -z "$ac_cxx_werror_flag" ||
2251	 test ! -s conftest.err
2252       } && test -s conftest.$ac_objext; then :
2253  ac_retval=0
2254else
2255  $as_echo "$as_me: failed program was:" >&5
2256sed 's/^/| /' conftest.$ac_ext >&5
2257
2258	ac_retval=1
2259fi
2260  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2261  as_fn_set_status $ac_retval
2262
2263} # ac_fn_cxx_try_compile
2264
2265# ac_fn_c_try_cpp LINENO
2266# ----------------------
2267# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2268ac_fn_c_try_cpp ()
2269{
2270  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271  if { { ac_try="$ac_cpp conftest.$ac_ext"
2272case "(($ac_try" in
2273  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2274  *) ac_try_echo=$ac_try;;
2275esac
2276eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2277$as_echo "$ac_try_echo"; } >&5
2278  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2279  ac_status=$?
2280  if test -s conftest.err; then
2281    grep -v '^ *+' conftest.err >conftest.er1
2282    cat conftest.er1 >&5
2283    mv -f conftest.er1 conftest.err
2284  fi
2285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2286  test $ac_status = 0; } > conftest.i && {
2287	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2288	 test ! -s conftest.err
2289       }; then :
2290  ac_retval=0
2291else
2292  $as_echo "$as_me: failed program was:" >&5
2293sed 's/^/| /' conftest.$ac_ext >&5
2294
2295    ac_retval=1
2296fi
2297  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2298  as_fn_set_status $ac_retval
2299
2300} # ac_fn_c_try_cpp
2301
2302# ac_fn_cxx_try_cpp LINENO
2303# ------------------------
2304# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2305ac_fn_cxx_try_cpp ()
2306{
2307  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308  if { { ac_try="$ac_cpp conftest.$ac_ext"
2309case "(($ac_try" in
2310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311  *) ac_try_echo=$ac_try;;
2312esac
2313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314$as_echo "$ac_try_echo"; } >&5
2315  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2316  ac_status=$?
2317  if test -s conftest.err; then
2318    grep -v '^ *+' conftest.err >conftest.er1
2319    cat conftest.er1 >&5
2320    mv -f conftest.er1 conftest.err
2321  fi
2322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323  test $ac_status = 0; } > conftest.i && {
2324	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2325	 test ! -s conftest.err
2326       }; then :
2327  ac_retval=0
2328else
2329  $as_echo "$as_me: failed program was:" >&5
2330sed 's/^/| /' conftest.$ac_ext >&5
2331
2332    ac_retval=1
2333fi
2334  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335  as_fn_set_status $ac_retval
2336
2337} # ac_fn_cxx_try_cpp
2338
2339# ac_fn_c_try_link LINENO
2340# -----------------------
2341# Try to link conftest.$ac_ext, and return whether this succeeded.
2342ac_fn_c_try_link ()
2343{
2344  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2345  rm -f conftest.$ac_objext conftest$ac_exeext
2346  if { { ac_try="$ac_link"
2347case "(($ac_try" in
2348  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2349  *) ac_try_echo=$ac_try;;
2350esac
2351eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2352$as_echo "$ac_try_echo"; } >&5
2353  (eval "$ac_link") 2>conftest.err
2354  ac_status=$?
2355  if test -s conftest.err; then
2356    grep -v '^ *+' conftest.err >conftest.er1
2357    cat conftest.er1 >&5
2358    mv -f conftest.er1 conftest.err
2359  fi
2360  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2361  test $ac_status = 0; } && {
2362	 test -z "$ac_c_werror_flag" ||
2363	 test ! -s conftest.err
2364       } && test -s conftest$ac_exeext && {
2365	 test "$cross_compiling" = yes ||
2366	 test -x conftest$ac_exeext
2367       }; then :
2368  ac_retval=0
2369else
2370  $as_echo "$as_me: failed program was:" >&5
2371sed 's/^/| /' conftest.$ac_ext >&5
2372
2373	ac_retval=1
2374fi
2375  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2376  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2377  # interfere with the next link command; also delete a directory that is
2378  # left behind by Apple's compiler.  We do this before executing the actions.
2379  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_link
2384
2385# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2386# ---------------------------------------------------------
2387# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2388# the include files in INCLUDES and setting the cache variable VAR
2389# accordingly.
2390ac_fn_cxx_check_header_mongrel ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  if eval \${$3+:} false; then :
2394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2395$as_echo_n "checking for $2... " >&6; }
2396if eval \${$3+:} false; then :
2397  $as_echo_n "(cached) " >&6
2398fi
2399eval ac_res=\$$3
2400	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2401$as_echo "$ac_res" >&6; }
2402else
2403  # Is the header compilable?
2404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2405$as_echo_n "checking $2 usability... " >&6; }
2406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2407/* end confdefs.h.  */
2408$4
2409#include <$2>
2410_ACEOF
2411if ac_fn_cxx_try_compile "$LINENO"; then :
2412  ac_header_compiler=yes
2413else
2414  ac_header_compiler=no
2415fi
2416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2418$as_echo "$ac_header_compiler" >&6; }
2419
2420# Is the header present?
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2422$as_echo_n "checking $2 presence... " >&6; }
2423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424/* end confdefs.h.  */
2425#include <$2>
2426_ACEOF
2427if ac_fn_cxx_try_cpp "$LINENO"; then :
2428  ac_header_preproc=yes
2429else
2430  ac_header_preproc=no
2431fi
2432rm -f conftest.err conftest.i conftest.$ac_ext
2433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2434$as_echo "$ac_header_preproc" >&6; }
2435
2436# So?  What about this header?
2437case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2438  yes:no: )
2439    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2440$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2442$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2443    ;;
2444  no:yes:* )
2445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2446$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2448$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2450$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2452$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2454$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2455( $as_echo "## ----------------------------------------- ##
2456## Report this to build-dev@openjdk.java.net ##
2457## ----------------------------------------- ##"
2458     ) | sed "s/^/$as_me: WARNING:     /" >&2
2459    ;;
2460esac
2461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2462$as_echo_n "checking for $2... " >&6; }
2463if eval \${$3+:} false; then :
2464  $as_echo_n "(cached) " >&6
2465else
2466  eval "$3=\$ac_header_compiler"
2467fi
2468eval ac_res=\$$3
2469	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2470$as_echo "$ac_res" >&6; }
2471fi
2472  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473
2474} # ac_fn_cxx_check_header_mongrel
2475
2476# ac_fn_cxx_try_run LINENO
2477# ------------------------
2478# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2479# that executables *can* be run.
2480ac_fn_cxx_try_run ()
2481{
2482  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483  if { { ac_try="$ac_link"
2484case "(($ac_try" in
2485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2486  *) ac_try_echo=$ac_try;;
2487esac
2488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2489$as_echo "$ac_try_echo"; } >&5
2490  (eval "$ac_link") 2>&5
2491  ac_status=$?
2492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2493  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2494  { { case "(($ac_try" in
2495  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2496  *) ac_try_echo=$ac_try;;
2497esac
2498eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2499$as_echo "$ac_try_echo"; } >&5
2500  (eval "$ac_try") 2>&5
2501  ac_status=$?
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; }; }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: program exited with status $ac_status" >&5
2507       $as_echo "$as_me: failed program was:" >&5
2508sed 's/^/| /' conftest.$ac_ext >&5
2509
2510       ac_retval=$ac_status
2511fi
2512  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2513  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2514  as_fn_set_status $ac_retval
2515
2516} # ac_fn_cxx_try_run
2517
2518# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2519# ---------------------------------------------------------
2520# Tests whether HEADER exists and can be compiled using the include files in
2521# INCLUDES, setting the cache variable VAR accordingly.
2522ac_fn_cxx_check_header_compile ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2526$as_echo_n "checking for $2... " >&6; }
2527if eval \${$3+:} false; then :
2528  $as_echo_n "(cached) " >&6
2529else
2530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533#include <$2>
2534_ACEOF
2535if ac_fn_cxx_try_compile "$LINENO"; then :
2536  eval "$3=yes"
2537else
2538  eval "$3=no"
2539fi
2540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2546
2547} # ac_fn_cxx_check_header_compile
2548
2549# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2550# ----------------------------------------------
2551# Tries to find the compile-time value of EXPR in a program that includes
2552# INCLUDES, setting VAR accordingly. Returns whether the value could be
2553# computed
2554ac_fn_cxx_compute_int ()
2555{
2556  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2557  if test "$cross_compiling" = yes; then
2558    # Depending upon the size, compute the lo and hi bounds.
2559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2560/* end confdefs.h.  */
2561$4
2562int
2563main ()
2564{
2565static int test_array [1 - 2 * !(($2) >= 0)];
2566test_array [0] = 0;
2567return test_array [0];
2568
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_compile "$LINENO"; then :
2574  ac_lo=0 ac_mid=0
2575  while :; do
2576    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577/* end confdefs.h.  */
2578$4
2579int
2580main ()
2581{
2582static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2583test_array [0] = 0;
2584return test_array [0];
2585
2586  ;
2587  return 0;
2588}
2589_ACEOF
2590if ac_fn_cxx_try_compile "$LINENO"; then :
2591  ac_hi=$ac_mid; break
2592else
2593  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2594			if test $ac_lo -le $ac_mid; then
2595			  ac_lo= ac_hi=
2596			  break
2597			fi
2598			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2599fi
2600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601  done
2602else
2603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604/* end confdefs.h.  */
2605$4
2606int
2607main ()
2608{
2609static int test_array [1 - 2 * !(($2) < 0)];
2610test_array [0] = 0;
2611return test_array [0];
2612
2613  ;
2614  return 0;
2615}
2616_ACEOF
2617if ac_fn_cxx_try_compile "$LINENO"; then :
2618  ac_hi=-1 ac_mid=-1
2619  while :; do
2620    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622$4
2623int
2624main ()
2625{
2626static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2627test_array [0] = 0;
2628return test_array [0];
2629
2630  ;
2631  return 0;
2632}
2633_ACEOF
2634if ac_fn_cxx_try_compile "$LINENO"; then :
2635  ac_lo=$ac_mid; break
2636else
2637  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2638			if test $ac_mid -le $ac_hi; then
2639			  ac_lo= ac_hi=
2640			  break
2641			fi
2642			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2643fi
2644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2645  done
2646else
2647  ac_lo= ac_hi=
2648fi
2649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2650fi
2651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2652# Binary search between lo and hi bounds.
2653while test "x$ac_lo" != "x$ac_hi"; do
2654  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2656/* end confdefs.h.  */
2657$4
2658int
2659main ()
2660{
2661static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2662test_array [0] = 0;
2663return test_array [0];
2664
2665  ;
2666  return 0;
2667}
2668_ACEOF
2669if ac_fn_cxx_try_compile "$LINENO"; then :
2670  ac_hi=$ac_mid
2671else
2672  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675done
2676case $ac_lo in #((
2677?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2678'') ac_retval=1 ;;
2679esac
2680  else
2681    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2682/* end confdefs.h.  */
2683$4
2684static long int longval () { return $2; }
2685static unsigned long int ulongval () { return $2; }
2686#include <stdio.h>
2687#include <stdlib.h>
2688int
2689main ()
2690{
2691
2692  FILE *f = fopen ("conftest.val", "w");
2693  if (! f)
2694    return 1;
2695  if (($2) < 0)
2696    {
2697      long int i = longval ();
2698      if (i != ($2))
2699	return 1;
2700      fprintf (f, "%ld", i);
2701    }
2702  else
2703    {
2704      unsigned long int i = ulongval ();
2705      if (i != ($2))
2706	return 1;
2707      fprintf (f, "%lu", i);
2708    }
2709  /* Do not output a trailing newline, as this causes \r\n confusion
2710     on some platforms.  */
2711  return ferror (f) || fclose (f) != 0;
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_run "$LINENO"; then :
2718  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2719else
2720  ac_retval=1
2721fi
2722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2723  conftest.$ac_objext conftest.beam conftest.$ac_ext
2724rm -f conftest.val
2725
2726  fi
2727  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2728  as_fn_set_status $ac_retval
2729
2730} # ac_fn_cxx_compute_int
2731
2732# ac_fn_cxx_try_link LINENO
2733# -------------------------
2734# Try to link conftest.$ac_ext, and return whether this succeeded.
2735ac_fn_cxx_try_link ()
2736{
2737  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738  rm -f conftest.$ac_objext conftest$ac_exeext
2739  if { { ac_try="$ac_link"
2740case "(($ac_try" in
2741  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2742  *) ac_try_echo=$ac_try;;
2743esac
2744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2745$as_echo "$ac_try_echo"; } >&5
2746  (eval "$ac_link") 2>conftest.err
2747  ac_status=$?
2748  if test -s conftest.err; then
2749    grep -v '^ *+' conftest.err >conftest.er1
2750    cat conftest.er1 >&5
2751    mv -f conftest.er1 conftest.err
2752  fi
2753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2754  test $ac_status = 0; } && {
2755	 test -z "$ac_cxx_werror_flag" ||
2756	 test ! -s conftest.err
2757       } && test -s conftest$ac_exeext && {
2758	 test "$cross_compiling" = yes ||
2759	 test -x conftest$ac_exeext
2760       }; then :
2761  ac_retval=0
2762else
2763  $as_echo "$as_me: failed program was:" >&5
2764sed 's/^/| /' conftest.$ac_ext >&5
2765
2766	ac_retval=1
2767fi
2768  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2769  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2770  # interfere with the next link command; also delete a directory that is
2771  # left behind by Apple's compiler.  We do this before executing the actions.
2772  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2773  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2774  as_fn_set_status $ac_retval
2775
2776} # ac_fn_cxx_try_link
2777
2778# ac_fn_cxx_check_func LINENO FUNC VAR
2779# ------------------------------------
2780# Tests whether FUNC exists, setting the cache variable VAR accordingly
2781ac_fn_cxx_check_func ()
2782{
2783  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2785$as_echo_n "checking for $2... " >&6; }
2786if eval \${$3+:} false; then :
2787  $as_echo_n "(cached) " >&6
2788else
2789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790/* end confdefs.h.  */
2791/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2792   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2793#define $2 innocuous_$2
2794
2795/* System header to define __stub macros and hopefully few prototypes,
2796    which can conflict with char $2 (); below.
2797    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2798    <limits.h> exists even on freestanding compilers.  */
2799
2800#ifdef __STDC__
2801# include <limits.h>
2802#else
2803# include <assert.h>
2804#endif
2805
2806#undef $2
2807
2808/* Override any GCC internal prototype to avoid an error.
2809   Use char because int might match the return type of a GCC
2810   builtin and then its argument prototype would still apply.  */
2811#ifdef __cplusplus
2812extern "C"
2813#endif
2814char $2 ();
2815/* The GNU C library defines this for functions which it implements
2816    to always fail with ENOSYS.  Some functions are actually named
2817    something starting with __ and the normal name is an alias.  */
2818#if defined __stub_$2 || defined __stub___$2
2819choke me
2820#endif
2821
2822int
2823main ()
2824{
2825return $2 ();
2826  ;
2827  return 0;
2828}
2829_ACEOF
2830if ac_fn_cxx_try_link "$LINENO"; then :
2831  eval "$3=yes"
2832else
2833  eval "$3=no"
2834fi
2835rm -f core conftest.err conftest.$ac_objext \
2836    conftest$ac_exeext conftest.$ac_ext
2837fi
2838eval ac_res=\$$3
2839	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2840$as_echo "$ac_res" >&6; }
2841  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2842
2843} # ac_fn_cxx_check_func
2844
2845# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2846# -------------------------------------------------------
2847# Tests whether HEADER exists and can be compiled using the include files in
2848# INCLUDES, setting the cache variable VAR accordingly.
2849ac_fn_c_check_header_compile ()
2850{
2851  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2853$as_echo_n "checking for $2... " >&6; }
2854if eval \${$3+:} false; then :
2855  $as_echo_n "(cached) " >&6
2856else
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860#include <$2>
2861_ACEOF
2862if ac_fn_c_try_compile "$LINENO"; then :
2863  eval "$3=yes"
2864else
2865  eval "$3=no"
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868fi
2869eval ac_res=\$$3
2870	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2871$as_echo "$ac_res" >&6; }
2872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873
2874} # ac_fn_c_check_header_compile
2875cat >config.log <<_ACEOF
2876This file contains any messages produced by compilers while
2877running configure, to aid debugging if configure makes a mistake.
2878
2879It was created by OpenJDK $as_me jdk9, which was
2880generated by GNU Autoconf 2.69.  Invocation command line was
2881
2882  $ $0 $@
2883
2884_ACEOF
2885exec 5>>config.log
2886{
2887cat <<_ASUNAME
2888## --------- ##
2889## Platform. ##
2890## --------- ##
2891
2892hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2893uname -m = `(uname -m) 2>/dev/null || echo unknown`
2894uname -r = `(uname -r) 2>/dev/null || echo unknown`
2895uname -s = `(uname -s) 2>/dev/null || echo unknown`
2896uname -v = `(uname -v) 2>/dev/null || echo unknown`
2897
2898/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2899/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2900
2901/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2902/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2903/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2904/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2905/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2906/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2907/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2908
2909_ASUNAME
2910
2911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2912for as_dir in $PATH
2913do
2914  IFS=$as_save_IFS
2915  test -z "$as_dir" && as_dir=.
2916    $as_echo "PATH: $as_dir"
2917  done
2918IFS=$as_save_IFS
2919
2920} >&5
2921
2922cat >&5 <<_ACEOF
2923
2924
2925## ----------- ##
2926## Core tests. ##
2927## ----------- ##
2928
2929_ACEOF
2930
2931
2932# Keep a trace of the command line.
2933# Strip out --no-create and --no-recursion so they do not pile up.
2934# Strip out --silent because we don't want to record it for future runs.
2935# Also quote any args containing shell meta-characters.
2936# Make two passes to allow for proper duplicate-argument suppression.
2937ac_configure_args=
2938ac_configure_args0=
2939ac_configure_args1=
2940ac_must_keep_next=false
2941for ac_pass in 1 2
2942do
2943  for ac_arg
2944  do
2945    case $ac_arg in
2946    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2947    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2948    | -silent | --silent | --silen | --sile | --sil)
2949      continue ;;
2950    *\'*)
2951      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2952    esac
2953    case $ac_pass in
2954    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2955    2)
2956      as_fn_append ac_configure_args1 " '$ac_arg'"
2957      if test $ac_must_keep_next = true; then
2958	ac_must_keep_next=false # Got value, back to normal.
2959      else
2960	case $ac_arg in
2961	  *=* | --config-cache | -C | -disable-* | --disable-* \
2962	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2963	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2964	  | -with-* | --with-* | -without-* | --without-* | --x)
2965	    case "$ac_configure_args0 " in
2966	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2967	    esac
2968	    ;;
2969	  -* ) ac_must_keep_next=true ;;
2970	esac
2971      fi
2972      as_fn_append ac_configure_args " '$ac_arg'"
2973      ;;
2974    esac
2975  done
2976done
2977{ ac_configure_args0=; unset ac_configure_args0;}
2978{ ac_configure_args1=; unset ac_configure_args1;}
2979
2980# When interrupted or exit'd, cleanup temporary files, and complete
2981# config.log.  We remove comments because anyway the quotes in there
2982# would cause problems or look ugly.
2983# WARNING: Use '\'' to represent an apostrophe within the trap.
2984# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2985trap 'exit_status=$?
2986  # Save into config.log some information that might help in debugging.
2987  {
2988    echo
2989
2990    $as_echo "## ---------------- ##
2991## Cache variables. ##
2992## ---------------- ##"
2993    echo
2994    # The following way of writing the cache mishandles newlines in values,
2995(
2996  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2997    eval ac_val=\$$ac_var
2998    case $ac_val in #(
2999    *${as_nl}*)
3000      case $ac_var in #(
3001      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3002$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3003      esac
3004      case $ac_var in #(
3005      _ | IFS | as_nl) ;; #(
3006      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3007      *) { eval $ac_var=; unset $ac_var;} ;;
3008      esac ;;
3009    esac
3010  done
3011  (set) 2>&1 |
3012    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3013    *${as_nl}ac_space=\ *)
3014      sed -n \
3015	"s/'\''/'\''\\\\'\'''\''/g;
3016	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3017      ;; #(
3018    *)
3019      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3020      ;;
3021    esac |
3022    sort
3023)
3024    echo
3025
3026    $as_echo "## ----------------- ##
3027## Output variables. ##
3028## ----------------- ##"
3029    echo
3030    for ac_var in $ac_subst_vars
3031    do
3032      eval ac_val=\$$ac_var
3033      case $ac_val in
3034      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3035      esac
3036      $as_echo "$ac_var='\''$ac_val'\''"
3037    done | sort
3038    echo
3039
3040    if test -n "$ac_subst_files"; then
3041      $as_echo "## ------------------- ##
3042## File substitutions. ##
3043## ------------------- ##"
3044      echo
3045      for ac_var in $ac_subst_files
3046      do
3047	eval ac_val=\$$ac_var
3048	case $ac_val in
3049	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3050	esac
3051	$as_echo "$ac_var='\''$ac_val'\''"
3052      done | sort
3053      echo
3054    fi
3055
3056    if test -s confdefs.h; then
3057      $as_echo "## ----------- ##
3058## confdefs.h. ##
3059## ----------- ##"
3060      echo
3061      cat confdefs.h
3062      echo
3063    fi
3064    test "$ac_signal" != 0 &&
3065      $as_echo "$as_me: caught signal $ac_signal"
3066    $as_echo "$as_me: exit $exit_status"
3067  } >&5
3068  rm -f core *.core core.conftest.* &&
3069    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3070    exit $exit_status
3071' 0
3072for ac_signal in 1 2 13 15; do
3073  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3074done
3075ac_signal=0
3076
3077# confdefs.h avoids OS command line length limits that DEFS can exceed.
3078rm -f -r conftest* confdefs.h
3079
3080$as_echo "/* confdefs.h */" > confdefs.h
3081
3082# Predefined preprocessor variables.
3083
3084cat >>confdefs.h <<_ACEOF
3085#define PACKAGE_NAME "$PACKAGE_NAME"
3086_ACEOF
3087
3088cat >>confdefs.h <<_ACEOF
3089#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3090_ACEOF
3091
3092cat >>confdefs.h <<_ACEOF
3093#define PACKAGE_VERSION "$PACKAGE_VERSION"
3094_ACEOF
3095
3096cat >>confdefs.h <<_ACEOF
3097#define PACKAGE_STRING "$PACKAGE_STRING"
3098_ACEOF
3099
3100cat >>confdefs.h <<_ACEOF
3101#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3102_ACEOF
3103
3104cat >>confdefs.h <<_ACEOF
3105#define PACKAGE_URL "$PACKAGE_URL"
3106_ACEOF
3107
3108
3109# Let the site file select an alternate cache file if it wants to.
3110# Prefer an explicitly selected file to automatically selected ones.
3111ac_site_file1=NONE
3112ac_site_file2=NONE
3113if test -n "$CONFIG_SITE"; then
3114  # We do not want a PATH search for config.site.
3115  case $CONFIG_SITE in #((
3116    -*)  ac_site_file1=./$CONFIG_SITE;;
3117    */*) ac_site_file1=$CONFIG_SITE;;
3118    *)   ac_site_file1=./$CONFIG_SITE;;
3119  esac
3120elif test "x$prefix" != xNONE; then
3121  ac_site_file1=$prefix/share/config.site
3122  ac_site_file2=$prefix/etc/config.site
3123else
3124  ac_site_file1=$ac_default_prefix/share/config.site
3125  ac_site_file2=$ac_default_prefix/etc/config.site
3126fi
3127for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3128do
3129  test "x$ac_site_file" = xNONE && continue
3130  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3131    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3132$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3133    sed 's/^/| /' "$ac_site_file" >&5
3134    . "$ac_site_file" \
3135      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3137as_fn_error $? "failed to load site script $ac_site_file
3138See \`config.log' for more details" "$LINENO" 5; }
3139  fi
3140done
3141
3142if test -r "$cache_file"; then
3143  # Some versions of bash will fail to source /dev/null (special files
3144  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3145  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3146    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3147$as_echo "$as_me: loading cache $cache_file" >&6;}
3148    case $cache_file in
3149      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3150      *)                      . "./$cache_file";;
3151    esac
3152  fi
3153else
3154  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3155$as_echo "$as_me: creating cache $cache_file" >&6;}
3156  >$cache_file
3157fi
3158
3159# Check that the precious variables saved in the cache have kept the same
3160# value.
3161ac_cache_corrupted=false
3162for ac_var in $ac_precious_vars; do
3163  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3164  eval ac_new_set=\$ac_env_${ac_var}_set
3165  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3166  eval ac_new_val=\$ac_env_${ac_var}_value
3167  case $ac_old_set,$ac_new_set in
3168    set,)
3169      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3170$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3171      ac_cache_corrupted=: ;;
3172    ,set)
3173      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3174$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3175      ac_cache_corrupted=: ;;
3176    ,);;
3177    *)
3178      if test "x$ac_old_val" != "x$ac_new_val"; then
3179	# differences in whitespace do not lead to failure.
3180	ac_old_val_w=`echo x $ac_old_val`
3181	ac_new_val_w=`echo x $ac_new_val`
3182	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3183	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3184$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3185	  ac_cache_corrupted=:
3186	else
3187	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3188$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3189	  eval $ac_var=\$ac_old_val
3190	fi
3191	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3192$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3193	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3194$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3195      fi;;
3196  esac
3197  # Pass precious variables to config.status.
3198  if test "$ac_new_set" = set; then
3199    case $ac_new_val in
3200    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3201    *) ac_arg=$ac_var=$ac_new_val ;;
3202    esac
3203    case " $ac_configure_args " in
3204      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3205      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3206    esac
3207  fi
3208done
3209if $ac_cache_corrupted; then
3210  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3212  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3213$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3214  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3215fi
3216## -------------------- ##
3217## Main body of script. ##
3218## -------------------- ##
3219
3220ac_ext=c
3221ac_cpp='$CPP $CPPFLAGS'
3222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3224ac_compiler_gnu=$ac_cv_c_compiler_gnu
3225
3226
3227
3228ac_aux_dir=
3229for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3230  if test -f "$ac_dir/install-sh"; then
3231    ac_aux_dir=$ac_dir
3232    ac_install_sh="$ac_aux_dir/install-sh -c"
3233    break
3234  elif test -f "$ac_dir/install.sh"; then
3235    ac_aux_dir=$ac_dir
3236    ac_install_sh="$ac_aux_dir/install.sh -c"
3237    break
3238  elif test -f "$ac_dir/shtool"; then
3239    ac_aux_dir=$ac_dir
3240    ac_install_sh="$ac_aux_dir/shtool install -c"
3241    break
3242  fi
3243done
3244if test -z "$ac_aux_dir"; then
3245  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
3246fi
3247
3248# These three variables are undocumented and unsupported,
3249# and are intended to be withdrawn in a future Autoconf release.
3250# They can cause serious problems if a builder's source tree is in a directory
3251# whose full name contains unusual characters.
3252ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3253ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3254ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3255
3256
3257# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3258
3259#
3260# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3262#
3263# This code is free software; you can redistribute it and/or modify it
3264# under the terms of the GNU General Public License version 2 only, as
3265# published by the Free Software Foundation.  Oracle designates this
3266# particular file as subject to the "Classpath" exception as provided
3267# by Oracle in the LICENSE file that accompanied this code.
3268#
3269# This code is distributed in the hope that it will be useful, but WITHOUT
3270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3272# version 2 for more details (a copy is included in the LICENSE file that
3273# accompanied this code).
3274#
3275# You should have received a copy of the GNU General Public License version
3276# 2 along with this work; if not, write to the Free Software Foundation,
3277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3278#
3279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3280# or visit www.oracle.com if you need additional information or have any
3281# questions.
3282#
3283
3284#
3285# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3286#
3287# This program is free software; you can redistribute it and/or modify
3288# it under the terms of the GNU General Public License as published by
3289# the Free Software Foundation; either version 2 of the License, or
3290# (at your option) any later version.
3291#
3292# This program is distributed in the hope that it will be useful, but
3293# WITHOUT ANY WARRANTY; without even the implied warranty of
3294# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3295# General Public License for more details.
3296#
3297# You should have received a copy of the GNU General Public License
3298# along with this program; if not, write to the Free Software
3299# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3300#
3301# As a special exception to the GNU General Public License, if you
3302# distribute this file as part of a program that contains a
3303# configuration script generated by Autoconf, you may include it under
3304# the same distribution terms that you use for the rest of that program.
3305
3306# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3307# ----------------------------------
3308# PKG_PROG_PKG_CONFIG
3309
3310# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3311#
3312# Check to see whether a particular set of modules exists.  Similar
3313# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3314#
3315#
3316# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3317# this or PKG_CHECK_MODULES is called, or make sure to call
3318# PKG_CHECK_EXISTS manually
3319# --------------------------------------------------------------
3320
3321
3322
3323# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3324# ---------------------------------------------
3325# _PKG_CONFIG
3326
3327# _PKG_SHORT_ERRORS_SUPPORTED
3328# -----------------------------
3329# _PKG_SHORT_ERRORS_SUPPORTED
3330
3331
3332# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3333# [ACTION-IF-NOT-FOUND])
3334#
3335#
3336# Note that if there is a possibility the first call to
3337# PKG_CHECK_MODULES might not happen, you should be sure to include an
3338# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3339#
3340#
3341# --------------------------------------------------------------
3342# PKG_CHECK_MODULES
3343
3344
3345# Include these first...
3346#
3347# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3348# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3349#
3350# This code is free software; you can redistribute it and/or modify it
3351# under the terms of the GNU General Public License version 2 only, as
3352# published by the Free Software Foundation.  Oracle designates this
3353# particular file as subject to the "Classpath" exception as provided
3354# by Oracle in the LICENSE file that accompanied this code.
3355#
3356# This code is distributed in the hope that it will be useful, but WITHOUT
3357# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3358# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3359# version 2 for more details (a copy is included in the LICENSE file that
3360# accompanied this code).
3361#
3362# You should have received a copy of the GNU General Public License version
3363# 2 along with this work; if not, write to the Free Software Foundation,
3364# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3365#
3366# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3367# or visit www.oracle.com if you need additional information or have any
3368# questions.
3369#
3370
3371# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3372# If so, then append $1 to $2 \
3373# Also set JVM_ARG_OK to true/false depending on outcome.
3374
3375
3376# Appends a string to a path variable, only adding the : when needed.
3377
3378
3379# Prepends a string to a path variable, only adding the : when needed.
3380
3381
3382# This will make sure the given variable points to a full and proper
3383# path. This means:
3384# 1) There will be no spaces in the path. On unix platforms,
3385#    spaces in the path will result in an error. On Windows,
3386#    the path will be rewritten using short-style to be space-free.
3387# 2) The path will be absolute, and it will be in unix-style (on
3388#     cygwin).
3389# $1: The name of the variable to fix
3390
3391
3392# This will make sure the given variable points to a executable
3393# with a full and proper path. This means:
3394# 1) There will be no spaces in the path. On unix platforms,
3395#    spaces in the path will result in an error. On Windows,
3396#    the path will be rewritten using short-style to be space-free.
3397# 2) The path will be absolute, and it will be in unix-style (on
3398#     cygwin).
3399# Any arguments given to the executable is preserved.
3400# If the input variable does not have a directory specification, then
3401# it need to be in the PATH.
3402# $1: The name of the variable to fix
3403
3404
3405
3406
3407# Register a --with argument but mark it as deprecated
3408# $1: The name of the with argument to deprecate, not including --with-
3409
3410
3411# Register a --enable argument but mark it as deprecated
3412# $1: The name of the with argument to deprecate, not including --enable-
3413# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3414
3415
3416
3417
3418# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3419# $1: variable to check
3420
3421
3422# Check that there are no unprocessed overridden variables left.
3423# If so, they are an incorrect argument and we will exit with an error.
3424
3425
3426# Setup a tool for the given variable. If correctly specified by the user,
3427# use that value, otherwise search for the tool using the supplied code snippet.
3428# $1: variable to set
3429# $2: code snippet to call to look for the tool
3430
3431
3432# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3433# $1: variable to set
3434# $2: executable name (or list of names) to look for
3435
3436
3437# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3438# $1: variable to set
3439# $2: executable name (or list of names) to look for
3440
3441
3442# Like BASIC_PATH_PROGS but fails if no tool was found.
3443# $1: variable to set
3444# $2: executable name (or list of names) to look for
3445
3446
3447# Like BASIC_SETUP_TOOL but fails if no tool was found.
3448# $1: variable to set
3449# $2: autoconf macro to call to look for the special tool
3450
3451
3452# Setup the most fundamental tools that relies on not much else to set up,
3453# but is used by much of the early bootstrap code.
3454
3455
3456# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3457
3458
3459# Evaluates platform specific overrides for devkit variables.
3460# $1: Name of variable
3461
3462
3463
3464
3465
3466
3467#%%% Simple tools %%%
3468
3469# Check if we have found a usable version of make
3470# $1: the path to a potential make binary (or empty)
3471# $2: the description on how we found this
3472
3473
3474
3475
3476# Goes looking for a usable version of GNU make.
3477
3478
3479
3480
3481
3482
3483# Check if build directory is on local disk. If not possible to determine,
3484# we prefer to claim it's local.
3485# Argument 1: directory to test
3486# Argument 2: what to do if it is on local disk
3487# Argument 3: what to do otherwise (remote disk or failure)
3488
3489
3490# Check that source files have basic read permissions set. This might
3491# not be the case in cygwin in certain conditions.
3492
3493
3494
3495
3496# Check for support for specific options in bash
3497
3498
3499# Code to run after AC_OUTPUT
3500
3501
3502#
3503# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3504# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3505#
3506# This code is free software; you can redistribute it and/or modify it
3507# under the terms of the GNU General Public License version 2 only, as
3508# published by the Free Software Foundation.  Oracle designates this
3509# particular file as subject to the "Classpath" exception as provided
3510# by Oracle in the LICENSE file that accompanied this code.
3511#
3512# This code is distributed in the hope that it will be useful, but WITHOUT
3513# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3514# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3515# version 2 for more details (a copy is included in the LICENSE file that
3516# accompanied this code).
3517#
3518# You should have received a copy of the GNU General Public License version
3519# 2 along with this work; if not, write to the Free Software Foundation,
3520# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3521#
3522# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3523# or visit www.oracle.com if you need additional information or have any
3524# questions.
3525#
3526
3527
3528
3529
3530
3531# Helper function which possibly converts a path using DOS-style short mode.
3532# If so, the updated path is stored in $new_path.
3533# $1: The path to check
3534
3535
3536# Helper function which possibly converts a path using DOS-style short mode.
3537# If so, the updated path is stored in $new_path.
3538# $1: The path to check
3539
3540
3541# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3542# and could probably be heavily simplified. However, all changes in this
3543# area tend to need lot of testing in different scenarios, and in lack of
3544# proper unit testing, cleaning this up has not been deemed worth the effort
3545# at the moment.
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3556
3557
3558
3559
3560#
3561# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3562# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3563#
3564# This code is free software; you can redistribute it and/or modify it
3565# under the terms of the GNU General Public License version 2 only, as
3566# published by the Free Software Foundation.  Oracle designates this
3567# particular file as subject to the "Classpath" exception as provided
3568# by Oracle in the LICENSE file that accompanied this code.
3569#
3570# This code is distributed in the hope that it will be useful, but WITHOUT
3571# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3572# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3573# version 2 for more details (a copy is included in the LICENSE file that
3574# accompanied this code).
3575#
3576# You should have received a copy of the GNU General Public License version
3577# 2 along with this work; if not, write to the Free Software Foundation,
3578# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3579#
3580# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3581# or visit www.oracle.com if you need additional information or have any
3582# questions.
3583#
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595# ... then the rest
3596#
3597# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599#
3600# This code is free software; you can redistribute it and/or modify it
3601# under the terms of the GNU General Public License version 2 only, as
3602# published by the Free Software Foundation.  Oracle designates this
3603# particular file as subject to the "Classpath" exception as provided
3604# by Oracle in the LICENSE file that accompanied this code.
3605#
3606# This code is distributed in the hope that it will be useful, but WITHOUT
3607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3609# version 2 for more details (a copy is included in the LICENSE file that
3610# accompanied this code).
3611#
3612# You should have received a copy of the GNU General Public License version
3613# 2 along with this work; if not, write to the Free Software Foundation,
3614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615#
3616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617# or visit www.oracle.com if you need additional information or have any
3618# questions.
3619#
3620
3621########################################################################
3622# This file handles detection of the Boot JDK. The Boot JDK detection
3623# process has been developed as a response to solve a complex real-world
3624# problem. Initially, it was simple, but it has grown as platform after
3625# platform, idiosyncracy after idiosyncracy has been supported.
3626#
3627# The basic idea is this:
3628# 1) You need an acceptable *) JDK to use as a Boot JDK
3629# 2) There are several ways to locate a JDK, that are mostly platform
3630#    dependent **)
3631# 3) You can have multiple JDKs installed
3632# 4) If possible, configure should try to dig out an acceptable JDK
3633#    automatically, without having to resort to command-line options
3634#
3635# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3636#     javac) and not a JRE, etc.
3637#
3638# **) On Windows we typically use a well-known path.
3639#     On MacOSX we typically use the tool java_home.
3640#     On Linux we typically find javac in the $PATH, and then follow a
3641#     chain of symlinks that often ends up in a real JDK.
3642#
3643# This leads to the code where we check in different ways to locate a
3644# JDK, and if one is found, check if it is acceptable. If not, we print
3645# our reasons for rejecting it (useful when debugging non-working
3646# configure situations) and continue checking the next one.
3647########################################################################
3648
3649# Execute the check given as argument, and verify the result
3650# If the Boot JDK was previously found, do nothing
3651# $1 A command line (typically autoconf macro) to execute
3652
3653
3654# Test: Is bootjdk explicitely set by command line arguments?
3655
3656
3657# Test: Is bootjdk available from builddeps?
3658
3659
3660# Test: Is $JAVA_HOME set?
3661
3662
3663# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3664
3665
3666# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3667# $1: Argument to the java_home binary (optional)
3668
3669
3670# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3671
3672
3673# Look for a jdk in the given path. If there are multiple, try to select the newest.
3674# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3675# $1 = Path to directory containing jdk installations.
3676# $2 = String to append to the found JDK directory to get the proper JDK home
3677
3678
3679# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3680# environmental variable as base for where to look.
3681# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3682
3683
3684# Test: Is there a JDK installed in default, well-known locations?
3685
3686
3687# Check that a command-line tool in the Boot JDK is correct
3688# $1 = name of variable to assign
3689# $2 = name of binary
3690
3691
3692###############################################################################
3693#
3694# We need a Boot JDK to bootstrap the build.
3695#
3696
3697
3698
3699
3700
3701#
3702# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3703# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3704#
3705# This code is free software; you can redistribute it and/or modify it
3706# under the terms of the GNU General Public License version 2 only, as
3707# published by the Free Software Foundation.  Oracle designates this
3708# particular file as subject to the "Classpath" exception as provided
3709# by Oracle in the LICENSE file that accompanied this code.
3710#
3711# This code is distributed in the hope that it will be useful, but WITHOUT
3712# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3713# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3714# version 2 for more details (a copy is included in the LICENSE file that
3715# accompanied this code).
3716#
3717# You should have received a copy of the GNU General Public License version
3718# 2 along with this work; if not, write to the Free Software Foundation,
3719# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3720#
3721# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3722# or visit www.oracle.com if you need additional information or have any
3723# questions.
3724#
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745#
3746# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3748#
3749# This code is free software; you can redistribute it and/or modify it
3750# under the terms of the GNU General Public License version 2 only, as
3751# published by the Free Software Foundation.  Oracle designates this
3752# particular file as subject to the "Classpath" exception as provided
3753# by Oracle in the LICENSE file that accompanied this code.
3754#
3755# This code is distributed in the hope that it will be useful, but WITHOUT
3756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3758# version 2 for more details (a copy is included in the LICENSE file that
3759# accompanied this code).
3760#
3761# You should have received a copy of the GNU General Public License version
3762# 2 along with this work; if not, write to the Free Software Foundation,
3763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3764#
3765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3766# or visit www.oracle.com if you need additional information or have any
3767# questions.
3768#
3769
3770
3771
3772
3773
3774# Documentation on common flags used for solstudio in HIGHEST.
3775#
3776# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3777#          done with care, there are some assumptions below that need to
3778#          be understood about the use of pointers, and IEEE behavior.
3779#
3780# -fns: Use non-standard floating point mode (not IEEE 754)
3781# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3782# -fsingle: Use single precision floating point with 'float'
3783# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3784#   (Source with excessing pointer casting and data access with mixed
3785#    pointer types are not recommended)
3786# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3787#   (If you expect perfect errno behavior, do not use this)
3788# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3789# -xrestrict: Pointer parameters to functions do not overlap
3790#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3791#    If you pass in multiple pointers to the same data, do not use this)
3792# -xlibmil: Inline some library routines
3793#   (If you expect perfect errno behavior, do not use this)
3794# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3795#   (If you expect perfect errno behavior, do not use this)
3796#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3797
3798    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3799    # Bug?
3800    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3801    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3802    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3803    #fi
3804
3805
3806
3807
3808
3809# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3810#                                   [RUN-IF-FALSE])
3811# ------------------------------------------------------------
3812# Check that the c and c++ compilers support an argument
3813
3814
3815# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3816#                                    [RUN-IF-FALSE])
3817# ------------------------------------------------------------
3818# Check that the linker support an argument
3819
3820
3821
3822
3823#
3824# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3825# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3826#
3827# This code is free software; you can redistribute it and/or modify it
3828# under the terms of the GNU General Public License version 2 only, as
3829# published by the Free Software Foundation.  Oracle designates this
3830# particular file as subject to the "Classpath" exception as provided
3831# by Oracle in the LICENSE file that accompanied this code.
3832#
3833# This code is distributed in the hope that it will be useful, but WITHOUT
3834# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3835# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3836# version 2 for more details (a copy is included in the LICENSE file that
3837# accompanied this code).
3838#
3839# You should have received a copy of the GNU General Public License version
3840# 2 along with this work; if not, write to the Free Software Foundation,
3841# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3842#
3843# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3844# or visit www.oracle.com if you need additional information or have any
3845# questions.
3846#
3847
3848
3849
3850
3851
3852cygwin_help() {
3853  case $1 in
3854    unzip)
3855      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3856      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3857      ;;
3858    zip)
3859      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3860      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3861      ;;
3862    make)
3863      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3864      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3865      ;;
3866    freetype)
3867      HELP_MSG="
3868The freetype library can now be build during the configure process.
3869Download the freetype sources and unpack them into an arbitrary directory:
3870
3871wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3872tar -xzf freetype-2.5.3.tar.gz
3873
3874Then run configure with '--with-freetype-src=<freetype_src>'. This will
3875automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3876builds or into '<freetype_src>/lib32' for 32-bit builds.
3877Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3878and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3879      ;;
3880  esac
3881}
3882
3883msys_help() {
3884  PKGHANDLER_COMMAND=""
3885}
3886
3887apt_help() {
3888  case $1 in
3889    devkit)
3890      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3891    openjdk)
3892      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3893    alsa)
3894      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3895    cups)
3896      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3897    freetype)
3898      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3899    pulse)
3900      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3901    x11)
3902      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3903    ccache)
3904      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3905  esac
3906}
3907
3908yum_help() {
3909  case $1 in
3910    devkit)
3911      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3912    openjdk)
3913      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3914    alsa)
3915      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3916    cups)
3917      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3918    freetype)
3919      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3920    pulse)
3921      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3922    x11)
3923      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3924    ccache)
3925      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3926  esac
3927}
3928
3929port_help() {
3930  PKGHANDLER_COMMAND=""
3931}
3932
3933pkgutil_help() {
3934  PKGHANDLER_COMMAND=""
3935}
3936
3937pkgadd_help() {
3938  PKGHANDLER_COMMAND=""
3939}
3940
3941# This function will check if we're called from the "configure" wrapper while
3942# printing --help. If so, we will print out additional information that can
3943# only be extracted within the autoconf script, and then exit. This must be
3944# called at the very beginning in configure.ac.
3945
3946
3947
3948
3949
3950
3951#
3952# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3953# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3954#
3955# This code is free software; you can redistribute it and/or modify it
3956# under the terms of the GNU General Public License version 2 only, as
3957# published by the Free Software Foundation.  Oracle designates this
3958# particular file as subject to the "Classpath" exception as provided
3959# by Oracle in the LICENSE file that accompanied this code.
3960#
3961# This code is distributed in the hope that it will be useful, but WITHOUT
3962# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3963# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3964# version 2 for more details (a copy is included in the LICENSE file that
3965# accompanied this code).
3966#
3967# You should have received a copy of the GNU General Public License version
3968# 2 along with this work; if not, write to the Free Software Foundation,
3969# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3970#
3971# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3972# or visit www.oracle.com if you need additional information or have any
3973# questions.
3974#
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985###############################################################################
3986#
3987# Should we build only OpenJDK even if closed sources are present?
3988#
3989
3990
3991
3992
3993###############################################################################
3994#
3995# Setup version numbers
3996#
3997
3998
3999
4000
4001
4002
4003################################################################################
4004#
4005# Gcov coverage data for hotspot
4006#
4007
4008
4009#
4010# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4011# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4012#
4013# This code is free software; you can redistribute it and/or modify it
4014# under the terms of the GNU General Public License version 2 only, as
4015# published by the Free Software Foundation.  Oracle designates this
4016# particular file as subject to the "Classpath" exception as provided
4017# by Oracle in the LICENSE file that accompanied this code.
4018#
4019# This code is distributed in the hope that it will be useful, but WITHOUT
4020# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4021# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4022# version 2 for more details (a copy is included in the LICENSE file that
4023# accompanied this code).
4024#
4025# You should have received a copy of the GNU General Public License version
4026# 2 along with this work; if not, write to the Free Software Foundation,
4027# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4028#
4029# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4030# or visit www.oracle.com if you need additional information or have any
4031# questions.
4032#
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054#
4055# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4056# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4057#
4058# This code is free software; you can redistribute it and/or modify it
4059# under the terms of the GNU General Public License version 2 only, as
4060# published by the Free Software Foundation.  Oracle designates this
4061# particular file as subject to the "Classpath" exception as provided
4062# by Oracle in the LICENSE file that accompanied this code.
4063#
4064# This code is distributed in the hope that it will be useful, but WITHOUT
4065# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4066# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4067# version 2 for more details (a copy is included in the LICENSE file that
4068# accompanied this code).
4069#
4070# You should have received a copy of the GNU General Public License version
4071# 2 along with this work; if not, write to the Free Software Foundation,
4072# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4073#
4074# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4075# or visit www.oracle.com if you need additional information or have any
4076# questions.
4077#
4078
4079# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4080# Converts autoconf style CPU name to OpenJDK style, into
4081# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4082
4083
4084# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4085# Converts autoconf style OS name to OpenJDK style, into
4086# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4087
4088
4089# Expects $host_os $host_cpu $build_os and $build_cpu
4090# and $with_target_bits to have been setup!
4091#
4092# Translate the standard triplet(quadruplet) definition
4093# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4094# OPENJDK_BUILD_OS, etc.
4095
4096
4097# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4098# accordingly. Must be done after setting up build and target system, but before
4099# doing anything else with these values.
4100
4101
4102# Setup the legacy variables, for controlling the old makefiles.
4103#
4104
4105
4106
4107
4108#%%% Build and target systems %%%
4109
4110
4111
4112
4113# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4114# Add -mX to various FLAGS variables.
4115
4116
4117
4118
4119
4120
4121#
4122# Copyright (c) 2011, 2012, 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
4148
4149
4150
4151
4152
4153#
4154# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4155# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4156#
4157# This code is free software; you can redistribute it and/or modify it
4158# under the terms of the GNU General Public License version 2 only, as
4159# published by the Free Software Foundation.  Oracle designates this
4160# particular file as subject to the "Classpath" exception as provided
4161# by Oracle in the LICENSE file that accompanied this code.
4162#
4163# This code is distributed in the hope that it will be useful, but WITHOUT
4164# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4165# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4166# version 2 for more details (a copy is included in the LICENSE file that
4167# accompanied this code).
4168#
4169# You should have received a copy of the GNU General Public License version
4170# 2 along with this work; if not, write to the Free Software Foundation,
4171# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4172#
4173# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4174# or visit www.oracle.com if you need additional information or have any
4175# questions.
4176#
4177
4178########################################################################
4179# This file is responsible for detecting, verifying and setting up the
4180# toolchain, i.e. the compiler, linker and related utilities. It will setup
4181# proper paths to the binaries, but it will not setup any flags.
4182#
4183# The binaries used is determined by the toolchain type, which is the family of
4184# compilers and related tools that are used.
4185########################################################################
4186
4187
4188# All valid toolchains, regardless of platform (used by help.m4)
4189VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4190
4191# These toolchains are valid on different platforms
4192VALID_TOOLCHAINS_linux="gcc clang"
4193VALID_TOOLCHAINS_solaris="solstudio"
4194VALID_TOOLCHAINS_macosx="gcc clang"
4195VALID_TOOLCHAINS_aix="xlc"
4196VALID_TOOLCHAINS_windows="microsoft"
4197
4198# Toolchain descriptions
4199TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4200TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4201TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4202TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4203TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4204
4205# Setup a number of variables describing how native output files are
4206# named on this platform/toolchain.
4207
4208
4209# Determine which toolchain type to use, and make sure it is valid for this
4210# platform. Setup various information about the selected toolchain.
4211
4212
4213# Before we start detecting the toolchain executables, we might need some
4214# special setup, e.g. additional paths etc.
4215
4216
4217# Restore path, etc
4218
4219
4220# Check if a compiler is of the toolchain type we expect, and save the version
4221# information from it. If the compiler does not match the expected type,
4222# this function will abort using AC_MSG_ERROR. If it matches, the version will
4223# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4224# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4225#
4226# $1 = compiler to test (CC or CXX)
4227# $2 = human readable name of compiler (C or C++)
4228
4229
4230# Try to locate the given C or C++ compiler in the path, or otherwise.
4231#
4232# $1 = compiler to test (CC or CXX)
4233# $2 = human readable name of compiler (C or C++)
4234# $3 = list of compiler names to search for
4235
4236
4237# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4238# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4239# archiver (AR). Verify that the compilers are correct according to the
4240# toolchain type.
4241
4242
4243# Setup additional tools that is considered a part of the toolchain, but not the
4244# core part. Many of these are highly platform-specific and do not exist,
4245# and/or are not needed on all platforms.
4246
4247
4248# Setup the build tools (i.e, the compiler and linker used to build programs
4249# that should be run on the build platform, not the target platform, as a build
4250# helper). Since the non-cross-compile case uses the normal, target compilers
4251# for this, we can only do this after these have been setup.
4252
4253
4254# Setup legacy variables that are still needed as alternative ways to refer to
4255# parts of the toolchain.
4256
4257
4258# Do some additional checks on the detected tools.
4259
4260
4261# Setup the JTReg Regression Test Harness.
4262
4263
4264#
4265# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4266# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4267#
4268# This code is free software; you can redistribute it and/or modify it
4269# under the terms of the GNU General Public License version 2 only, as
4270# published by the Free Software Foundation.  Oracle designates this
4271# particular file as subject to the "Classpath" exception as provided
4272# by Oracle in the LICENSE file that accompanied this code.
4273#
4274# This code is distributed in the hope that it will be useful, but WITHOUT
4275# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4276# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4277# version 2 for more details (a copy is included in the LICENSE file that
4278# accompanied this code).
4279#
4280# You should have received a copy of the GNU General Public License version
4281# 2 along with this work; if not, write to the Free Software Foundation,
4282# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4283#
4284# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4285# or visit www.oracle.com if you need additional information or have any
4286# questions.
4287#
4288
4289################################################################################
4290# The order of these defines the priority by which we try to find them.
4291VALID_VS_VERSIONS="2013 2012 2010"
4292
4293VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4294VS_VERSION_INTERNAL_2010=100
4295VS_MSVCR_2010=msvcr100.dll
4296# We don't use msvcp on Visual Studio 2010
4297#VS_MSVCP_2010=msvcp100.dll
4298VS_ENVVAR_2010="VS100COMNTOOLS"
4299VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4300VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4301VS_VS_PLATFORM_NAME_2010="v100"
4302VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4303
4304VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4305VS_VERSION_INTERNAL_2012=110
4306VS_MSVCR_2012=msvcr110.dll
4307VS_MSVCP_2012=msvcp110.dll
4308VS_ENVVAR_2012="VS110COMNTOOLS"
4309VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4310VS_SDK_INSTALLDIR_2012=
4311VS_VS_PLATFORM_NAME_2012="v110"
4312VS_SDK_PLATFORM_NAME_2012=
4313
4314VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4315VS_VERSION_INTERNAL_2013=120
4316VS_MSVCR_2013=msvcr120.dll
4317VS_MSVCP_2013=msvcp120.dll
4318VS_ENVVAR_2013="VS120COMNTOOLS"
4319VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4320VS_SDK_INSTALLDIR_2013=
4321VS_VS_PLATFORM_NAME_2013="v120"
4322VS_SDK_PLATFORM_NAME_2013=
4323
4324################################################################################
4325
4326
4327
4328################################################################################
4329
4330
4331
4332################################################################################
4333# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4334# build environment and assigns it to VS_ENV_CMD
4335
4336
4337################################################################################
4338
4339
4340
4341################################################################################
4342# Check if the VS env variables were setup prior to running configure.
4343# If not, then find vcvarsall.bat and run it automatically, and integrate
4344# the set env variables into the spec file.
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359# This line needs to be here, verbatim, after all includes and the dummy hook
4360# definitions. It is replaced with custom functionality when building
4361# custom sources.
4362#CUSTOM_AUTOCONF_INCLUDE
4363
4364# Do not change or remove the following line, it is needed for consistency checks:
4365DATE_WHEN_GENERATED=1442820958
4366
4367###############################################################################
4368#
4369# Initialization / Boot-strapping
4370#
4371# The bootstrapping process needs to solve the "chicken or the egg" problem,
4372# thus it jumps back and forth, each time gaining something needed later on.
4373#
4374###############################################################################
4375
4376# If we are requested to print additional help, do that and then exit.
4377# This must be the very first call.
4378
4379  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4380    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4381    $PRINTF "Which are valid to use depends on the build platform.\n"
4382    for toolchain in $VALID_TOOLCHAINS_all; do
4383      # Use indirect variable referencing
4384      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4385      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4386      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4387    done
4388
4389    # And now exit directly
4390    exit 0
4391  fi
4392
4393
4394# Basic initialization that must happen first of all in the normal process.
4395
4396  # Save the original command line. This is passed to us by the wrapper configure script.
4397
4398  # Save the path variable before it gets changed
4399  ORIGINAL_PATH="$PATH"
4400
4401  DATE_WHEN_CONFIGURED=`LANG=C date`
4402
4403  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4404$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4406$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4407
4408
4409  # Start with tools that do not need have cross compilation support
4410  # and can be expected to be found in the default PATH. These tools are
4411  # used by configure. Nor are these tools expected to be found in the
4412  # devkit from the builddeps server either, since they are
4413  # needed to download the devkit.
4414
4415  # First are all the simple required tools.
4416
4417
4418
4419  # Publish this variable in the help.
4420
4421
4422  if test "x$BASENAME" = x; then
4423    # The variable is not set by user, try to locate tool using the code snippet
4424    for ac_prog in basename
4425do
4426  # Extract the first word of "$ac_prog", so it can be a program name with args.
4427set dummy $ac_prog; ac_word=$2
4428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4429$as_echo_n "checking for $ac_word... " >&6; }
4430if ${ac_cv_path_BASENAME+:} false; then :
4431  $as_echo_n "(cached) " >&6
4432else
4433  case $BASENAME in
4434  [\\/]* | ?:[\\/]*)
4435  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4436  ;;
4437  *)
4438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in $PATH
4440do
4441  IFS=$as_save_IFS
4442  test -z "$as_dir" && as_dir=.
4443    for ac_exec_ext in '' $ac_executable_extensions; do
4444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4445    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447    break 2
4448  fi
4449done
4450  done
4451IFS=$as_save_IFS
4452
4453  ;;
4454esac
4455fi
4456BASENAME=$ac_cv_path_BASENAME
4457if test -n "$BASENAME"; then
4458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4459$as_echo "$BASENAME" >&6; }
4460else
4461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462$as_echo "no" >&6; }
4463fi
4464
4465
4466  test -n "$BASENAME" && break
4467done
4468
4469  else
4470    # The variable is set, but is it from the command line or the environment?
4471
4472    # Try to remove the string !BASENAME! from our list.
4473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4475      # If it failed, the variable was not from the command line. Ignore it,
4476      # but warn the user (except for BASH, which is always set by the calling BASH).
4477      if test "xBASENAME" != xBASH; then
4478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4479$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4480      fi
4481      # Try to locate tool using the code snippet
4482      for ac_prog in basename
4483do
4484  # Extract the first word of "$ac_prog", so it can be a program name with args.
4485set dummy $ac_prog; ac_word=$2
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487$as_echo_n "checking for $ac_word... " >&6; }
4488if ${ac_cv_path_BASENAME+:} false; then :
4489  $as_echo_n "(cached) " >&6
4490else
4491  case $BASENAME in
4492  [\\/]* | ?:[\\/]*)
4493  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4494  ;;
4495  *)
4496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in $PATH
4498do
4499  IFS=$as_save_IFS
4500  test -z "$as_dir" && as_dir=.
4501    for ac_exec_ext in '' $ac_executable_extensions; do
4502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4503    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4505    break 2
4506  fi
4507done
4508  done
4509IFS=$as_save_IFS
4510
4511  ;;
4512esac
4513fi
4514BASENAME=$ac_cv_path_BASENAME
4515if test -n "$BASENAME"; then
4516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4517$as_echo "$BASENAME" >&6; }
4518else
4519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4520$as_echo "no" >&6; }
4521fi
4522
4523
4524  test -n "$BASENAME" && break
4525done
4526
4527    else
4528      # If it succeeded, then it was overridden by the user. We will use it
4529      # for the tool.
4530
4531      # First remove it from the list of overridden variables, so we can test
4532      # for unknown variables in the end.
4533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4534
4535      # Check if the provided tool contains a complete path.
4536      tool_specified="$BASENAME"
4537      tool_basename="${tool_specified##*/}"
4538      if test "x$tool_basename" = "x$tool_specified"; then
4539        # A command without a complete path is provided, search $PATH.
4540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4541$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4542        # Extract the first word of "$tool_basename", so it can be a program name with args.
4543set dummy $tool_basename; ac_word=$2
4544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4545$as_echo_n "checking for $ac_word... " >&6; }
4546if ${ac_cv_path_BASENAME+:} false; then :
4547  $as_echo_n "(cached) " >&6
4548else
4549  case $BASENAME in
4550  [\\/]* | ?:[\\/]*)
4551  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4552  ;;
4553  *)
4554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555for as_dir in $PATH
4556do
4557  IFS=$as_save_IFS
4558  test -z "$as_dir" && as_dir=.
4559    for ac_exec_ext in '' $ac_executable_extensions; do
4560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4561    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4563    break 2
4564  fi
4565done
4566  done
4567IFS=$as_save_IFS
4568
4569  ;;
4570esac
4571fi
4572BASENAME=$ac_cv_path_BASENAME
4573if test -n "$BASENAME"; then
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4575$as_echo "$BASENAME" >&6; }
4576else
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4578$as_echo "no" >&6; }
4579fi
4580
4581
4582        if test "x$BASENAME" = x; then
4583          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4584        fi
4585      else
4586        # Otherwise we believe it is a complete path. Use it as it is.
4587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4588$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4590$as_echo_n "checking for BASENAME... " >&6; }
4591        if test ! -x "$tool_specified"; then
4592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4593$as_echo "not found" >&6; }
4594          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4595        fi
4596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4597$as_echo "$tool_specified" >&6; }
4598      fi
4599    fi
4600  fi
4601
4602
4603
4604  if test "x$BASENAME" = x; then
4605    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4606  fi
4607
4608
4609
4610
4611
4612  # Publish this variable in the help.
4613
4614
4615  if test "x$BASH" = x; then
4616    # The variable is not set by user, try to locate tool using the code snippet
4617    for ac_prog in bash
4618do
4619  # Extract the first word of "$ac_prog", so it can be a program name with args.
4620set dummy $ac_prog; ac_word=$2
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
4623if ${ac_cv_path_BASH+:} false; then :
4624  $as_echo_n "(cached) " >&6
4625else
4626  case $BASH in
4627  [\\/]* | ?:[\\/]*)
4628  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4629  ;;
4630  *)
4631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4632for as_dir in $PATH
4633do
4634  IFS=$as_save_IFS
4635  test -z "$as_dir" && as_dir=.
4636    for ac_exec_ext in '' $ac_executable_extensions; do
4637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4638    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4640    break 2
4641  fi
4642done
4643  done
4644IFS=$as_save_IFS
4645
4646  ;;
4647esac
4648fi
4649BASH=$ac_cv_path_BASH
4650if test -n "$BASH"; then
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4652$as_echo "$BASH" >&6; }
4653else
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
4656fi
4657
4658
4659  test -n "$BASH" && break
4660done
4661
4662  else
4663    # The variable is set, but is it from the command line or the environment?
4664
4665    # Try to remove the string !BASH! from our list.
4666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4668      # If it failed, the variable was not from the command line. Ignore it,
4669      # but warn the user (except for BASH, which is always set by the calling BASH).
4670      if test "xBASH" != xBASH; then
4671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4672$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4673      fi
4674      # Try to locate tool using the code snippet
4675      for ac_prog in bash
4676do
4677  # Extract the first word of "$ac_prog", so it can be a program name with args.
4678set dummy $ac_prog; ac_word=$2
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
4681if ${ac_cv_path_BASH+:} false; then :
4682  $as_echo_n "(cached) " >&6
4683else
4684  case $BASH in
4685  [\\/]* | ?:[\\/]*)
4686  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4687  ;;
4688  *)
4689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in $PATH
4691do
4692  IFS=$as_save_IFS
4693  test -z "$as_dir" && as_dir=.
4694    for ac_exec_ext in '' $ac_executable_extensions; do
4695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4696    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698    break 2
4699  fi
4700done
4701  done
4702IFS=$as_save_IFS
4703
4704  ;;
4705esac
4706fi
4707BASH=$ac_cv_path_BASH
4708if test -n "$BASH"; then
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4710$as_echo "$BASH" >&6; }
4711else
4712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716
4717  test -n "$BASH" && break
4718done
4719
4720    else
4721      # If it succeeded, then it was overridden by the user. We will use it
4722      # for the tool.
4723
4724      # First remove it from the list of overridden variables, so we can test
4725      # for unknown variables in the end.
4726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4727
4728      # Check if the provided tool contains a complete path.
4729      tool_specified="$BASH"
4730      tool_basename="${tool_specified##*/}"
4731      if test "x$tool_basename" = "x$tool_specified"; then
4732        # A command without a complete path is provided, search $PATH.
4733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4734$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4735        # Extract the first word of "$tool_basename", so it can be a program name with args.
4736set dummy $tool_basename; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if ${ac_cv_path_BASH+:} false; then :
4740  $as_echo_n "(cached) " >&6
4741else
4742  case $BASH in
4743  [\\/]* | ?:[\\/]*)
4744  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4745  ;;
4746  *)
4747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750  IFS=$as_save_IFS
4751  test -z "$as_dir" && as_dir=.
4752    for ac_exec_ext in '' $ac_executable_extensions; do
4753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4754    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756    break 2
4757  fi
4758done
4759  done
4760IFS=$as_save_IFS
4761
4762  ;;
4763esac
4764fi
4765BASH=$ac_cv_path_BASH
4766if test -n "$BASH"; then
4767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4768$as_echo "$BASH" >&6; }
4769else
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771$as_echo "no" >&6; }
4772fi
4773
4774
4775        if test "x$BASH" = x; then
4776          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4777        fi
4778      else
4779        # Otherwise we believe it is a complete path. Use it as it is.
4780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4781$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4783$as_echo_n "checking for BASH... " >&6; }
4784        if test ! -x "$tool_specified"; then
4785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4786$as_echo "not found" >&6; }
4787          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4788        fi
4789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4790$as_echo "$tool_specified" >&6; }
4791      fi
4792    fi
4793  fi
4794
4795
4796
4797  if test "x$BASH" = x; then
4798    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4799  fi
4800
4801
4802
4803
4804
4805  # Publish this variable in the help.
4806
4807
4808  if test "x$CAT" = x; then
4809    # The variable is not set by user, try to locate tool using the code snippet
4810    for ac_prog in cat
4811do
4812  # Extract the first word of "$ac_prog", so it can be a program name with args.
4813set dummy $ac_prog; ac_word=$2
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
4816if ${ac_cv_path_CAT+:} false; then :
4817  $as_echo_n "(cached) " >&6
4818else
4819  case $CAT in
4820  [\\/]* | ?:[\\/]*)
4821  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4822  ;;
4823  *)
4824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in $PATH
4826do
4827  IFS=$as_save_IFS
4828  test -z "$as_dir" && as_dir=.
4829    for ac_exec_ext in '' $ac_executable_extensions; do
4830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4831    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833    break 2
4834  fi
4835done
4836  done
4837IFS=$as_save_IFS
4838
4839  ;;
4840esac
4841fi
4842CAT=$ac_cv_path_CAT
4843if test -n "$CAT"; then
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4845$as_echo "$CAT" >&6; }
4846else
4847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848$as_echo "no" >&6; }
4849fi
4850
4851
4852  test -n "$CAT" && break
4853done
4854
4855  else
4856    # The variable is set, but is it from the command line or the environment?
4857
4858    # Try to remove the string !CAT! from our list.
4859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4861      # If it failed, the variable was not from the command line. Ignore it,
4862      # but warn the user (except for BASH, which is always set by the calling BASH).
4863      if test "xCAT" != xBASH; then
4864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4865$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4866      fi
4867      # Try to locate tool using the code snippet
4868      for ac_prog in cat
4869do
4870  # Extract the first word of "$ac_prog", so it can be a program name with args.
4871set dummy $ac_prog; ac_word=$2
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4873$as_echo_n "checking for $ac_word... " >&6; }
4874if ${ac_cv_path_CAT+:} false; then :
4875  $as_echo_n "(cached) " >&6
4876else
4877  case $CAT in
4878  [\\/]* | ?:[\\/]*)
4879  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4880  ;;
4881  *)
4882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4883for as_dir in $PATH
4884do
4885  IFS=$as_save_IFS
4886  test -z "$as_dir" && as_dir=.
4887    for ac_exec_ext in '' $ac_executable_extensions; do
4888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4889    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4891    break 2
4892  fi
4893done
4894  done
4895IFS=$as_save_IFS
4896
4897  ;;
4898esac
4899fi
4900CAT=$ac_cv_path_CAT
4901if test -n "$CAT"; then
4902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4903$as_echo "$CAT" >&6; }
4904else
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4906$as_echo "no" >&6; }
4907fi
4908
4909
4910  test -n "$CAT" && break
4911done
4912
4913    else
4914      # If it succeeded, then it was overridden by the user. We will use it
4915      # for the tool.
4916
4917      # First remove it from the list of overridden variables, so we can test
4918      # for unknown variables in the end.
4919      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4920
4921      # Check if the provided tool contains a complete path.
4922      tool_specified="$CAT"
4923      tool_basename="${tool_specified##*/}"
4924      if test "x$tool_basename" = "x$tool_specified"; then
4925        # A command without a complete path is provided, search $PATH.
4926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4927$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4928        # Extract the first word of "$tool_basename", so it can be a program name with args.
4929set dummy $tool_basename; ac_word=$2
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4931$as_echo_n "checking for $ac_word... " >&6; }
4932if ${ac_cv_path_CAT+:} false; then :
4933  $as_echo_n "(cached) " >&6
4934else
4935  case $CAT in
4936  [\\/]* | ?:[\\/]*)
4937  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4938  ;;
4939  *)
4940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941for as_dir in $PATH
4942do
4943  IFS=$as_save_IFS
4944  test -z "$as_dir" && as_dir=.
4945    for ac_exec_ext in '' $ac_executable_extensions; do
4946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4947    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4949    break 2
4950  fi
4951done
4952  done
4953IFS=$as_save_IFS
4954
4955  ;;
4956esac
4957fi
4958CAT=$ac_cv_path_CAT
4959if test -n "$CAT"; then
4960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4961$as_echo "$CAT" >&6; }
4962else
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964$as_echo "no" >&6; }
4965fi
4966
4967
4968        if test "x$CAT" = x; then
4969          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4970        fi
4971      else
4972        # Otherwise we believe it is a complete path. Use it as it is.
4973        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4974$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4976$as_echo_n "checking for CAT... " >&6; }
4977        if test ! -x "$tool_specified"; then
4978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4979$as_echo "not found" >&6; }
4980          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4981        fi
4982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4983$as_echo "$tool_specified" >&6; }
4984      fi
4985    fi
4986  fi
4987
4988
4989
4990  if test "x$CAT" = x; then
4991    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4992  fi
4993
4994
4995
4996
4997
4998  # Publish this variable in the help.
4999
5000
5001  if test "x$CHMOD" = x; then
5002    # The variable is not set by user, try to locate tool using the code snippet
5003    for ac_prog in chmod
5004do
5005  # Extract the first word of "$ac_prog", so it can be a program name with args.
5006set dummy $ac_prog; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
5009if ${ac_cv_path_CHMOD+:} false; then :
5010  $as_echo_n "(cached) " >&6
5011else
5012  case $CHMOD in
5013  [\\/]* | ?:[\\/]*)
5014  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5015  ;;
5016  *)
5017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in $PATH
5019do
5020  IFS=$as_save_IFS
5021  test -z "$as_dir" && as_dir=.
5022    for ac_exec_ext in '' $ac_executable_extensions; do
5023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5024    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5026    break 2
5027  fi
5028done
5029  done
5030IFS=$as_save_IFS
5031
5032  ;;
5033esac
5034fi
5035CHMOD=$ac_cv_path_CHMOD
5036if test -n "$CHMOD"; then
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5038$as_echo "$CHMOD" >&6; }
5039else
5040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041$as_echo "no" >&6; }
5042fi
5043
5044
5045  test -n "$CHMOD" && break
5046done
5047
5048  else
5049    # The variable is set, but is it from the command line or the environment?
5050
5051    # Try to remove the string !CHMOD! from our list.
5052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5054      # If it failed, the variable was not from the command line. Ignore it,
5055      # but warn the user (except for BASH, which is always set by the calling BASH).
5056      if test "xCHMOD" != xBASH; then
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5058$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5059      fi
5060      # Try to locate tool using the code snippet
5061      for ac_prog in chmod
5062do
5063  # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
5067if ${ac_cv_path_CHMOD+:} false; then :
5068  $as_echo_n "(cached) " >&6
5069else
5070  case $CHMOD in
5071  [\\/]* | ?:[\\/]*)
5072  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5073  ;;
5074  *)
5075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078  IFS=$as_save_IFS
5079  test -z "$as_dir" && as_dir=.
5080    for ac_exec_ext in '' $ac_executable_extensions; do
5081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5082    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5084    break 2
5085  fi
5086done
5087  done
5088IFS=$as_save_IFS
5089
5090  ;;
5091esac
5092fi
5093CHMOD=$ac_cv_path_CHMOD
5094if test -n "$CHMOD"; then
5095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5096$as_echo "$CHMOD" >&6; }
5097else
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
5100fi
5101
5102
5103  test -n "$CHMOD" && break
5104done
5105
5106    else
5107      # If it succeeded, then it was overridden by the user. We will use it
5108      # for the tool.
5109
5110      # First remove it from the list of overridden variables, so we can test
5111      # for unknown variables in the end.
5112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5113
5114      # Check if the provided tool contains a complete path.
5115      tool_specified="$CHMOD"
5116      tool_basename="${tool_specified##*/}"
5117      if test "x$tool_basename" = "x$tool_specified"; then
5118        # A command without a complete path is provided, search $PATH.
5119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5120$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5121        # Extract the first word of "$tool_basename", so it can be a program name with args.
5122set dummy $tool_basename; ac_word=$2
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5124$as_echo_n "checking for $ac_word... " >&6; }
5125if ${ac_cv_path_CHMOD+:} false; then :
5126  $as_echo_n "(cached) " >&6
5127else
5128  case $CHMOD in
5129  [\\/]* | ?:[\\/]*)
5130  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5131  ;;
5132  *)
5133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136  IFS=$as_save_IFS
5137  test -z "$as_dir" && as_dir=.
5138    for ac_exec_ext in '' $ac_executable_extensions; do
5139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5140    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142    break 2
5143  fi
5144done
5145  done
5146IFS=$as_save_IFS
5147
5148  ;;
5149esac
5150fi
5151CHMOD=$ac_cv_path_CHMOD
5152if test -n "$CHMOD"; then
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5154$as_echo "$CHMOD" >&6; }
5155else
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161        if test "x$CHMOD" = x; then
5162          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5163        fi
5164      else
5165        # Otherwise we believe it is a complete path. Use it as it is.
5166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5167$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5169$as_echo_n "checking for CHMOD... " >&6; }
5170        if test ! -x "$tool_specified"; then
5171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5172$as_echo "not found" >&6; }
5173          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5176$as_echo "$tool_specified" >&6; }
5177      fi
5178    fi
5179  fi
5180
5181
5182
5183  if test "x$CHMOD" = x; then
5184    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5185  fi
5186
5187
5188
5189
5190
5191  # Publish this variable in the help.
5192
5193
5194  if test "x$CMP" = x; then
5195    # The variable is not set by user, try to locate tool using the code snippet
5196    for ac_prog in cmp
5197do
5198  # Extract the first word of "$ac_prog", so it can be a program name with args.
5199set dummy $ac_prog; ac_word=$2
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5201$as_echo_n "checking for $ac_word... " >&6; }
5202if ${ac_cv_path_CMP+:} false; then :
5203  $as_echo_n "(cached) " >&6
5204else
5205  case $CMP in
5206  [\\/]* | ?:[\\/]*)
5207  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5208  ;;
5209  *)
5210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in $PATH
5212do
5213  IFS=$as_save_IFS
5214  test -z "$as_dir" && as_dir=.
5215    for ac_exec_ext in '' $ac_executable_extensions; do
5216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5217    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5219    break 2
5220  fi
5221done
5222  done
5223IFS=$as_save_IFS
5224
5225  ;;
5226esac
5227fi
5228CMP=$ac_cv_path_CMP
5229if test -n "$CMP"; then
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5231$as_echo "$CMP" >&6; }
5232else
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5234$as_echo "no" >&6; }
5235fi
5236
5237
5238  test -n "$CMP" && break
5239done
5240
5241  else
5242    # The variable is set, but is it from the command line or the environment?
5243
5244    # Try to remove the string !CMP! from our list.
5245    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5246    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5247      # If it failed, the variable was not from the command line. Ignore it,
5248      # but warn the user (except for BASH, which is always set by the calling BASH).
5249      if test "xCMP" != xBASH; then
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5251$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5252      fi
5253      # Try to locate tool using the code snippet
5254      for ac_prog in cmp
5255do
5256  # Extract the first word of "$ac_prog", so it can be a program name with args.
5257set dummy $ac_prog; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
5260if ${ac_cv_path_CMP+:} false; then :
5261  $as_echo_n "(cached) " >&6
5262else
5263  case $CMP in
5264  [\\/]* | ?:[\\/]*)
5265  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5266  ;;
5267  *)
5268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269for as_dir in $PATH
5270do
5271  IFS=$as_save_IFS
5272  test -z "$as_dir" && as_dir=.
5273    for ac_exec_ext in '' $ac_executable_extensions; do
5274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5275    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277    break 2
5278  fi
5279done
5280  done
5281IFS=$as_save_IFS
5282
5283  ;;
5284esac
5285fi
5286CMP=$ac_cv_path_CMP
5287if test -n "$CMP"; then
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5289$as_echo "$CMP" >&6; }
5290else
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }
5293fi
5294
5295
5296  test -n "$CMP" && break
5297done
5298
5299    else
5300      # If it succeeded, then it was overridden by the user. We will use it
5301      # for the tool.
5302
5303      # First remove it from the list of overridden variables, so we can test
5304      # for unknown variables in the end.
5305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5306
5307      # Check if the provided tool contains a complete path.
5308      tool_specified="$CMP"
5309      tool_basename="${tool_specified##*/}"
5310      if test "x$tool_basename" = "x$tool_specified"; then
5311        # A command without a complete path is provided, search $PATH.
5312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5313$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5314        # Extract the first word of "$tool_basename", so it can be a program name with args.
5315set dummy $tool_basename; ac_word=$2
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5317$as_echo_n "checking for $ac_word... " >&6; }
5318if ${ac_cv_path_CMP+:} false; then :
5319  $as_echo_n "(cached) " >&6
5320else
5321  case $CMP in
5322  [\\/]* | ?:[\\/]*)
5323  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5324  ;;
5325  *)
5326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5327for as_dir in $PATH
5328do
5329  IFS=$as_save_IFS
5330  test -z "$as_dir" && as_dir=.
5331    for ac_exec_ext in '' $ac_executable_extensions; do
5332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5333    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5335    break 2
5336  fi
5337done
5338  done
5339IFS=$as_save_IFS
5340
5341  ;;
5342esac
5343fi
5344CMP=$ac_cv_path_CMP
5345if test -n "$CMP"; then
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5347$as_echo "$CMP" >&6; }
5348else
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352
5353
5354        if test "x$CMP" = x; then
5355          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5356        fi
5357      else
5358        # Otherwise we believe it is a complete path. Use it as it is.
5359        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5360$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5362$as_echo_n "checking for CMP... " >&6; }
5363        if test ! -x "$tool_specified"; then
5364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5365$as_echo "not found" >&6; }
5366          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5367        fi
5368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5369$as_echo "$tool_specified" >&6; }
5370      fi
5371    fi
5372  fi
5373
5374
5375
5376  if test "x$CMP" = x; then
5377    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5378  fi
5379
5380
5381
5382
5383
5384  # Publish this variable in the help.
5385
5386
5387  if test "x$COMM" = x; then
5388    # The variable is not set by user, try to locate tool using the code snippet
5389    for ac_prog in comm
5390do
5391  # Extract the first word of "$ac_prog", so it can be a program name with args.
5392set dummy $ac_prog; ac_word=$2
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5394$as_echo_n "checking for $ac_word... " >&6; }
5395if ${ac_cv_path_COMM+:} false; then :
5396  $as_echo_n "(cached) " >&6
5397else
5398  case $COMM in
5399  [\\/]* | ?:[\\/]*)
5400  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5401  ;;
5402  *)
5403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5404for as_dir in $PATH
5405do
5406  IFS=$as_save_IFS
5407  test -z "$as_dir" && as_dir=.
5408    for ac_exec_ext in '' $ac_executable_extensions; do
5409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5410    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5412    break 2
5413  fi
5414done
5415  done
5416IFS=$as_save_IFS
5417
5418  ;;
5419esac
5420fi
5421COMM=$ac_cv_path_COMM
5422if test -n "$COMM"; then
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5424$as_echo "$COMM" >&6; }
5425else
5426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427$as_echo "no" >&6; }
5428fi
5429
5430
5431  test -n "$COMM" && break
5432done
5433
5434  else
5435    # The variable is set, but is it from the command line or the environment?
5436
5437    # Try to remove the string !COMM! from our list.
5438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5440      # If it failed, the variable was not from the command line. Ignore it,
5441      # but warn the user (except for BASH, which is always set by the calling BASH).
5442      if test "xCOMM" != xBASH; then
5443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5444$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5445      fi
5446      # Try to locate tool using the code snippet
5447      for ac_prog in comm
5448do
5449  # Extract the first word of "$ac_prog", so it can be a program name with args.
5450set dummy $ac_prog; ac_word=$2
5451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452$as_echo_n "checking for $ac_word... " >&6; }
5453if ${ac_cv_path_COMM+:} false; then :
5454  $as_echo_n "(cached) " >&6
5455else
5456  case $COMM in
5457  [\\/]* | ?:[\\/]*)
5458  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5459  ;;
5460  *)
5461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5462for as_dir in $PATH
5463do
5464  IFS=$as_save_IFS
5465  test -z "$as_dir" && as_dir=.
5466    for ac_exec_ext in '' $ac_executable_extensions; do
5467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5468    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5470    break 2
5471  fi
5472done
5473  done
5474IFS=$as_save_IFS
5475
5476  ;;
5477esac
5478fi
5479COMM=$ac_cv_path_COMM
5480if test -n "$COMM"; then
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5482$as_echo "$COMM" >&6; }
5483else
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485$as_echo "no" >&6; }
5486fi
5487
5488
5489  test -n "$COMM" && break
5490done
5491
5492    else
5493      # If it succeeded, then it was overridden by the user. We will use it
5494      # for the tool.
5495
5496      # First remove it from the list of overridden variables, so we can test
5497      # for unknown variables in the end.
5498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5499
5500      # Check if the provided tool contains a complete path.
5501      tool_specified="$COMM"
5502      tool_basename="${tool_specified##*/}"
5503      if test "x$tool_basename" = "x$tool_specified"; then
5504        # A command without a complete path is provided, search $PATH.
5505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5506$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5507        # Extract the first word of "$tool_basename", so it can be a program name with args.
5508set dummy $tool_basename; ac_word=$2
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510$as_echo_n "checking for $ac_word... " >&6; }
5511if ${ac_cv_path_COMM+:} false; then :
5512  $as_echo_n "(cached) " >&6
5513else
5514  case $COMM in
5515  [\\/]* | ?:[\\/]*)
5516  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5517  ;;
5518  *)
5519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520for as_dir in $PATH
5521do
5522  IFS=$as_save_IFS
5523  test -z "$as_dir" && as_dir=.
5524    for ac_exec_ext in '' $ac_executable_extensions; do
5525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528    break 2
5529  fi
5530done
5531  done
5532IFS=$as_save_IFS
5533
5534  ;;
5535esac
5536fi
5537COMM=$ac_cv_path_COMM
5538if test -n "$COMM"; then
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5540$as_echo "$COMM" >&6; }
5541else
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544fi
5545
5546
5547        if test "x$COMM" = x; then
5548          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5549        fi
5550      else
5551        # Otherwise we believe it is a complete path. Use it as it is.
5552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5553$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5555$as_echo_n "checking for COMM... " >&6; }
5556        if test ! -x "$tool_specified"; then
5557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5558$as_echo "not found" >&6; }
5559          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5560        fi
5561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5562$as_echo "$tool_specified" >&6; }
5563      fi
5564    fi
5565  fi
5566
5567
5568
5569  if test "x$COMM" = x; then
5570    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5571  fi
5572
5573
5574
5575
5576
5577  # Publish this variable in the help.
5578
5579
5580  if test "x$CP" = x; then
5581    # The variable is not set by user, try to locate tool using the code snippet
5582    for ac_prog in cp
5583do
5584  # Extract the first word of "$ac_prog", so it can be a program name with args.
5585set dummy $ac_prog; ac_word=$2
5586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5587$as_echo_n "checking for $ac_word... " >&6; }
5588if ${ac_cv_path_CP+:} false; then :
5589  $as_echo_n "(cached) " >&6
5590else
5591  case $CP in
5592  [\\/]* | ?:[\\/]*)
5593  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5594  ;;
5595  *)
5596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5597for as_dir in $PATH
5598do
5599  IFS=$as_save_IFS
5600  test -z "$as_dir" && as_dir=.
5601    for ac_exec_ext in '' $ac_executable_extensions; do
5602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5603    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5605    break 2
5606  fi
5607done
5608  done
5609IFS=$as_save_IFS
5610
5611  ;;
5612esac
5613fi
5614CP=$ac_cv_path_CP
5615if test -n "$CP"; then
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5617$as_echo "$CP" >&6; }
5618else
5619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5620$as_echo "no" >&6; }
5621fi
5622
5623
5624  test -n "$CP" && break
5625done
5626
5627  else
5628    # The variable is set, but is it from the command line or the environment?
5629
5630    # Try to remove the string !CP! from our list.
5631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5633      # If it failed, the variable was not from the command line. Ignore it,
5634      # but warn the user (except for BASH, which is always set by the calling BASH).
5635      if test "xCP" != xBASH; then
5636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5637$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5638      fi
5639      # Try to locate tool using the code snippet
5640      for ac_prog in cp
5641do
5642  # Extract the first word of "$ac_prog", so it can be a program name with args.
5643set dummy $ac_prog; ac_word=$2
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
5646if ${ac_cv_path_CP+:} false; then :
5647  $as_echo_n "(cached) " >&6
5648else
5649  case $CP in
5650  [\\/]* | ?:[\\/]*)
5651  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5652  ;;
5653  *)
5654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5655for as_dir in $PATH
5656do
5657  IFS=$as_save_IFS
5658  test -z "$as_dir" && as_dir=.
5659    for ac_exec_ext in '' $ac_executable_extensions; do
5660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5661    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5663    break 2
5664  fi
5665done
5666  done
5667IFS=$as_save_IFS
5668
5669  ;;
5670esac
5671fi
5672CP=$ac_cv_path_CP
5673if test -n "$CP"; then
5674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5675$as_echo "$CP" >&6; }
5676else
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5678$as_echo "no" >&6; }
5679fi
5680
5681
5682  test -n "$CP" && break
5683done
5684
5685    else
5686      # If it succeeded, then it was overridden by the user. We will use it
5687      # for the tool.
5688
5689      # First remove it from the list of overridden variables, so we can test
5690      # for unknown variables in the end.
5691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5692
5693      # Check if the provided tool contains a complete path.
5694      tool_specified="$CP"
5695      tool_basename="${tool_specified##*/}"
5696      if test "x$tool_basename" = "x$tool_specified"; then
5697        # A command without a complete path is provided, search $PATH.
5698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5699$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5700        # Extract the first word of "$tool_basename", so it can be a program name with args.
5701set dummy $tool_basename; ac_word=$2
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703$as_echo_n "checking for $ac_word... " >&6; }
5704if ${ac_cv_path_CP+:} false; then :
5705  $as_echo_n "(cached) " >&6
5706else
5707  case $CP in
5708  [\\/]* | ?:[\\/]*)
5709  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5710  ;;
5711  *)
5712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5713for as_dir in $PATH
5714do
5715  IFS=$as_save_IFS
5716  test -z "$as_dir" && as_dir=.
5717    for ac_exec_ext in '' $ac_executable_extensions; do
5718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5719    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5721    break 2
5722  fi
5723done
5724  done
5725IFS=$as_save_IFS
5726
5727  ;;
5728esac
5729fi
5730CP=$ac_cv_path_CP
5731if test -n "$CP"; then
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5733$as_echo "$CP" >&6; }
5734else
5735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5736$as_echo "no" >&6; }
5737fi
5738
5739
5740        if test "x$CP" = x; then
5741          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5742        fi
5743      else
5744        # Otherwise we believe it is a complete path. Use it as it is.
5745        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5746$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5748$as_echo_n "checking for CP... " >&6; }
5749        if test ! -x "$tool_specified"; then
5750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5751$as_echo "not found" >&6; }
5752          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5753        fi
5754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5755$as_echo "$tool_specified" >&6; }
5756      fi
5757    fi
5758  fi
5759
5760
5761
5762  if test "x$CP" = x; then
5763    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5764  fi
5765
5766
5767
5768
5769
5770  # Publish this variable in the help.
5771
5772
5773  if test "x$CUT" = x; then
5774    # The variable is not set by user, try to locate tool using the code snippet
5775    for ac_prog in cut
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if ${ac_cv_path_CUT+:} false; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  case $CUT in
5785  [\\/]* | ?:[\\/]*)
5786  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5787  ;;
5788  *)
5789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5790for as_dir in $PATH
5791do
5792  IFS=$as_save_IFS
5793  test -z "$as_dir" && as_dir=.
5794    for ac_exec_ext in '' $ac_executable_extensions; do
5795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5796    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5798    break 2
5799  fi
5800done
5801  done
5802IFS=$as_save_IFS
5803
5804  ;;
5805esac
5806fi
5807CUT=$ac_cv_path_CUT
5808if test -n "$CUT"; then
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5810$as_echo "$CUT" >&6; }
5811else
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817  test -n "$CUT" && break
5818done
5819
5820  else
5821    # The variable is set, but is it from the command line or the environment?
5822
5823    # Try to remove the string !CUT! from our list.
5824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5826      # If it failed, the variable was not from the command line. Ignore it,
5827      # but warn the user (except for BASH, which is always set by the calling BASH).
5828      if test "xCUT" != xBASH; then
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5830$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5831      fi
5832      # Try to locate tool using the code snippet
5833      for ac_prog in cut
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_CUT+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $CUT in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5854    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865CUT=$ac_cv_path_CUT
5866if test -n "$CUT"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5868$as_echo "$CUT" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$CUT" && break
5876done
5877
5878    else
5879      # If it succeeded, then it was overridden by the user. We will use it
5880      # for the tool.
5881
5882      # First remove it from the list of overridden variables, so we can test
5883      # for unknown variables in the end.
5884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5885
5886      # Check if the provided tool contains a complete path.
5887      tool_specified="$CUT"
5888      tool_basename="${tool_specified##*/}"
5889      if test "x$tool_basename" = "x$tool_specified"; then
5890        # A command without a complete path is provided, search $PATH.
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5892$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5893        # Extract the first word of "$tool_basename", so it can be a program name with args.
5894set dummy $tool_basename; ac_word=$2
5895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5896$as_echo_n "checking for $ac_word... " >&6; }
5897if ${ac_cv_path_CUT+:} false; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900  case $CUT in
5901  [\\/]* | ?:[\\/]*)
5902  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5903  ;;
5904  *)
5905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5906for as_dir in $PATH
5907do
5908  IFS=$as_save_IFS
5909  test -z "$as_dir" && as_dir=.
5910    for ac_exec_ext in '' $ac_executable_extensions; do
5911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5912    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5914    break 2
5915  fi
5916done
5917  done
5918IFS=$as_save_IFS
5919
5920  ;;
5921esac
5922fi
5923CUT=$ac_cv_path_CUT
5924if test -n "$CUT"; then
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5926$as_echo "$CUT" >&6; }
5927else
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929$as_echo "no" >&6; }
5930fi
5931
5932
5933        if test "x$CUT" = x; then
5934          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5935        fi
5936      else
5937        # Otherwise we believe it is a complete path. Use it as it is.
5938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5939$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5941$as_echo_n "checking for CUT... " >&6; }
5942        if test ! -x "$tool_specified"; then
5943          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5944$as_echo "not found" >&6; }
5945          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5946        fi
5947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5948$as_echo "$tool_specified" >&6; }
5949      fi
5950    fi
5951  fi
5952
5953
5954
5955  if test "x$CUT" = x; then
5956    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5957  fi
5958
5959
5960
5961
5962
5963  # Publish this variable in the help.
5964
5965
5966  if test "x$DATE" = x; then
5967    # The variable is not set by user, try to locate tool using the code snippet
5968    for ac_prog in date
5969do
5970  # Extract the first word of "$ac_prog", so it can be a program name with args.
5971set dummy $ac_prog; ac_word=$2
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973$as_echo_n "checking for $ac_word... " >&6; }
5974if ${ac_cv_path_DATE+:} false; then :
5975  $as_echo_n "(cached) " >&6
5976else
5977  case $DATE in
5978  [\\/]* | ?:[\\/]*)
5979  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5980  ;;
5981  *)
5982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983for as_dir in $PATH
5984do
5985  IFS=$as_save_IFS
5986  test -z "$as_dir" && as_dir=.
5987    for ac_exec_ext in '' $ac_executable_extensions; do
5988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5989    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991    break 2
5992  fi
5993done
5994  done
5995IFS=$as_save_IFS
5996
5997  ;;
5998esac
5999fi
6000DATE=$ac_cv_path_DATE
6001if test -n "$DATE"; then
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6003$as_echo "$DATE" >&6; }
6004else
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010  test -n "$DATE" && break
6011done
6012
6013  else
6014    # The variable is set, but is it from the command line or the environment?
6015
6016    # Try to remove the string !DATE! from our list.
6017    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6018    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6019      # If it failed, the variable was not from the command line. Ignore it,
6020      # but warn the user (except for BASH, which is always set by the calling BASH).
6021      if test "xDATE" != xBASH; then
6022        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6023$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6024      fi
6025      # Try to locate tool using the code snippet
6026      for ac_prog in date
6027do
6028  # Extract the first word of "$ac_prog", so it can be a program name with args.
6029set dummy $ac_prog; ac_word=$2
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if ${ac_cv_path_DATE+:} false; then :
6033  $as_echo_n "(cached) " >&6
6034else
6035  case $DATE in
6036  [\\/]* | ?:[\\/]*)
6037  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6038  ;;
6039  *)
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_exec_ext in '' $ac_executable_extensions; do
6046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6047    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049    break 2
6050  fi
6051done
6052  done
6053IFS=$as_save_IFS
6054
6055  ;;
6056esac
6057fi
6058DATE=$ac_cv_path_DATE
6059if test -n "$DATE"; then
6060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6061$as_echo "$DATE" >&6; }
6062else
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064$as_echo "no" >&6; }
6065fi
6066
6067
6068  test -n "$DATE" && break
6069done
6070
6071    else
6072      # If it succeeded, then it was overridden by the user. We will use it
6073      # for the tool.
6074
6075      # First remove it from the list of overridden variables, so we can test
6076      # for unknown variables in the end.
6077      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6078
6079      # Check if the provided tool contains a complete path.
6080      tool_specified="$DATE"
6081      tool_basename="${tool_specified##*/}"
6082      if test "x$tool_basename" = "x$tool_specified"; then
6083        # A command without a complete path is provided, search $PATH.
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6085$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6086        # Extract the first word of "$tool_basename", so it can be a program name with args.
6087set dummy $tool_basename; ac_word=$2
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6089$as_echo_n "checking for $ac_word... " >&6; }
6090if ${ac_cv_path_DATE+:} false; then :
6091  $as_echo_n "(cached) " >&6
6092else
6093  case $DATE in
6094  [\\/]* | ?:[\\/]*)
6095  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6096  ;;
6097  *)
6098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101  IFS=$as_save_IFS
6102  test -z "$as_dir" && as_dir=.
6103    for ac_exec_ext in '' $ac_executable_extensions; do
6104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6105    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107    break 2
6108  fi
6109done
6110  done
6111IFS=$as_save_IFS
6112
6113  ;;
6114esac
6115fi
6116DATE=$ac_cv_path_DATE
6117if test -n "$DATE"; then
6118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6119$as_echo "$DATE" >&6; }
6120else
6121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6122$as_echo "no" >&6; }
6123fi
6124
6125
6126        if test "x$DATE" = x; then
6127          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6128        fi
6129      else
6130        # Otherwise we believe it is a complete path. Use it as it is.
6131        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6132$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6134$as_echo_n "checking for DATE... " >&6; }
6135        if test ! -x "$tool_specified"; then
6136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6137$as_echo "not found" >&6; }
6138          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6139        fi
6140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6141$as_echo "$tool_specified" >&6; }
6142      fi
6143    fi
6144  fi
6145
6146
6147
6148  if test "x$DATE" = x; then
6149    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6150  fi
6151
6152
6153
6154
6155
6156  # Publish this variable in the help.
6157
6158
6159  if test "x$DIFF" = x; then
6160    # The variable is not set by user, try to locate tool using the code snippet
6161    for ac_prog in gdiff diff
6162do
6163  # Extract the first word of "$ac_prog", so it can be a program name with args.
6164set dummy $ac_prog; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_path_DIFF+:} false; then :
6168  $as_echo_n "(cached) " >&6
6169else
6170  case $DIFF in
6171  [\\/]* | ?:[\\/]*)
6172  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6173  ;;
6174  *)
6175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6176for as_dir in $PATH
6177do
6178  IFS=$as_save_IFS
6179  test -z "$as_dir" && as_dir=.
6180    for ac_exec_ext in '' $ac_executable_extensions; do
6181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6182    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6184    break 2
6185  fi
6186done
6187  done
6188IFS=$as_save_IFS
6189
6190  ;;
6191esac
6192fi
6193DIFF=$ac_cv_path_DIFF
6194if test -n "$DIFF"; then
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6196$as_echo "$DIFF" >&6; }
6197else
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
6200fi
6201
6202
6203  test -n "$DIFF" && break
6204done
6205
6206  else
6207    # The variable is set, but is it from the command line or the environment?
6208
6209    # Try to remove the string !DIFF! from our list.
6210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6212      # If it failed, the variable was not from the command line. Ignore it,
6213      # but warn the user (except for BASH, which is always set by the calling BASH).
6214      if test "xDIFF" != xBASH; then
6215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6216$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6217      fi
6218      # Try to locate tool using the code snippet
6219      for ac_prog in gdiff diff
6220do
6221  # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_path_DIFF+:} false; then :
6226  $as_echo_n "(cached) " >&6
6227else
6228  case $DIFF in
6229  [\\/]* | ?:[\\/]*)
6230  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6231  ;;
6232  *)
6233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH
6235do
6236  IFS=$as_save_IFS
6237  test -z "$as_dir" && as_dir=.
6238    for ac_exec_ext in '' $ac_executable_extensions; do
6239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6240    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6242    break 2
6243  fi
6244done
6245  done
6246IFS=$as_save_IFS
6247
6248  ;;
6249esac
6250fi
6251DIFF=$ac_cv_path_DIFF
6252if test -n "$DIFF"; then
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6254$as_echo "$DIFF" >&6; }
6255else
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6257$as_echo "no" >&6; }
6258fi
6259
6260
6261  test -n "$DIFF" && break
6262done
6263
6264    else
6265      # If it succeeded, then it was overridden by the user. We will use it
6266      # for the tool.
6267
6268      # First remove it from the list of overridden variables, so we can test
6269      # for unknown variables in the end.
6270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6271
6272      # Check if the provided tool contains a complete path.
6273      tool_specified="$DIFF"
6274      tool_basename="${tool_specified##*/}"
6275      if test "x$tool_basename" = "x$tool_specified"; then
6276        # A command without a complete path is provided, search $PATH.
6277        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6278$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6279        # Extract the first word of "$tool_basename", so it can be a program name with args.
6280set dummy $tool_basename; ac_word=$2
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6282$as_echo_n "checking for $ac_word... " >&6; }
6283if ${ac_cv_path_DIFF+:} false; then :
6284  $as_echo_n "(cached) " >&6
6285else
6286  case $DIFF in
6287  [\\/]* | ?:[\\/]*)
6288  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6289  ;;
6290  *)
6291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6292for as_dir in $PATH
6293do
6294  IFS=$as_save_IFS
6295  test -z "$as_dir" && as_dir=.
6296    for ac_exec_ext in '' $ac_executable_extensions; do
6297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6298    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6300    break 2
6301  fi
6302done
6303  done
6304IFS=$as_save_IFS
6305
6306  ;;
6307esac
6308fi
6309DIFF=$ac_cv_path_DIFF
6310if test -n "$DIFF"; then
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6312$as_echo "$DIFF" >&6; }
6313else
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
6316fi
6317
6318
6319        if test "x$DIFF" = x; then
6320          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6321        fi
6322      else
6323        # Otherwise we believe it is a complete path. Use it as it is.
6324        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6325$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6327$as_echo_n "checking for DIFF... " >&6; }
6328        if test ! -x "$tool_specified"; then
6329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6330$as_echo "not found" >&6; }
6331          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6332        fi
6333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6334$as_echo "$tool_specified" >&6; }
6335      fi
6336    fi
6337  fi
6338
6339
6340
6341  if test "x$DIFF" = x; then
6342    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6343  fi
6344
6345
6346
6347
6348
6349  # Publish this variable in the help.
6350
6351
6352  if test "x$DIRNAME" = x; then
6353    # The variable is not set by user, try to locate tool using the code snippet
6354    for ac_prog in dirname
6355do
6356  # Extract the first word of "$ac_prog", so it can be a program name with args.
6357set dummy $ac_prog; ac_word=$2
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6359$as_echo_n "checking for $ac_word... " >&6; }
6360if ${ac_cv_path_DIRNAME+:} false; then :
6361  $as_echo_n "(cached) " >&6
6362else
6363  case $DIRNAME in
6364  [\\/]* | ?:[\\/]*)
6365  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6366  ;;
6367  *)
6368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6369for as_dir in $PATH
6370do
6371  IFS=$as_save_IFS
6372  test -z "$as_dir" && as_dir=.
6373    for ac_exec_ext in '' $ac_executable_extensions; do
6374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6375    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6377    break 2
6378  fi
6379done
6380  done
6381IFS=$as_save_IFS
6382
6383  ;;
6384esac
6385fi
6386DIRNAME=$ac_cv_path_DIRNAME
6387if test -n "$DIRNAME"; then
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6389$as_echo "$DIRNAME" >&6; }
6390else
6391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394
6395
6396  test -n "$DIRNAME" && break
6397done
6398
6399  else
6400    # The variable is set, but is it from the command line or the environment?
6401
6402    # Try to remove the string !DIRNAME! from our list.
6403    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6404    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6405      # If it failed, the variable was not from the command line. Ignore it,
6406      # but warn the user (except for BASH, which is always set by the calling BASH).
6407      if test "xDIRNAME" != xBASH; then
6408        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6409$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6410      fi
6411      # Try to locate tool using the code snippet
6412      for ac_prog in dirname
6413do
6414  # Extract the first word of "$ac_prog", so it can be a program name with args.
6415set dummy $ac_prog; ac_word=$2
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6417$as_echo_n "checking for $ac_word... " >&6; }
6418if ${ac_cv_path_DIRNAME+:} false; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  case $DIRNAME in
6422  [\\/]* | ?:[\\/]*)
6423  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6424  ;;
6425  *)
6426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH
6428do
6429  IFS=$as_save_IFS
6430  test -z "$as_dir" && as_dir=.
6431    for ac_exec_ext in '' $ac_executable_extensions; do
6432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6433    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6435    break 2
6436  fi
6437done
6438  done
6439IFS=$as_save_IFS
6440
6441  ;;
6442esac
6443fi
6444DIRNAME=$ac_cv_path_DIRNAME
6445if test -n "$DIRNAME"; then
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6447$as_echo "$DIRNAME" >&6; }
6448else
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
6453
6454  test -n "$DIRNAME" && break
6455done
6456
6457    else
6458      # If it succeeded, then it was overridden by the user. We will use it
6459      # for the tool.
6460
6461      # First remove it from the list of overridden variables, so we can test
6462      # for unknown variables in the end.
6463      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6464
6465      # Check if the provided tool contains a complete path.
6466      tool_specified="$DIRNAME"
6467      tool_basename="${tool_specified##*/}"
6468      if test "x$tool_basename" = "x$tool_specified"; then
6469        # A command without a complete path is provided, search $PATH.
6470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6471$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6472        # Extract the first word of "$tool_basename", so it can be a program name with args.
6473set dummy $tool_basename; ac_word=$2
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475$as_echo_n "checking for $ac_word... " >&6; }
6476if ${ac_cv_path_DIRNAME+:} false; then :
6477  $as_echo_n "(cached) " >&6
6478else
6479  case $DIRNAME in
6480  [\\/]* | ?:[\\/]*)
6481  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6482  ;;
6483  *)
6484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485for as_dir in $PATH
6486do
6487  IFS=$as_save_IFS
6488  test -z "$as_dir" && as_dir=.
6489    for ac_exec_ext in '' $ac_executable_extensions; do
6490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6491    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493    break 2
6494  fi
6495done
6496  done
6497IFS=$as_save_IFS
6498
6499  ;;
6500esac
6501fi
6502DIRNAME=$ac_cv_path_DIRNAME
6503if test -n "$DIRNAME"; then
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6505$as_echo "$DIRNAME" >&6; }
6506else
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508$as_echo "no" >&6; }
6509fi
6510
6511
6512        if test "x$DIRNAME" = x; then
6513          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6514        fi
6515      else
6516        # Otherwise we believe it is a complete path. Use it as it is.
6517        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6518$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6520$as_echo_n "checking for DIRNAME... " >&6; }
6521        if test ! -x "$tool_specified"; then
6522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6523$as_echo "not found" >&6; }
6524          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6525        fi
6526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6527$as_echo "$tool_specified" >&6; }
6528      fi
6529    fi
6530  fi
6531
6532
6533
6534  if test "x$DIRNAME" = x; then
6535    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6536  fi
6537
6538
6539
6540
6541
6542  # Publish this variable in the help.
6543
6544
6545  if test "x$ECHO" = x; then
6546    # The variable is not set by user, try to locate tool using the code snippet
6547    for ac_prog in echo
6548do
6549  # Extract the first word of "$ac_prog", so it can be a program name with args.
6550set dummy $ac_prog; ac_word=$2
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6552$as_echo_n "checking for $ac_word... " >&6; }
6553if ${ac_cv_path_ECHO+:} false; then :
6554  $as_echo_n "(cached) " >&6
6555else
6556  case $ECHO in
6557  [\\/]* | ?:[\\/]*)
6558  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6559  ;;
6560  *)
6561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6562for as_dir in $PATH
6563do
6564  IFS=$as_save_IFS
6565  test -z "$as_dir" && as_dir=.
6566    for ac_exec_ext in '' $ac_executable_extensions; do
6567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6568    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6570    break 2
6571  fi
6572done
6573  done
6574IFS=$as_save_IFS
6575
6576  ;;
6577esac
6578fi
6579ECHO=$ac_cv_path_ECHO
6580if test -n "$ECHO"; then
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6582$as_echo "$ECHO" >&6; }
6583else
6584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
6586fi
6587
6588
6589  test -n "$ECHO" && break
6590done
6591
6592  else
6593    # The variable is set, but is it from the command line or the environment?
6594
6595    # Try to remove the string !ECHO! from our list.
6596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6598      # If it failed, the variable was not from the command line. Ignore it,
6599      # but warn the user (except for BASH, which is always set by the calling BASH).
6600      if test "xECHO" != xBASH; then
6601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6602$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6603      fi
6604      # Try to locate tool using the code snippet
6605      for ac_prog in echo
6606do
6607  # Extract the first word of "$ac_prog", so it can be a program name with args.
6608set dummy $ac_prog; ac_word=$2
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610$as_echo_n "checking for $ac_word... " >&6; }
6611if ${ac_cv_path_ECHO+:} false; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  case $ECHO in
6615  [\\/]* | ?:[\\/]*)
6616  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6617  ;;
6618  *)
6619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620for as_dir in $PATH
6621do
6622  IFS=$as_save_IFS
6623  test -z "$as_dir" && as_dir=.
6624    for ac_exec_ext in '' $ac_executable_extensions; do
6625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6626    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6628    break 2
6629  fi
6630done
6631  done
6632IFS=$as_save_IFS
6633
6634  ;;
6635esac
6636fi
6637ECHO=$ac_cv_path_ECHO
6638if test -n "$ECHO"; then
6639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6640$as_echo "$ECHO" >&6; }
6641else
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643$as_echo "no" >&6; }
6644fi
6645
6646
6647  test -n "$ECHO" && break
6648done
6649
6650    else
6651      # If it succeeded, then it was overridden by the user. We will use it
6652      # for the tool.
6653
6654      # First remove it from the list of overridden variables, so we can test
6655      # for unknown variables in the end.
6656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6657
6658      # Check if the provided tool contains a complete path.
6659      tool_specified="$ECHO"
6660      tool_basename="${tool_specified##*/}"
6661      if test "x$tool_basename" = "x$tool_specified"; then
6662        # A command without a complete path is provided, search $PATH.
6663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6664$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6665        # Extract the first word of "$tool_basename", so it can be a program name with args.
6666set dummy $tool_basename; ac_word=$2
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if ${ac_cv_path_ECHO+:} false; then :
6670  $as_echo_n "(cached) " >&6
6671else
6672  case $ECHO in
6673  [\\/]* | ?:[\\/]*)
6674  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6675  ;;
6676  *)
6677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678for as_dir in $PATH
6679do
6680  IFS=$as_save_IFS
6681  test -z "$as_dir" && as_dir=.
6682    for ac_exec_ext in '' $ac_executable_extensions; do
6683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686    break 2
6687  fi
6688done
6689  done
6690IFS=$as_save_IFS
6691
6692  ;;
6693esac
6694fi
6695ECHO=$ac_cv_path_ECHO
6696if test -n "$ECHO"; then
6697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6698$as_echo "$ECHO" >&6; }
6699else
6700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6701$as_echo "no" >&6; }
6702fi
6703
6704
6705        if test "x$ECHO" = x; then
6706          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6707        fi
6708      else
6709        # Otherwise we believe it is a complete path. Use it as it is.
6710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6711$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6713$as_echo_n "checking for ECHO... " >&6; }
6714        if test ! -x "$tool_specified"; then
6715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6716$as_echo "not found" >&6; }
6717          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6718        fi
6719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6720$as_echo "$tool_specified" >&6; }
6721      fi
6722    fi
6723  fi
6724
6725
6726
6727  if test "x$ECHO" = x; then
6728    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6729  fi
6730
6731
6732
6733
6734
6735  # Publish this variable in the help.
6736
6737
6738  if test "x$EXPR" = x; then
6739    # The variable is not set by user, try to locate tool using the code snippet
6740    for ac_prog in expr
6741do
6742  # Extract the first word of "$ac_prog", so it can be a program name with args.
6743set dummy $ac_prog; ac_word=$2
6744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6745$as_echo_n "checking for $ac_word... " >&6; }
6746if ${ac_cv_path_EXPR+:} false; then :
6747  $as_echo_n "(cached) " >&6
6748else
6749  case $EXPR in
6750  [\\/]* | ?:[\\/]*)
6751  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6752  ;;
6753  *)
6754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6755for as_dir in $PATH
6756do
6757  IFS=$as_save_IFS
6758  test -z "$as_dir" && as_dir=.
6759    for ac_exec_ext in '' $ac_executable_extensions; do
6760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6761    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6763    break 2
6764  fi
6765done
6766  done
6767IFS=$as_save_IFS
6768
6769  ;;
6770esac
6771fi
6772EXPR=$ac_cv_path_EXPR
6773if test -n "$EXPR"; then
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6775$as_echo "$EXPR" >&6; }
6776else
6777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6778$as_echo "no" >&6; }
6779fi
6780
6781
6782  test -n "$EXPR" && break
6783done
6784
6785  else
6786    # The variable is set, but is it from the command line or the environment?
6787
6788    # Try to remove the string !EXPR! from our list.
6789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6791      # If it failed, the variable was not from the command line. Ignore it,
6792      # but warn the user (except for BASH, which is always set by the calling BASH).
6793      if test "xEXPR" != xBASH; then
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6795$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6796      fi
6797      # Try to locate tool using the code snippet
6798      for ac_prog in expr
6799do
6800  # Extract the first word of "$ac_prog", so it can be a program name with args.
6801set dummy $ac_prog; ac_word=$2
6802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6803$as_echo_n "checking for $ac_word... " >&6; }
6804if ${ac_cv_path_EXPR+:} false; then :
6805  $as_echo_n "(cached) " >&6
6806else
6807  case $EXPR in
6808  [\\/]* | ?:[\\/]*)
6809  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6810  ;;
6811  *)
6812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6813for as_dir in $PATH
6814do
6815  IFS=$as_save_IFS
6816  test -z "$as_dir" && as_dir=.
6817    for ac_exec_ext in '' $ac_executable_extensions; do
6818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6819    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6821    break 2
6822  fi
6823done
6824  done
6825IFS=$as_save_IFS
6826
6827  ;;
6828esac
6829fi
6830EXPR=$ac_cv_path_EXPR
6831if test -n "$EXPR"; then
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6833$as_echo "$EXPR" >&6; }
6834else
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6836$as_echo "no" >&6; }
6837fi
6838
6839
6840  test -n "$EXPR" && break
6841done
6842
6843    else
6844      # If it succeeded, then it was overridden by the user. We will use it
6845      # for the tool.
6846
6847      # First remove it from the list of overridden variables, so we can test
6848      # for unknown variables in the end.
6849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6850
6851      # Check if the provided tool contains a complete path.
6852      tool_specified="$EXPR"
6853      tool_basename="${tool_specified##*/}"
6854      if test "x$tool_basename" = "x$tool_specified"; then
6855        # A command without a complete path is provided, search $PATH.
6856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6857$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6858        # Extract the first word of "$tool_basename", so it can be a program name with args.
6859set dummy $tool_basename; ac_word=$2
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861$as_echo_n "checking for $ac_word... " >&6; }
6862if ${ac_cv_path_EXPR+:} false; then :
6863  $as_echo_n "(cached) " >&6
6864else
6865  case $EXPR in
6866  [\\/]* | ?:[\\/]*)
6867  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6868  ;;
6869  *)
6870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6871for as_dir in $PATH
6872do
6873  IFS=$as_save_IFS
6874  test -z "$as_dir" && as_dir=.
6875    for ac_exec_ext in '' $ac_executable_extensions; do
6876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6877    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6879    break 2
6880  fi
6881done
6882  done
6883IFS=$as_save_IFS
6884
6885  ;;
6886esac
6887fi
6888EXPR=$ac_cv_path_EXPR
6889if test -n "$EXPR"; then
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6891$as_echo "$EXPR" >&6; }
6892else
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6894$as_echo "no" >&6; }
6895fi
6896
6897
6898        if test "x$EXPR" = x; then
6899          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6900        fi
6901      else
6902        # Otherwise we believe it is a complete path. Use it as it is.
6903        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6904$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6906$as_echo_n "checking for EXPR... " >&6; }
6907        if test ! -x "$tool_specified"; then
6908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6909$as_echo "not found" >&6; }
6910          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6911        fi
6912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6913$as_echo "$tool_specified" >&6; }
6914      fi
6915    fi
6916  fi
6917
6918
6919
6920  if test "x$EXPR" = x; then
6921    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6922  fi
6923
6924
6925
6926
6927
6928  # Publish this variable in the help.
6929
6930
6931  if test "x$FILE" = x; then
6932    # The variable is not set by user, try to locate tool using the code snippet
6933    for ac_prog in file
6934do
6935  # Extract the first word of "$ac_prog", so it can be a program name with args.
6936set dummy $ac_prog; ac_word=$2
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6938$as_echo_n "checking for $ac_word... " >&6; }
6939if ${ac_cv_path_FILE+:} false; then :
6940  $as_echo_n "(cached) " >&6
6941else
6942  case $FILE in
6943  [\\/]* | ?:[\\/]*)
6944  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6945  ;;
6946  *)
6947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6948for as_dir in $PATH
6949do
6950  IFS=$as_save_IFS
6951  test -z "$as_dir" && as_dir=.
6952    for ac_exec_ext in '' $ac_executable_extensions; do
6953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6954    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6956    break 2
6957  fi
6958done
6959  done
6960IFS=$as_save_IFS
6961
6962  ;;
6963esac
6964fi
6965FILE=$ac_cv_path_FILE
6966if test -n "$FILE"; then
6967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6968$as_echo "$FILE" >&6; }
6969else
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6971$as_echo "no" >&6; }
6972fi
6973
6974
6975  test -n "$FILE" && break
6976done
6977
6978  else
6979    # The variable is set, but is it from the command line or the environment?
6980
6981    # Try to remove the string !FILE! from our list.
6982    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6983    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6984      # If it failed, the variable was not from the command line. Ignore it,
6985      # but warn the user (except for BASH, which is always set by the calling BASH).
6986      if test "xFILE" != xBASH; then
6987        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6988$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6989      fi
6990      # Try to locate tool using the code snippet
6991      for ac_prog in file
6992do
6993  # Extract the first word of "$ac_prog", so it can be a program name with args.
6994set dummy $ac_prog; ac_word=$2
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6996$as_echo_n "checking for $ac_word... " >&6; }
6997if ${ac_cv_path_FILE+:} false; then :
6998  $as_echo_n "(cached) " >&6
6999else
7000  case $FILE in
7001  [\\/]* | ?:[\\/]*)
7002  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7003  ;;
7004  *)
7005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7006for as_dir in $PATH
7007do
7008  IFS=$as_save_IFS
7009  test -z "$as_dir" && as_dir=.
7010    for ac_exec_ext in '' $ac_executable_extensions; do
7011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7012    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7014    break 2
7015  fi
7016done
7017  done
7018IFS=$as_save_IFS
7019
7020  ;;
7021esac
7022fi
7023FILE=$ac_cv_path_FILE
7024if test -n "$FILE"; then
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7026$as_echo "$FILE" >&6; }
7027else
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7029$as_echo "no" >&6; }
7030fi
7031
7032
7033  test -n "$FILE" && break
7034done
7035
7036    else
7037      # If it succeeded, then it was overridden by the user. We will use it
7038      # for the tool.
7039
7040      # First remove it from the list of overridden variables, so we can test
7041      # for unknown variables in the end.
7042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7043
7044      # Check if the provided tool contains a complete path.
7045      tool_specified="$FILE"
7046      tool_basename="${tool_specified##*/}"
7047      if test "x$tool_basename" = "x$tool_specified"; then
7048        # A command without a complete path is provided, search $PATH.
7049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7050$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7051        # Extract the first word of "$tool_basename", so it can be a program name with args.
7052set dummy $tool_basename; ac_word=$2
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7054$as_echo_n "checking for $ac_word... " >&6; }
7055if ${ac_cv_path_FILE+:} false; then :
7056  $as_echo_n "(cached) " >&6
7057else
7058  case $FILE in
7059  [\\/]* | ?:[\\/]*)
7060  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7061  ;;
7062  *)
7063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7064for as_dir in $PATH
7065do
7066  IFS=$as_save_IFS
7067  test -z "$as_dir" && as_dir=.
7068    for ac_exec_ext in '' $ac_executable_extensions; do
7069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7070    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7072    break 2
7073  fi
7074done
7075  done
7076IFS=$as_save_IFS
7077
7078  ;;
7079esac
7080fi
7081FILE=$ac_cv_path_FILE
7082if test -n "$FILE"; then
7083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7084$as_echo "$FILE" >&6; }
7085else
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7087$as_echo "no" >&6; }
7088fi
7089
7090
7091        if test "x$FILE" = x; then
7092          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7093        fi
7094      else
7095        # Otherwise we believe it is a complete path. Use it as it is.
7096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7097$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7099$as_echo_n "checking for FILE... " >&6; }
7100        if test ! -x "$tool_specified"; then
7101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7102$as_echo "not found" >&6; }
7103          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7104        fi
7105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7106$as_echo "$tool_specified" >&6; }
7107      fi
7108    fi
7109  fi
7110
7111
7112
7113  if test "x$FILE" = x; then
7114    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7115  fi
7116
7117
7118
7119
7120
7121  # Publish this variable in the help.
7122
7123
7124  if test "x$FIND" = x; then
7125    # The variable is not set by user, try to locate tool using the code snippet
7126    for ac_prog in find
7127do
7128  # Extract the first word of "$ac_prog", so it can be a program name with args.
7129set dummy $ac_prog; ac_word=$2
7130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7131$as_echo_n "checking for $ac_word... " >&6; }
7132if ${ac_cv_path_FIND+:} false; then :
7133  $as_echo_n "(cached) " >&6
7134else
7135  case $FIND in
7136  [\\/]* | ?:[\\/]*)
7137  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7138  ;;
7139  *)
7140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7141for as_dir in $PATH
7142do
7143  IFS=$as_save_IFS
7144  test -z "$as_dir" && as_dir=.
7145    for ac_exec_ext in '' $ac_executable_extensions; do
7146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7147    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7149    break 2
7150  fi
7151done
7152  done
7153IFS=$as_save_IFS
7154
7155  ;;
7156esac
7157fi
7158FIND=$ac_cv_path_FIND
7159if test -n "$FIND"; then
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7161$as_echo "$FIND" >&6; }
7162else
7163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7164$as_echo "no" >&6; }
7165fi
7166
7167
7168  test -n "$FIND" && break
7169done
7170
7171  else
7172    # The variable is set, but is it from the command line or the environment?
7173
7174    # Try to remove the string !FIND! from our list.
7175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7177      # If it failed, the variable was not from the command line. Ignore it,
7178      # but warn the user (except for BASH, which is always set by the calling BASH).
7179      if test "xFIND" != xBASH; then
7180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7181$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7182      fi
7183      # Try to locate tool using the code snippet
7184      for ac_prog in find
7185do
7186  # Extract the first word of "$ac_prog", so it can be a program name with args.
7187set dummy $ac_prog; ac_word=$2
7188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7189$as_echo_n "checking for $ac_word... " >&6; }
7190if ${ac_cv_path_FIND+:} false; then :
7191  $as_echo_n "(cached) " >&6
7192else
7193  case $FIND in
7194  [\\/]* | ?:[\\/]*)
7195  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7196  ;;
7197  *)
7198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7199for as_dir in $PATH
7200do
7201  IFS=$as_save_IFS
7202  test -z "$as_dir" && as_dir=.
7203    for ac_exec_ext in '' $ac_executable_extensions; do
7204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7205    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7207    break 2
7208  fi
7209done
7210  done
7211IFS=$as_save_IFS
7212
7213  ;;
7214esac
7215fi
7216FIND=$ac_cv_path_FIND
7217if test -n "$FIND"; then
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7219$as_echo "$FIND" >&6; }
7220else
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222$as_echo "no" >&6; }
7223fi
7224
7225
7226  test -n "$FIND" && break
7227done
7228
7229    else
7230      # If it succeeded, then it was overridden by the user. We will use it
7231      # for the tool.
7232
7233      # First remove it from the list of overridden variables, so we can test
7234      # for unknown variables in the end.
7235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7236
7237      # Check if the provided tool contains a complete path.
7238      tool_specified="$FIND"
7239      tool_basename="${tool_specified##*/}"
7240      if test "x$tool_basename" = "x$tool_specified"; then
7241        # A command without a complete path is provided, search $PATH.
7242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7243$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7244        # Extract the first word of "$tool_basename", so it can be a program name with args.
7245set dummy $tool_basename; ac_word=$2
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7247$as_echo_n "checking for $ac_word... " >&6; }
7248if ${ac_cv_path_FIND+:} false; then :
7249  $as_echo_n "(cached) " >&6
7250else
7251  case $FIND in
7252  [\\/]* | ?:[\\/]*)
7253  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7254  ;;
7255  *)
7256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7257for as_dir in $PATH
7258do
7259  IFS=$as_save_IFS
7260  test -z "$as_dir" && as_dir=.
7261    for ac_exec_ext in '' $ac_executable_extensions; do
7262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7263    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7265    break 2
7266  fi
7267done
7268  done
7269IFS=$as_save_IFS
7270
7271  ;;
7272esac
7273fi
7274FIND=$ac_cv_path_FIND
7275if test -n "$FIND"; then
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7277$as_echo "$FIND" >&6; }
7278else
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7280$as_echo "no" >&6; }
7281fi
7282
7283
7284        if test "x$FIND" = x; then
7285          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7286        fi
7287      else
7288        # Otherwise we believe it is a complete path. Use it as it is.
7289        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7290$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7292$as_echo_n "checking for FIND... " >&6; }
7293        if test ! -x "$tool_specified"; then
7294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7295$as_echo "not found" >&6; }
7296          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7297        fi
7298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7299$as_echo "$tool_specified" >&6; }
7300      fi
7301    fi
7302  fi
7303
7304
7305
7306  if test "x$FIND" = x; then
7307    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7308  fi
7309
7310
7311
7312
7313
7314  # Publish this variable in the help.
7315
7316
7317  if test "x$HEAD" = x; then
7318    # The variable is not set by user, try to locate tool using the code snippet
7319    for ac_prog in head
7320do
7321  # Extract the first word of "$ac_prog", so it can be a program name with args.
7322set dummy $ac_prog; ac_word=$2
7323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7324$as_echo_n "checking for $ac_word... " >&6; }
7325if ${ac_cv_path_HEAD+:} false; then :
7326  $as_echo_n "(cached) " >&6
7327else
7328  case $HEAD in
7329  [\\/]* | ?:[\\/]*)
7330  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7331  ;;
7332  *)
7333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7334for as_dir in $PATH
7335do
7336  IFS=$as_save_IFS
7337  test -z "$as_dir" && as_dir=.
7338    for ac_exec_ext in '' $ac_executable_extensions; do
7339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7340    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7342    break 2
7343  fi
7344done
7345  done
7346IFS=$as_save_IFS
7347
7348  ;;
7349esac
7350fi
7351HEAD=$ac_cv_path_HEAD
7352if test -n "$HEAD"; then
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7354$as_echo "$HEAD" >&6; }
7355else
7356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357$as_echo "no" >&6; }
7358fi
7359
7360
7361  test -n "$HEAD" && break
7362done
7363
7364  else
7365    # The variable is set, but is it from the command line or the environment?
7366
7367    # Try to remove the string !HEAD! from our list.
7368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7370      # If it failed, the variable was not from the command line. Ignore it,
7371      # but warn the user (except for BASH, which is always set by the calling BASH).
7372      if test "xHEAD" != xBASH; then
7373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7374$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7375      fi
7376      # Try to locate tool using the code snippet
7377      for ac_prog in head
7378do
7379  # Extract the first word of "$ac_prog", so it can be a program name with args.
7380set dummy $ac_prog; ac_word=$2
7381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7382$as_echo_n "checking for $ac_word... " >&6; }
7383if ${ac_cv_path_HEAD+:} false; then :
7384  $as_echo_n "(cached) " >&6
7385else
7386  case $HEAD in
7387  [\\/]* | ?:[\\/]*)
7388  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7389  ;;
7390  *)
7391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7392for as_dir in $PATH
7393do
7394  IFS=$as_save_IFS
7395  test -z "$as_dir" && as_dir=.
7396    for ac_exec_ext in '' $ac_executable_extensions; do
7397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7398    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7400    break 2
7401  fi
7402done
7403  done
7404IFS=$as_save_IFS
7405
7406  ;;
7407esac
7408fi
7409HEAD=$ac_cv_path_HEAD
7410if test -n "$HEAD"; then
7411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7412$as_echo "$HEAD" >&6; }
7413else
7414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7415$as_echo "no" >&6; }
7416fi
7417
7418
7419  test -n "$HEAD" && break
7420done
7421
7422    else
7423      # If it succeeded, then it was overridden by the user. We will use it
7424      # for the tool.
7425
7426      # First remove it from the list of overridden variables, so we can test
7427      # for unknown variables in the end.
7428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7429
7430      # Check if the provided tool contains a complete path.
7431      tool_specified="$HEAD"
7432      tool_basename="${tool_specified##*/}"
7433      if test "x$tool_basename" = "x$tool_specified"; then
7434        # A command without a complete path is provided, search $PATH.
7435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7436$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7437        # Extract the first word of "$tool_basename", so it can be a program name with args.
7438set dummy $tool_basename; ac_word=$2
7439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7440$as_echo_n "checking for $ac_word... " >&6; }
7441if ${ac_cv_path_HEAD+:} false; then :
7442  $as_echo_n "(cached) " >&6
7443else
7444  case $HEAD in
7445  [\\/]* | ?:[\\/]*)
7446  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7447  ;;
7448  *)
7449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450for as_dir in $PATH
7451do
7452  IFS=$as_save_IFS
7453  test -z "$as_dir" && as_dir=.
7454    for ac_exec_ext in '' $ac_executable_extensions; do
7455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7456    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7458    break 2
7459  fi
7460done
7461  done
7462IFS=$as_save_IFS
7463
7464  ;;
7465esac
7466fi
7467HEAD=$ac_cv_path_HEAD
7468if test -n "$HEAD"; then
7469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7470$as_echo "$HEAD" >&6; }
7471else
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
7474fi
7475
7476
7477        if test "x$HEAD" = x; then
7478          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7479        fi
7480      else
7481        # Otherwise we believe it is a complete path. Use it as it is.
7482        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7483$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7485$as_echo_n "checking for HEAD... " >&6; }
7486        if test ! -x "$tool_specified"; then
7487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7488$as_echo "not found" >&6; }
7489          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7490        fi
7491        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7492$as_echo "$tool_specified" >&6; }
7493      fi
7494    fi
7495  fi
7496
7497
7498
7499  if test "x$HEAD" = x; then
7500    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7501  fi
7502
7503
7504
7505
7506
7507  # Publish this variable in the help.
7508
7509
7510  if test "x$LN" = x; then
7511    # The variable is not set by user, try to locate tool using the code snippet
7512    for ac_prog in ln
7513do
7514  # Extract the first word of "$ac_prog", so it can be a program name with args.
7515set dummy $ac_prog; ac_word=$2
7516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7517$as_echo_n "checking for $ac_word... " >&6; }
7518if ${ac_cv_path_LN+:} false; then :
7519  $as_echo_n "(cached) " >&6
7520else
7521  case $LN in
7522  [\\/]* | ?:[\\/]*)
7523  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7524  ;;
7525  *)
7526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527for as_dir in $PATH
7528do
7529  IFS=$as_save_IFS
7530  test -z "$as_dir" && as_dir=.
7531    for ac_exec_ext in '' $ac_executable_extensions; do
7532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7533    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7535    break 2
7536  fi
7537done
7538  done
7539IFS=$as_save_IFS
7540
7541  ;;
7542esac
7543fi
7544LN=$ac_cv_path_LN
7545if test -n "$LN"; then
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7547$as_echo "$LN" >&6; }
7548else
7549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7550$as_echo "no" >&6; }
7551fi
7552
7553
7554  test -n "$LN" && break
7555done
7556
7557  else
7558    # The variable is set, but is it from the command line or the environment?
7559
7560    # Try to remove the string !LN! from our list.
7561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7563      # If it failed, the variable was not from the command line. Ignore it,
7564      # but warn the user (except for BASH, which is always set by the calling BASH).
7565      if test "xLN" != xBASH; then
7566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7567$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7568      fi
7569      # Try to locate tool using the code snippet
7570      for ac_prog in ln
7571do
7572  # Extract the first word of "$ac_prog", so it can be a program name with args.
7573set dummy $ac_prog; ac_word=$2
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7575$as_echo_n "checking for $ac_word... " >&6; }
7576if ${ac_cv_path_LN+:} false; then :
7577  $as_echo_n "(cached) " >&6
7578else
7579  case $LN in
7580  [\\/]* | ?:[\\/]*)
7581  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7582  ;;
7583  *)
7584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585for as_dir in $PATH
7586do
7587  IFS=$as_save_IFS
7588  test -z "$as_dir" && as_dir=.
7589    for ac_exec_ext in '' $ac_executable_extensions; do
7590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7591    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7593    break 2
7594  fi
7595done
7596  done
7597IFS=$as_save_IFS
7598
7599  ;;
7600esac
7601fi
7602LN=$ac_cv_path_LN
7603if test -n "$LN"; then
7604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7605$as_echo "$LN" >&6; }
7606else
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7608$as_echo "no" >&6; }
7609fi
7610
7611
7612  test -n "$LN" && break
7613done
7614
7615    else
7616      # If it succeeded, then it was overridden by the user. We will use it
7617      # for the tool.
7618
7619      # First remove it from the list of overridden variables, so we can test
7620      # for unknown variables in the end.
7621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7622
7623      # Check if the provided tool contains a complete path.
7624      tool_specified="$LN"
7625      tool_basename="${tool_specified##*/}"
7626      if test "x$tool_basename" = "x$tool_specified"; then
7627        # A command without a complete path is provided, search $PATH.
7628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7629$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7630        # Extract the first word of "$tool_basename", so it can be a program name with args.
7631set dummy $tool_basename; ac_word=$2
7632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7633$as_echo_n "checking for $ac_word... " >&6; }
7634if ${ac_cv_path_LN+:} false; then :
7635  $as_echo_n "(cached) " >&6
7636else
7637  case $LN in
7638  [\\/]* | ?:[\\/]*)
7639  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7640  ;;
7641  *)
7642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7643for as_dir in $PATH
7644do
7645  IFS=$as_save_IFS
7646  test -z "$as_dir" && as_dir=.
7647    for ac_exec_ext in '' $ac_executable_extensions; do
7648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7649    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7651    break 2
7652  fi
7653done
7654  done
7655IFS=$as_save_IFS
7656
7657  ;;
7658esac
7659fi
7660LN=$ac_cv_path_LN
7661if test -n "$LN"; then
7662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7663$as_echo "$LN" >&6; }
7664else
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7666$as_echo "no" >&6; }
7667fi
7668
7669
7670        if test "x$LN" = x; then
7671          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7672        fi
7673      else
7674        # Otherwise we believe it is a complete path. Use it as it is.
7675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7676$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7678$as_echo_n "checking for LN... " >&6; }
7679        if test ! -x "$tool_specified"; then
7680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7681$as_echo "not found" >&6; }
7682          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7683        fi
7684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7685$as_echo "$tool_specified" >&6; }
7686      fi
7687    fi
7688  fi
7689
7690
7691
7692  if test "x$LN" = x; then
7693    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7694  fi
7695
7696
7697
7698
7699
7700  # Publish this variable in the help.
7701
7702
7703  if test "x$LS" = x; then
7704    # The variable is not set by user, try to locate tool using the code snippet
7705    for ac_prog in ls
7706do
7707  # Extract the first word of "$ac_prog", so it can be a program name with args.
7708set dummy $ac_prog; ac_word=$2
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7710$as_echo_n "checking for $ac_word... " >&6; }
7711if ${ac_cv_path_LS+:} false; then :
7712  $as_echo_n "(cached) " >&6
7713else
7714  case $LS in
7715  [\\/]* | ?:[\\/]*)
7716  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7717  ;;
7718  *)
7719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7720for as_dir in $PATH
7721do
7722  IFS=$as_save_IFS
7723  test -z "$as_dir" && as_dir=.
7724    for ac_exec_ext in '' $ac_executable_extensions; do
7725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7726    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7728    break 2
7729  fi
7730done
7731  done
7732IFS=$as_save_IFS
7733
7734  ;;
7735esac
7736fi
7737LS=$ac_cv_path_LS
7738if test -n "$LS"; then
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7740$as_echo "$LS" >&6; }
7741else
7742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7743$as_echo "no" >&6; }
7744fi
7745
7746
7747  test -n "$LS" && break
7748done
7749
7750  else
7751    # The variable is set, but is it from the command line or the environment?
7752
7753    # Try to remove the string !LS! from our list.
7754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7756      # If it failed, the variable was not from the command line. Ignore it,
7757      # but warn the user (except for BASH, which is always set by the calling BASH).
7758      if test "xLS" != xBASH; then
7759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7760$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7761      fi
7762      # Try to locate tool using the code snippet
7763      for ac_prog in ls
7764do
7765  # Extract the first word of "$ac_prog", so it can be a program name with args.
7766set dummy $ac_prog; ac_word=$2
7767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7768$as_echo_n "checking for $ac_word... " >&6; }
7769if ${ac_cv_path_LS+:} false; then :
7770  $as_echo_n "(cached) " >&6
7771else
7772  case $LS in
7773  [\\/]* | ?:[\\/]*)
7774  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7775  ;;
7776  *)
7777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7778for as_dir in $PATH
7779do
7780  IFS=$as_save_IFS
7781  test -z "$as_dir" && as_dir=.
7782    for ac_exec_ext in '' $ac_executable_extensions; do
7783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7784    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7786    break 2
7787  fi
7788done
7789  done
7790IFS=$as_save_IFS
7791
7792  ;;
7793esac
7794fi
7795LS=$ac_cv_path_LS
7796if test -n "$LS"; then
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7798$as_echo "$LS" >&6; }
7799else
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7801$as_echo "no" >&6; }
7802fi
7803
7804
7805  test -n "$LS" && break
7806done
7807
7808    else
7809      # If it succeeded, then it was overridden by the user. We will use it
7810      # for the tool.
7811
7812      # First remove it from the list of overridden variables, so we can test
7813      # for unknown variables in the end.
7814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7815
7816      # Check if the provided tool contains a complete path.
7817      tool_specified="$LS"
7818      tool_basename="${tool_specified##*/}"
7819      if test "x$tool_basename" = "x$tool_specified"; then
7820        # A command without a complete path is provided, search $PATH.
7821        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7822$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7823        # Extract the first word of "$tool_basename", so it can be a program name with args.
7824set dummy $tool_basename; ac_word=$2
7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7826$as_echo_n "checking for $ac_word... " >&6; }
7827if ${ac_cv_path_LS+:} false; then :
7828  $as_echo_n "(cached) " >&6
7829else
7830  case $LS in
7831  [\\/]* | ?:[\\/]*)
7832  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7833  ;;
7834  *)
7835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7836for as_dir in $PATH
7837do
7838  IFS=$as_save_IFS
7839  test -z "$as_dir" && as_dir=.
7840    for ac_exec_ext in '' $ac_executable_extensions; do
7841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7842    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7844    break 2
7845  fi
7846done
7847  done
7848IFS=$as_save_IFS
7849
7850  ;;
7851esac
7852fi
7853LS=$ac_cv_path_LS
7854if test -n "$LS"; then
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7856$as_echo "$LS" >&6; }
7857else
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7859$as_echo "no" >&6; }
7860fi
7861
7862
7863        if test "x$LS" = x; then
7864          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7865        fi
7866      else
7867        # Otherwise we believe it is a complete path. Use it as it is.
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7869$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7871$as_echo_n "checking for LS... " >&6; }
7872        if test ! -x "$tool_specified"; then
7873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7874$as_echo "not found" >&6; }
7875          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7876        fi
7877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7878$as_echo "$tool_specified" >&6; }
7879      fi
7880    fi
7881  fi
7882
7883
7884
7885  if test "x$LS" = x; then
7886    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7887  fi
7888
7889
7890
7891
7892
7893  # Publish this variable in the help.
7894
7895
7896  if test "x$MKDIR" = x; then
7897    # The variable is not set by user, try to locate tool using the code snippet
7898    for ac_prog in mkdir
7899do
7900  # Extract the first word of "$ac_prog", so it can be a program name with args.
7901set dummy $ac_prog; ac_word=$2
7902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7903$as_echo_n "checking for $ac_word... " >&6; }
7904if ${ac_cv_path_MKDIR+:} false; then :
7905  $as_echo_n "(cached) " >&6
7906else
7907  case $MKDIR in
7908  [\\/]* | ?:[\\/]*)
7909  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7910  ;;
7911  *)
7912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7913for as_dir in $PATH
7914do
7915  IFS=$as_save_IFS
7916  test -z "$as_dir" && as_dir=.
7917    for ac_exec_ext in '' $ac_executable_extensions; do
7918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7919    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7921    break 2
7922  fi
7923done
7924  done
7925IFS=$as_save_IFS
7926
7927  ;;
7928esac
7929fi
7930MKDIR=$ac_cv_path_MKDIR
7931if test -n "$MKDIR"; then
7932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7933$as_echo "$MKDIR" >&6; }
7934else
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7936$as_echo "no" >&6; }
7937fi
7938
7939
7940  test -n "$MKDIR" && break
7941done
7942
7943  else
7944    # The variable is set, but is it from the command line or the environment?
7945
7946    # Try to remove the string !MKDIR! from our list.
7947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7949      # If it failed, the variable was not from the command line. Ignore it,
7950      # but warn the user (except for BASH, which is always set by the calling BASH).
7951      if test "xMKDIR" != xBASH; then
7952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7953$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7954      fi
7955      # Try to locate tool using the code snippet
7956      for ac_prog in mkdir
7957do
7958  # Extract the first word of "$ac_prog", so it can be a program name with args.
7959set dummy $ac_prog; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if ${ac_cv_path_MKDIR+:} false; then :
7963  $as_echo_n "(cached) " >&6
7964else
7965  case $MKDIR in
7966  [\\/]* | ?:[\\/]*)
7967  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7968  ;;
7969  *)
7970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH
7972do
7973  IFS=$as_save_IFS
7974  test -z "$as_dir" && as_dir=.
7975    for ac_exec_ext in '' $ac_executable_extensions; do
7976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7977    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979    break 2
7980  fi
7981done
7982  done
7983IFS=$as_save_IFS
7984
7985  ;;
7986esac
7987fi
7988MKDIR=$ac_cv_path_MKDIR
7989if test -n "$MKDIR"; then
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7991$as_echo "$MKDIR" >&6; }
7992else
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7994$as_echo "no" >&6; }
7995fi
7996
7997
7998  test -n "$MKDIR" && break
7999done
8000
8001    else
8002      # If it succeeded, then it was overridden by the user. We will use it
8003      # for the tool.
8004
8005      # First remove it from the list of overridden variables, so we can test
8006      # for unknown variables in the end.
8007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8008
8009      # Check if the provided tool contains a complete path.
8010      tool_specified="$MKDIR"
8011      tool_basename="${tool_specified##*/}"
8012      if test "x$tool_basename" = "x$tool_specified"; then
8013        # A command without a complete path is provided, search $PATH.
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8015$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8016        # Extract the first word of "$tool_basename", so it can be a program name with args.
8017set dummy $tool_basename; ac_word=$2
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8019$as_echo_n "checking for $ac_word... " >&6; }
8020if ${ac_cv_path_MKDIR+:} false; then :
8021  $as_echo_n "(cached) " >&6
8022else
8023  case $MKDIR in
8024  [\\/]* | ?:[\\/]*)
8025  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8026  ;;
8027  *)
8028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8029for as_dir in $PATH
8030do
8031  IFS=$as_save_IFS
8032  test -z "$as_dir" && as_dir=.
8033    for ac_exec_ext in '' $ac_executable_extensions; do
8034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8035    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8037    break 2
8038  fi
8039done
8040  done
8041IFS=$as_save_IFS
8042
8043  ;;
8044esac
8045fi
8046MKDIR=$ac_cv_path_MKDIR
8047if test -n "$MKDIR"; then
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8049$as_echo "$MKDIR" >&6; }
8050else
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }
8053fi
8054
8055
8056        if test "x$MKDIR" = x; then
8057          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8058        fi
8059      else
8060        # Otherwise we believe it is a complete path. Use it as it is.
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8062$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8064$as_echo_n "checking for MKDIR... " >&6; }
8065        if test ! -x "$tool_specified"; then
8066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8067$as_echo "not found" >&6; }
8068          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8069        fi
8070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8071$as_echo "$tool_specified" >&6; }
8072      fi
8073    fi
8074  fi
8075
8076
8077
8078  if test "x$MKDIR" = x; then
8079    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8080  fi
8081
8082
8083
8084
8085
8086  # Publish this variable in the help.
8087
8088
8089  if test "x$MKTEMP" = x; then
8090    # The variable is not set by user, try to locate tool using the code snippet
8091    for ac_prog in mktemp
8092do
8093  # Extract the first word of "$ac_prog", so it can be a program name with args.
8094set dummy $ac_prog; ac_word=$2
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8096$as_echo_n "checking for $ac_word... " >&6; }
8097if ${ac_cv_path_MKTEMP+:} false; then :
8098  $as_echo_n "(cached) " >&6
8099else
8100  case $MKTEMP in
8101  [\\/]* | ?:[\\/]*)
8102  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8103  ;;
8104  *)
8105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8106for as_dir in $PATH
8107do
8108  IFS=$as_save_IFS
8109  test -z "$as_dir" && as_dir=.
8110    for ac_exec_ext in '' $ac_executable_extensions; do
8111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8112    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8114    break 2
8115  fi
8116done
8117  done
8118IFS=$as_save_IFS
8119
8120  ;;
8121esac
8122fi
8123MKTEMP=$ac_cv_path_MKTEMP
8124if test -n "$MKTEMP"; then
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8126$as_echo "$MKTEMP" >&6; }
8127else
8128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129$as_echo "no" >&6; }
8130fi
8131
8132
8133  test -n "$MKTEMP" && break
8134done
8135
8136  else
8137    # The variable is set, but is it from the command line or the environment?
8138
8139    # Try to remove the string !MKTEMP! from our list.
8140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8142      # If it failed, the variable was not from the command line. Ignore it,
8143      # but warn the user (except for BASH, which is always set by the calling BASH).
8144      if test "xMKTEMP" != xBASH; then
8145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8146$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8147      fi
8148      # Try to locate tool using the code snippet
8149      for ac_prog in mktemp
8150do
8151  # Extract the first word of "$ac_prog", so it can be a program name with args.
8152set dummy $ac_prog; ac_word=$2
8153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154$as_echo_n "checking for $ac_word... " >&6; }
8155if ${ac_cv_path_MKTEMP+:} false; then :
8156  $as_echo_n "(cached) " >&6
8157else
8158  case $MKTEMP in
8159  [\\/]* | ?:[\\/]*)
8160  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8161  ;;
8162  *)
8163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164for as_dir in $PATH
8165do
8166  IFS=$as_save_IFS
8167  test -z "$as_dir" && as_dir=.
8168    for ac_exec_ext in '' $ac_executable_extensions; do
8169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8170    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8172    break 2
8173  fi
8174done
8175  done
8176IFS=$as_save_IFS
8177
8178  ;;
8179esac
8180fi
8181MKTEMP=$ac_cv_path_MKTEMP
8182if test -n "$MKTEMP"; then
8183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8184$as_echo "$MKTEMP" >&6; }
8185else
8186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8187$as_echo "no" >&6; }
8188fi
8189
8190
8191  test -n "$MKTEMP" && break
8192done
8193
8194    else
8195      # If it succeeded, then it was overridden by the user. We will use it
8196      # for the tool.
8197
8198      # First remove it from the list of overridden variables, so we can test
8199      # for unknown variables in the end.
8200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8201
8202      # Check if the provided tool contains a complete path.
8203      tool_specified="$MKTEMP"
8204      tool_basename="${tool_specified##*/}"
8205      if test "x$tool_basename" = "x$tool_specified"; then
8206        # A command without a complete path is provided, search $PATH.
8207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8208$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8209        # Extract the first word of "$tool_basename", so it can be a program name with args.
8210set dummy $tool_basename; ac_word=$2
8211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8212$as_echo_n "checking for $ac_word... " >&6; }
8213if ${ac_cv_path_MKTEMP+:} false; then :
8214  $as_echo_n "(cached) " >&6
8215else
8216  case $MKTEMP in
8217  [\\/]* | ?:[\\/]*)
8218  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8219  ;;
8220  *)
8221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236  ;;
8237esac
8238fi
8239MKTEMP=$ac_cv_path_MKTEMP
8240if test -n "$MKTEMP"; then
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8242$as_echo "$MKTEMP" >&6; }
8243else
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
8246fi
8247
8248
8249        if test "x$MKTEMP" = x; then
8250          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8251        fi
8252      else
8253        # Otherwise we believe it is a complete path. Use it as it is.
8254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8255$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8257$as_echo_n "checking for MKTEMP... " >&6; }
8258        if test ! -x "$tool_specified"; then
8259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8260$as_echo "not found" >&6; }
8261          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8262        fi
8263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8264$as_echo "$tool_specified" >&6; }
8265      fi
8266    fi
8267  fi
8268
8269
8270
8271  if test "x$MKTEMP" = x; then
8272    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8273  fi
8274
8275
8276
8277
8278
8279  # Publish this variable in the help.
8280
8281
8282  if test "x$MV" = x; then
8283    # The variable is not set by user, try to locate tool using the code snippet
8284    for ac_prog in mv
8285do
8286  # Extract the first word of "$ac_prog", so it can be a program name with args.
8287set dummy $ac_prog; ac_word=$2
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8289$as_echo_n "checking for $ac_word... " >&6; }
8290if ${ac_cv_path_MV+:} false; then :
8291  $as_echo_n "(cached) " >&6
8292else
8293  case $MV in
8294  [\\/]* | ?:[\\/]*)
8295  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8296  ;;
8297  *)
8298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8299for as_dir in $PATH
8300do
8301  IFS=$as_save_IFS
8302  test -z "$as_dir" && as_dir=.
8303    for ac_exec_ext in '' $ac_executable_extensions; do
8304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8305    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8307    break 2
8308  fi
8309done
8310  done
8311IFS=$as_save_IFS
8312
8313  ;;
8314esac
8315fi
8316MV=$ac_cv_path_MV
8317if test -n "$MV"; then
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8319$as_echo "$MV" >&6; }
8320else
8321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8322$as_echo "no" >&6; }
8323fi
8324
8325
8326  test -n "$MV" && break
8327done
8328
8329  else
8330    # The variable is set, but is it from the command line or the environment?
8331
8332    # Try to remove the string !MV! from our list.
8333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8335      # If it failed, the variable was not from the command line. Ignore it,
8336      # but warn the user (except for BASH, which is always set by the calling BASH).
8337      if test "xMV" != xBASH; then
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8339$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8340      fi
8341      # Try to locate tool using the code snippet
8342      for ac_prog in mv
8343do
8344  # Extract the first word of "$ac_prog", so it can be a program name with args.
8345set dummy $ac_prog; ac_word=$2
8346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8347$as_echo_n "checking for $ac_word... " >&6; }
8348if ${ac_cv_path_MV+:} false; then :
8349  $as_echo_n "(cached) " >&6
8350else
8351  case $MV in
8352  [\\/]* | ?:[\\/]*)
8353  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8354  ;;
8355  *)
8356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8357for as_dir in $PATH
8358do
8359  IFS=$as_save_IFS
8360  test -z "$as_dir" && as_dir=.
8361    for ac_exec_ext in '' $ac_executable_extensions; do
8362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8363    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8365    break 2
8366  fi
8367done
8368  done
8369IFS=$as_save_IFS
8370
8371  ;;
8372esac
8373fi
8374MV=$ac_cv_path_MV
8375if test -n "$MV"; then
8376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8377$as_echo "$MV" >&6; }
8378else
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380$as_echo "no" >&6; }
8381fi
8382
8383
8384  test -n "$MV" && break
8385done
8386
8387    else
8388      # If it succeeded, then it was overridden by the user. We will use it
8389      # for the tool.
8390
8391      # First remove it from the list of overridden variables, so we can test
8392      # for unknown variables in the end.
8393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8394
8395      # Check if the provided tool contains a complete path.
8396      tool_specified="$MV"
8397      tool_basename="${tool_specified##*/}"
8398      if test "x$tool_basename" = "x$tool_specified"; then
8399        # A command without a complete path is provided, search $PATH.
8400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8401$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8402        # Extract the first word of "$tool_basename", so it can be a program name with args.
8403set dummy $tool_basename; ac_word=$2
8404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8405$as_echo_n "checking for $ac_word... " >&6; }
8406if ${ac_cv_path_MV+:} false; then :
8407  $as_echo_n "(cached) " >&6
8408else
8409  case $MV in
8410  [\\/]* | ?:[\\/]*)
8411  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8412  ;;
8413  *)
8414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8415for as_dir in $PATH
8416do
8417  IFS=$as_save_IFS
8418  test -z "$as_dir" && as_dir=.
8419    for ac_exec_ext in '' $ac_executable_extensions; do
8420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8421    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8423    break 2
8424  fi
8425done
8426  done
8427IFS=$as_save_IFS
8428
8429  ;;
8430esac
8431fi
8432MV=$ac_cv_path_MV
8433if test -n "$MV"; then
8434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8435$as_echo "$MV" >&6; }
8436else
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438$as_echo "no" >&6; }
8439fi
8440
8441
8442        if test "x$MV" = x; then
8443          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8444        fi
8445      else
8446        # Otherwise we believe it is a complete path. Use it as it is.
8447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8448$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8450$as_echo_n "checking for MV... " >&6; }
8451        if test ! -x "$tool_specified"; then
8452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8453$as_echo "not found" >&6; }
8454          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8455        fi
8456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8457$as_echo "$tool_specified" >&6; }
8458      fi
8459    fi
8460  fi
8461
8462
8463
8464  if test "x$MV" = x; then
8465    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8466  fi
8467
8468
8469
8470
8471
8472  # Publish this variable in the help.
8473
8474
8475  if test "x$NAWK" = x; then
8476    # The variable is not set by user, try to locate tool using the code snippet
8477    for ac_prog in nawk gawk awk
8478do
8479  # Extract the first word of "$ac_prog", so it can be a program name with args.
8480set dummy $ac_prog; ac_word=$2
8481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8482$as_echo_n "checking for $ac_word... " >&6; }
8483if ${ac_cv_path_NAWK+:} false; then :
8484  $as_echo_n "(cached) " >&6
8485else
8486  case $NAWK in
8487  [\\/]* | ?:[\\/]*)
8488  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8489  ;;
8490  *)
8491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8492for as_dir in $PATH
8493do
8494  IFS=$as_save_IFS
8495  test -z "$as_dir" && as_dir=.
8496    for ac_exec_ext in '' $ac_executable_extensions; do
8497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8498    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8500    break 2
8501  fi
8502done
8503  done
8504IFS=$as_save_IFS
8505
8506  ;;
8507esac
8508fi
8509NAWK=$ac_cv_path_NAWK
8510if test -n "$NAWK"; then
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8512$as_echo "$NAWK" >&6; }
8513else
8514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515$as_echo "no" >&6; }
8516fi
8517
8518
8519  test -n "$NAWK" && break
8520done
8521
8522  else
8523    # The variable is set, but is it from the command line or the environment?
8524
8525    # Try to remove the string !NAWK! from our list.
8526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8528      # If it failed, the variable was not from the command line. Ignore it,
8529      # but warn the user (except for BASH, which is always set by the calling BASH).
8530      if test "xNAWK" != xBASH; then
8531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8532$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8533      fi
8534      # Try to locate tool using the code snippet
8535      for ac_prog in nawk gawk awk
8536do
8537  # Extract the first word of "$ac_prog", so it can be a program name with args.
8538set dummy $ac_prog; ac_word=$2
8539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8540$as_echo_n "checking for $ac_word... " >&6; }
8541if ${ac_cv_path_NAWK+:} false; then :
8542  $as_echo_n "(cached) " >&6
8543else
8544  case $NAWK in
8545  [\\/]* | ?:[\\/]*)
8546  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8547  ;;
8548  *)
8549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8550for as_dir in $PATH
8551do
8552  IFS=$as_save_IFS
8553  test -z "$as_dir" && as_dir=.
8554    for ac_exec_ext in '' $ac_executable_extensions; do
8555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8556    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8558    break 2
8559  fi
8560done
8561  done
8562IFS=$as_save_IFS
8563
8564  ;;
8565esac
8566fi
8567NAWK=$ac_cv_path_NAWK
8568if test -n "$NAWK"; then
8569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8570$as_echo "$NAWK" >&6; }
8571else
8572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8573$as_echo "no" >&6; }
8574fi
8575
8576
8577  test -n "$NAWK" && break
8578done
8579
8580    else
8581      # If it succeeded, then it was overridden by the user. We will use it
8582      # for the tool.
8583
8584      # First remove it from the list of overridden variables, so we can test
8585      # for unknown variables in the end.
8586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8587
8588      # Check if the provided tool contains a complete path.
8589      tool_specified="$NAWK"
8590      tool_basename="${tool_specified##*/}"
8591      if test "x$tool_basename" = "x$tool_specified"; then
8592        # A command without a complete path is provided, search $PATH.
8593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8594$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8595        # Extract the first word of "$tool_basename", so it can be a program name with args.
8596set dummy $tool_basename; ac_word=$2
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598$as_echo_n "checking for $ac_word... " >&6; }
8599if ${ac_cv_path_NAWK+:} false; then :
8600  $as_echo_n "(cached) " >&6
8601else
8602  case $NAWK in
8603  [\\/]* | ?:[\\/]*)
8604  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8605  ;;
8606  *)
8607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610  IFS=$as_save_IFS
8611  test -z "$as_dir" && as_dir=.
8612    for ac_exec_ext in '' $ac_executable_extensions; do
8613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616    break 2
8617  fi
8618done
8619  done
8620IFS=$as_save_IFS
8621
8622  ;;
8623esac
8624fi
8625NAWK=$ac_cv_path_NAWK
8626if test -n "$NAWK"; then
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8628$as_echo "$NAWK" >&6; }
8629else
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
8633
8634
8635        if test "x$NAWK" = x; then
8636          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8637        fi
8638      else
8639        # Otherwise we believe it is a complete path. Use it as it is.
8640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8641$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8643$as_echo_n "checking for NAWK... " >&6; }
8644        if test ! -x "$tool_specified"; then
8645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8646$as_echo "not found" >&6; }
8647          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8648        fi
8649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8650$as_echo "$tool_specified" >&6; }
8651      fi
8652    fi
8653  fi
8654
8655
8656
8657  if test "x$NAWK" = x; then
8658    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8659  fi
8660
8661
8662
8663
8664
8665  # Publish this variable in the help.
8666
8667
8668  if test "x$PRINTF" = x; then
8669    # The variable is not set by user, try to locate tool using the code snippet
8670    for ac_prog in printf
8671do
8672  # Extract the first word of "$ac_prog", so it can be a program name with args.
8673set dummy $ac_prog; ac_word=$2
8674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8675$as_echo_n "checking for $ac_word... " >&6; }
8676if ${ac_cv_path_PRINTF+:} false; then :
8677  $as_echo_n "(cached) " >&6
8678else
8679  case $PRINTF in
8680  [\\/]* | ?:[\\/]*)
8681  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8682  ;;
8683  *)
8684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8685for as_dir in $PATH
8686do
8687  IFS=$as_save_IFS
8688  test -z "$as_dir" && as_dir=.
8689    for ac_exec_ext in '' $ac_executable_extensions; do
8690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8691    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8693    break 2
8694  fi
8695done
8696  done
8697IFS=$as_save_IFS
8698
8699  ;;
8700esac
8701fi
8702PRINTF=$ac_cv_path_PRINTF
8703if test -n "$PRINTF"; then
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8705$as_echo "$PRINTF" >&6; }
8706else
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8708$as_echo "no" >&6; }
8709fi
8710
8711
8712  test -n "$PRINTF" && break
8713done
8714
8715  else
8716    # The variable is set, but is it from the command line or the environment?
8717
8718    # Try to remove the string !PRINTF! from our list.
8719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8721      # If it failed, the variable was not from the command line. Ignore it,
8722      # but warn the user (except for BASH, which is always set by the calling BASH).
8723      if test "xPRINTF" != xBASH; then
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8725$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8726      fi
8727      # Try to locate tool using the code snippet
8728      for ac_prog in printf
8729do
8730  # Extract the first word of "$ac_prog", so it can be a program name with args.
8731set dummy $ac_prog; ac_word=$2
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733$as_echo_n "checking for $ac_word... " >&6; }
8734if ${ac_cv_path_PRINTF+:} false; then :
8735  $as_echo_n "(cached) " >&6
8736else
8737  case $PRINTF in
8738  [\\/]* | ?:[\\/]*)
8739  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8740  ;;
8741  *)
8742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8743for as_dir in $PATH
8744do
8745  IFS=$as_save_IFS
8746  test -z "$as_dir" && as_dir=.
8747    for ac_exec_ext in '' $ac_executable_extensions; do
8748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8749    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8751    break 2
8752  fi
8753done
8754  done
8755IFS=$as_save_IFS
8756
8757  ;;
8758esac
8759fi
8760PRINTF=$ac_cv_path_PRINTF
8761if test -n "$PRINTF"; then
8762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8763$as_echo "$PRINTF" >&6; }
8764else
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8766$as_echo "no" >&6; }
8767fi
8768
8769
8770  test -n "$PRINTF" && break
8771done
8772
8773    else
8774      # If it succeeded, then it was overridden by the user. We will use it
8775      # for the tool.
8776
8777      # First remove it from the list of overridden variables, so we can test
8778      # for unknown variables in the end.
8779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8780
8781      # Check if the provided tool contains a complete path.
8782      tool_specified="$PRINTF"
8783      tool_basename="${tool_specified##*/}"
8784      if test "x$tool_basename" = "x$tool_specified"; then
8785        # A command without a complete path is provided, search $PATH.
8786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8787$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8788        # Extract the first word of "$tool_basename", so it can be a program name with args.
8789set dummy $tool_basename; ac_word=$2
8790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8791$as_echo_n "checking for $ac_word... " >&6; }
8792if ${ac_cv_path_PRINTF+:} false; then :
8793  $as_echo_n "(cached) " >&6
8794else
8795  case $PRINTF in
8796  [\\/]* | ?:[\\/]*)
8797  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8798  ;;
8799  *)
8800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8801for as_dir in $PATH
8802do
8803  IFS=$as_save_IFS
8804  test -z "$as_dir" && as_dir=.
8805    for ac_exec_ext in '' $ac_executable_extensions; do
8806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8807    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8809    break 2
8810  fi
8811done
8812  done
8813IFS=$as_save_IFS
8814
8815  ;;
8816esac
8817fi
8818PRINTF=$ac_cv_path_PRINTF
8819if test -n "$PRINTF"; then
8820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8821$as_echo "$PRINTF" >&6; }
8822else
8823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8824$as_echo "no" >&6; }
8825fi
8826
8827
8828        if test "x$PRINTF" = x; then
8829          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8830        fi
8831      else
8832        # Otherwise we believe it is a complete path. Use it as it is.
8833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8834$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8836$as_echo_n "checking for PRINTF... " >&6; }
8837        if test ! -x "$tool_specified"; then
8838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8839$as_echo "not found" >&6; }
8840          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8841        fi
8842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8843$as_echo "$tool_specified" >&6; }
8844      fi
8845    fi
8846  fi
8847
8848
8849
8850  if test "x$PRINTF" = x; then
8851    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8852  fi
8853
8854
8855
8856
8857
8858  # Publish this variable in the help.
8859
8860
8861  if test "x$RM" = x; then
8862    # The variable is not set by user, try to locate tool using the code snippet
8863    for ac_prog in rm
8864do
8865  # Extract the first word of "$ac_prog", so it can be a program name with args.
8866set dummy $ac_prog; ac_word=$2
8867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8868$as_echo_n "checking for $ac_word... " >&6; }
8869if ${ac_cv_path_RM+:} false; then :
8870  $as_echo_n "(cached) " >&6
8871else
8872  case $RM in
8873  [\\/]* | ?:[\\/]*)
8874  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8875  ;;
8876  *)
8877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8878for as_dir in $PATH
8879do
8880  IFS=$as_save_IFS
8881  test -z "$as_dir" && as_dir=.
8882    for ac_exec_ext in '' $ac_executable_extensions; do
8883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8884    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8886    break 2
8887  fi
8888done
8889  done
8890IFS=$as_save_IFS
8891
8892  ;;
8893esac
8894fi
8895RM=$ac_cv_path_RM
8896if test -n "$RM"; then
8897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8898$as_echo "$RM" >&6; }
8899else
8900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8901$as_echo "no" >&6; }
8902fi
8903
8904
8905  test -n "$RM" && break
8906done
8907
8908  else
8909    # The variable is set, but is it from the command line or the environment?
8910
8911    # Try to remove the string !RM! from our list.
8912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8914      # If it failed, the variable was not from the command line. Ignore it,
8915      # but warn the user (except for BASH, which is always set by the calling BASH).
8916      if test "xRM" != xBASH; then
8917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8918$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8919      fi
8920      # Try to locate tool using the code snippet
8921      for ac_prog in rm
8922do
8923  # Extract the first word of "$ac_prog", so it can be a program name with args.
8924set dummy $ac_prog; ac_word=$2
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8926$as_echo_n "checking for $ac_word... " >&6; }
8927if ${ac_cv_path_RM+:} false; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  case $RM in
8931  [\\/]* | ?:[\\/]*)
8932  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8933  ;;
8934  *)
8935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938  IFS=$as_save_IFS
8939  test -z "$as_dir" && as_dir=.
8940    for ac_exec_ext in '' $ac_executable_extensions; do
8941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944    break 2
8945  fi
8946done
8947  done
8948IFS=$as_save_IFS
8949
8950  ;;
8951esac
8952fi
8953RM=$ac_cv_path_RM
8954if test -n "$RM"; then
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8956$as_echo "$RM" >&6; }
8957else
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963  test -n "$RM" && break
8964done
8965
8966    else
8967      # If it succeeded, then it was overridden by the user. We will use it
8968      # for the tool.
8969
8970      # First remove it from the list of overridden variables, so we can test
8971      # for unknown variables in the end.
8972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8973
8974      # Check if the provided tool contains a complete path.
8975      tool_specified="$RM"
8976      tool_basename="${tool_specified##*/}"
8977      if test "x$tool_basename" = "x$tool_specified"; then
8978        # A command without a complete path is provided, search $PATH.
8979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8980$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8981        # Extract the first word of "$tool_basename", so it can be a program name with args.
8982set dummy $tool_basename; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_RM+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $RM in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011RM=$ac_cv_path_RM
9012if test -n "$RM"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9014$as_echo "$RM" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021        if test "x$RM" = x; then
9022          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9023        fi
9024      else
9025        # Otherwise we believe it is a complete path. Use it as it is.
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9027$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9029$as_echo_n "checking for RM... " >&6; }
9030        if test ! -x "$tool_specified"; then
9031          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9032$as_echo "not found" >&6; }
9033          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9034        fi
9035        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9036$as_echo "$tool_specified" >&6; }
9037      fi
9038    fi
9039  fi
9040
9041
9042
9043  if test "x$RM" = x; then
9044    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9045  fi
9046
9047
9048
9049
9050
9051  # Publish this variable in the help.
9052
9053
9054  if test "x$SH" = x; then
9055    # The variable is not set by user, try to locate tool using the code snippet
9056    for ac_prog in sh
9057do
9058  # Extract the first word of "$ac_prog", so it can be a program name with args.
9059set dummy $ac_prog; ac_word=$2
9060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9061$as_echo_n "checking for $ac_word... " >&6; }
9062if ${ac_cv_path_SH+:} false; then :
9063  $as_echo_n "(cached) " >&6
9064else
9065  case $SH in
9066  [\\/]* | ?:[\\/]*)
9067  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9068  ;;
9069  *)
9070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9071for as_dir in $PATH
9072do
9073  IFS=$as_save_IFS
9074  test -z "$as_dir" && as_dir=.
9075    for ac_exec_ext in '' $ac_executable_extensions; do
9076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9077    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9079    break 2
9080  fi
9081done
9082  done
9083IFS=$as_save_IFS
9084
9085  ;;
9086esac
9087fi
9088SH=$ac_cv_path_SH
9089if test -n "$SH"; then
9090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9091$as_echo "$SH" >&6; }
9092else
9093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9094$as_echo "no" >&6; }
9095fi
9096
9097
9098  test -n "$SH" && break
9099done
9100
9101  else
9102    # The variable is set, but is it from the command line or the environment?
9103
9104    # Try to remove the string !SH! from our list.
9105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9107      # If it failed, the variable was not from the command line. Ignore it,
9108      # but warn the user (except for BASH, which is always set by the calling BASH).
9109      if test "xSH" != xBASH; then
9110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9111$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9112      fi
9113      # Try to locate tool using the code snippet
9114      for ac_prog in sh
9115do
9116  # Extract the first word of "$ac_prog", so it can be a program name with args.
9117set dummy $ac_prog; ac_word=$2
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9119$as_echo_n "checking for $ac_word... " >&6; }
9120if ${ac_cv_path_SH+:} false; then :
9121  $as_echo_n "(cached) " >&6
9122else
9123  case $SH in
9124  [\\/]* | ?:[\\/]*)
9125  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9126  ;;
9127  *)
9128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9129for as_dir in $PATH
9130do
9131  IFS=$as_save_IFS
9132  test -z "$as_dir" && as_dir=.
9133    for ac_exec_ext in '' $ac_executable_extensions; do
9134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9135    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9137    break 2
9138  fi
9139done
9140  done
9141IFS=$as_save_IFS
9142
9143  ;;
9144esac
9145fi
9146SH=$ac_cv_path_SH
9147if test -n "$SH"; then
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9149$as_echo "$SH" >&6; }
9150else
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
9153fi
9154
9155
9156  test -n "$SH" && break
9157done
9158
9159    else
9160      # If it succeeded, then it was overridden by the user. We will use it
9161      # for the tool.
9162
9163      # First remove it from the list of overridden variables, so we can test
9164      # for unknown variables in the end.
9165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9166
9167      # Check if the provided tool contains a complete path.
9168      tool_specified="$SH"
9169      tool_basename="${tool_specified##*/}"
9170      if test "x$tool_basename" = "x$tool_specified"; then
9171        # A command without a complete path is provided, search $PATH.
9172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9173$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9174        # Extract the first word of "$tool_basename", so it can be a program name with args.
9175set dummy $tool_basename; ac_word=$2
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9177$as_echo_n "checking for $ac_word... " >&6; }
9178if ${ac_cv_path_SH+:} false; then :
9179  $as_echo_n "(cached) " >&6
9180else
9181  case $SH in
9182  [\\/]* | ?:[\\/]*)
9183  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9184  ;;
9185  *)
9186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9187for as_dir in $PATH
9188do
9189  IFS=$as_save_IFS
9190  test -z "$as_dir" && as_dir=.
9191    for ac_exec_ext in '' $ac_executable_extensions; do
9192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9193    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9195    break 2
9196  fi
9197done
9198  done
9199IFS=$as_save_IFS
9200
9201  ;;
9202esac
9203fi
9204SH=$ac_cv_path_SH
9205if test -n "$SH"; then
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9207$as_echo "$SH" >&6; }
9208else
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9210$as_echo "no" >&6; }
9211fi
9212
9213
9214        if test "x$SH" = x; then
9215          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9216        fi
9217      else
9218        # Otherwise we believe it is a complete path. Use it as it is.
9219        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9220$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9222$as_echo_n "checking for SH... " >&6; }
9223        if test ! -x "$tool_specified"; then
9224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9225$as_echo "not found" >&6; }
9226          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9227        fi
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9229$as_echo "$tool_specified" >&6; }
9230      fi
9231    fi
9232  fi
9233
9234
9235
9236  if test "x$SH" = x; then
9237    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9238  fi
9239
9240
9241
9242
9243
9244  # Publish this variable in the help.
9245
9246
9247  if test "x$SORT" = x; then
9248    # The variable is not set by user, try to locate tool using the code snippet
9249    for ac_prog in sort
9250do
9251  # Extract the first word of "$ac_prog", so it can be a program name with args.
9252set dummy $ac_prog; ac_word=$2
9253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9254$as_echo_n "checking for $ac_word... " >&6; }
9255if ${ac_cv_path_SORT+:} false; then :
9256  $as_echo_n "(cached) " >&6
9257else
9258  case $SORT in
9259  [\\/]* | ?:[\\/]*)
9260  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9261  ;;
9262  *)
9263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9264for as_dir in $PATH
9265do
9266  IFS=$as_save_IFS
9267  test -z "$as_dir" && as_dir=.
9268    for ac_exec_ext in '' $ac_executable_extensions; do
9269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9270    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9272    break 2
9273  fi
9274done
9275  done
9276IFS=$as_save_IFS
9277
9278  ;;
9279esac
9280fi
9281SORT=$ac_cv_path_SORT
9282if test -n "$SORT"; then
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9284$as_echo "$SORT" >&6; }
9285else
9286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9287$as_echo "no" >&6; }
9288fi
9289
9290
9291  test -n "$SORT" && break
9292done
9293
9294  else
9295    # The variable is set, but is it from the command line or the environment?
9296
9297    # Try to remove the string !SORT! from our list.
9298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9300      # If it failed, the variable was not from the command line. Ignore it,
9301      # but warn the user (except for BASH, which is always set by the calling BASH).
9302      if test "xSORT" != xBASH; then
9303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9304$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9305      fi
9306      # Try to locate tool using the code snippet
9307      for ac_prog in sort
9308do
9309  # Extract the first word of "$ac_prog", so it can be a program name with args.
9310set dummy $ac_prog; ac_word=$2
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9312$as_echo_n "checking for $ac_word... " >&6; }
9313if ${ac_cv_path_SORT+:} false; then :
9314  $as_echo_n "(cached) " >&6
9315else
9316  case $SORT in
9317  [\\/]* | ?:[\\/]*)
9318  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9319  ;;
9320  *)
9321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9322for as_dir in $PATH
9323do
9324  IFS=$as_save_IFS
9325  test -z "$as_dir" && as_dir=.
9326    for ac_exec_ext in '' $ac_executable_extensions; do
9327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9328    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9330    break 2
9331  fi
9332done
9333  done
9334IFS=$as_save_IFS
9335
9336  ;;
9337esac
9338fi
9339SORT=$ac_cv_path_SORT
9340if test -n "$SORT"; then
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9342$as_echo "$SORT" >&6; }
9343else
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
9346fi
9347
9348
9349  test -n "$SORT" && break
9350done
9351
9352    else
9353      # If it succeeded, then it was overridden by the user. We will use it
9354      # for the tool.
9355
9356      # First remove it from the list of overridden variables, so we can test
9357      # for unknown variables in the end.
9358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9359
9360      # Check if the provided tool contains a complete path.
9361      tool_specified="$SORT"
9362      tool_basename="${tool_specified##*/}"
9363      if test "x$tool_basename" = "x$tool_specified"; then
9364        # A command without a complete path is provided, search $PATH.
9365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9366$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9367        # Extract the first word of "$tool_basename", so it can be a program name with args.
9368set dummy $tool_basename; ac_word=$2
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9370$as_echo_n "checking for $ac_word... " >&6; }
9371if ${ac_cv_path_SORT+:} false; then :
9372  $as_echo_n "(cached) " >&6
9373else
9374  case $SORT in
9375  [\\/]* | ?:[\\/]*)
9376  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9377  ;;
9378  *)
9379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9380for as_dir in $PATH
9381do
9382  IFS=$as_save_IFS
9383  test -z "$as_dir" && as_dir=.
9384    for ac_exec_ext in '' $ac_executable_extensions; do
9385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9386    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9388    break 2
9389  fi
9390done
9391  done
9392IFS=$as_save_IFS
9393
9394  ;;
9395esac
9396fi
9397SORT=$ac_cv_path_SORT
9398if test -n "$SORT"; then
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9400$as_echo "$SORT" >&6; }
9401else
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
9404fi
9405
9406
9407        if test "x$SORT" = x; then
9408          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9409        fi
9410      else
9411        # Otherwise we believe it is a complete path. Use it as it is.
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9413$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9415$as_echo_n "checking for SORT... " >&6; }
9416        if test ! -x "$tool_specified"; then
9417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9418$as_echo "not found" >&6; }
9419          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9420        fi
9421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9422$as_echo "$tool_specified" >&6; }
9423      fi
9424    fi
9425  fi
9426
9427
9428
9429  if test "x$SORT" = x; then
9430    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9431  fi
9432
9433
9434
9435
9436
9437  # Publish this variable in the help.
9438
9439
9440  if test "x$TAIL" = x; then
9441    # The variable is not set by user, try to locate tool using the code snippet
9442    for ac_prog in tail
9443do
9444  # Extract the first word of "$ac_prog", so it can be a program name with args.
9445set dummy $ac_prog; ac_word=$2
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9447$as_echo_n "checking for $ac_word... " >&6; }
9448if ${ac_cv_path_TAIL+:} false; then :
9449  $as_echo_n "(cached) " >&6
9450else
9451  case $TAIL in
9452  [\\/]* | ?:[\\/]*)
9453  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9454  ;;
9455  *)
9456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9457for as_dir in $PATH
9458do
9459  IFS=$as_save_IFS
9460  test -z "$as_dir" && as_dir=.
9461    for ac_exec_ext in '' $ac_executable_extensions; do
9462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9463    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9465    break 2
9466  fi
9467done
9468  done
9469IFS=$as_save_IFS
9470
9471  ;;
9472esac
9473fi
9474TAIL=$ac_cv_path_TAIL
9475if test -n "$TAIL"; then
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9477$as_echo "$TAIL" >&6; }
9478else
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
9481fi
9482
9483
9484  test -n "$TAIL" && break
9485done
9486
9487  else
9488    # The variable is set, but is it from the command line or the environment?
9489
9490    # Try to remove the string !TAIL! from our list.
9491    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9492    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9493      # If it failed, the variable was not from the command line. Ignore it,
9494      # but warn the user (except for BASH, which is always set by the calling BASH).
9495      if test "xTAIL" != xBASH; then
9496        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9497$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9498      fi
9499      # Try to locate tool using the code snippet
9500      for ac_prog in tail
9501do
9502  # Extract the first word of "$ac_prog", so it can be a program name with args.
9503set dummy $ac_prog; ac_word=$2
9504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9505$as_echo_n "checking for $ac_word... " >&6; }
9506if ${ac_cv_path_TAIL+:} false; then :
9507  $as_echo_n "(cached) " >&6
9508else
9509  case $TAIL in
9510  [\\/]* | ?:[\\/]*)
9511  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9512  ;;
9513  *)
9514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9515for as_dir in $PATH
9516do
9517  IFS=$as_save_IFS
9518  test -z "$as_dir" && as_dir=.
9519    for ac_exec_ext in '' $ac_executable_extensions; do
9520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9521    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9523    break 2
9524  fi
9525done
9526  done
9527IFS=$as_save_IFS
9528
9529  ;;
9530esac
9531fi
9532TAIL=$ac_cv_path_TAIL
9533if test -n "$TAIL"; then
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9535$as_echo "$TAIL" >&6; }
9536else
9537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
9539fi
9540
9541
9542  test -n "$TAIL" && break
9543done
9544
9545    else
9546      # If it succeeded, then it was overridden by the user. We will use it
9547      # for the tool.
9548
9549      # First remove it from the list of overridden variables, so we can test
9550      # for unknown variables in the end.
9551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9552
9553      # Check if the provided tool contains a complete path.
9554      tool_specified="$TAIL"
9555      tool_basename="${tool_specified##*/}"
9556      if test "x$tool_basename" = "x$tool_specified"; then
9557        # A command without a complete path is provided, search $PATH.
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9559$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9560        # Extract the first word of "$tool_basename", so it can be a program name with args.
9561set dummy $tool_basename; ac_word=$2
9562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9563$as_echo_n "checking for $ac_word... " >&6; }
9564if ${ac_cv_path_TAIL+:} false; then :
9565  $as_echo_n "(cached) " >&6
9566else
9567  case $TAIL in
9568  [\\/]* | ?:[\\/]*)
9569  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9570  ;;
9571  *)
9572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9573for as_dir in $PATH
9574do
9575  IFS=$as_save_IFS
9576  test -z "$as_dir" && as_dir=.
9577    for ac_exec_ext in '' $ac_executable_extensions; do
9578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9579    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9581    break 2
9582  fi
9583done
9584  done
9585IFS=$as_save_IFS
9586
9587  ;;
9588esac
9589fi
9590TAIL=$ac_cv_path_TAIL
9591if test -n "$TAIL"; then
9592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9593$as_echo "$TAIL" >&6; }
9594else
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596$as_echo "no" >&6; }
9597fi
9598
9599
9600        if test "x$TAIL" = x; then
9601          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9602        fi
9603      else
9604        # Otherwise we believe it is a complete path. Use it as it is.
9605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9606$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9608$as_echo_n "checking for TAIL... " >&6; }
9609        if test ! -x "$tool_specified"; then
9610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9611$as_echo "not found" >&6; }
9612          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9613        fi
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9615$as_echo "$tool_specified" >&6; }
9616      fi
9617    fi
9618  fi
9619
9620
9621
9622  if test "x$TAIL" = x; then
9623    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9624  fi
9625
9626
9627
9628
9629
9630  # Publish this variable in the help.
9631
9632
9633  if test "x$TAR" = x; then
9634    # The variable is not set by user, try to locate tool using the code snippet
9635    for ac_prog in tar
9636do
9637  # Extract the first word of "$ac_prog", so it can be a program name with args.
9638set dummy $ac_prog; ac_word=$2
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640$as_echo_n "checking for $ac_word... " >&6; }
9641if ${ac_cv_path_TAR+:} false; then :
9642  $as_echo_n "(cached) " >&6
9643else
9644  case $TAR in
9645  [\\/]* | ?:[\\/]*)
9646  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9647  ;;
9648  *)
9649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9650for as_dir in $PATH
9651do
9652  IFS=$as_save_IFS
9653  test -z "$as_dir" && as_dir=.
9654    for ac_exec_ext in '' $ac_executable_extensions; do
9655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9656    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9658    break 2
9659  fi
9660done
9661  done
9662IFS=$as_save_IFS
9663
9664  ;;
9665esac
9666fi
9667TAR=$ac_cv_path_TAR
9668if test -n "$TAR"; then
9669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9670$as_echo "$TAR" >&6; }
9671else
9672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673$as_echo "no" >&6; }
9674fi
9675
9676
9677  test -n "$TAR" && break
9678done
9679
9680  else
9681    # The variable is set, but is it from the command line or the environment?
9682
9683    # Try to remove the string !TAR! from our list.
9684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9686      # If it failed, the variable was not from the command line. Ignore it,
9687      # but warn the user (except for BASH, which is always set by the calling BASH).
9688      if test "xTAR" != xBASH; then
9689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9690$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9691      fi
9692      # Try to locate tool using the code snippet
9693      for ac_prog in tar
9694do
9695  # Extract the first word of "$ac_prog", so it can be a program name with args.
9696set dummy $ac_prog; ac_word=$2
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698$as_echo_n "checking for $ac_word... " >&6; }
9699if ${ac_cv_path_TAR+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  case $TAR in
9703  [\\/]* | ?:[\\/]*)
9704  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9705  ;;
9706  *)
9707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708for as_dir in $PATH
9709do
9710  IFS=$as_save_IFS
9711  test -z "$as_dir" && as_dir=.
9712    for ac_exec_ext in '' $ac_executable_extensions; do
9713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716    break 2
9717  fi
9718done
9719  done
9720IFS=$as_save_IFS
9721
9722  ;;
9723esac
9724fi
9725TAR=$ac_cv_path_TAR
9726if test -n "$TAR"; then
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9728$as_echo "$TAR" >&6; }
9729else
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
9732fi
9733
9734
9735  test -n "$TAR" && break
9736done
9737
9738    else
9739      # If it succeeded, then it was overridden by the user. We will use it
9740      # for the tool.
9741
9742      # First remove it from the list of overridden variables, so we can test
9743      # for unknown variables in the end.
9744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9745
9746      # Check if the provided tool contains a complete path.
9747      tool_specified="$TAR"
9748      tool_basename="${tool_specified##*/}"
9749      if test "x$tool_basename" = "x$tool_specified"; then
9750        # A command without a complete path is provided, search $PATH.
9751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9752$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9753        # Extract the first word of "$tool_basename", so it can be a program name with args.
9754set dummy $tool_basename; ac_word=$2
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9756$as_echo_n "checking for $ac_word... " >&6; }
9757if ${ac_cv_path_TAR+:} false; then :
9758  $as_echo_n "(cached) " >&6
9759else
9760  case $TAR in
9761  [\\/]* | ?:[\\/]*)
9762  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9763  ;;
9764  *)
9765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9766for as_dir in $PATH
9767do
9768  IFS=$as_save_IFS
9769  test -z "$as_dir" && as_dir=.
9770    for ac_exec_ext in '' $ac_executable_extensions; do
9771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9772    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9774    break 2
9775  fi
9776done
9777  done
9778IFS=$as_save_IFS
9779
9780  ;;
9781esac
9782fi
9783TAR=$ac_cv_path_TAR
9784if test -n "$TAR"; then
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9786$as_echo "$TAR" >&6; }
9787else
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790fi
9791
9792
9793        if test "x$TAR" = x; then
9794          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9795        fi
9796      else
9797        # Otherwise we believe it is a complete path. Use it as it is.
9798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9799$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9801$as_echo_n "checking for TAR... " >&6; }
9802        if test ! -x "$tool_specified"; then
9803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9804$as_echo "not found" >&6; }
9805          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9806        fi
9807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9808$as_echo "$tool_specified" >&6; }
9809      fi
9810    fi
9811  fi
9812
9813
9814
9815  if test "x$TAR" = x; then
9816    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9817  fi
9818
9819
9820
9821
9822
9823  # Publish this variable in the help.
9824
9825
9826  if test "x$TEE" = x; then
9827    # The variable is not set by user, try to locate tool using the code snippet
9828    for ac_prog in tee
9829do
9830  # Extract the first word of "$ac_prog", so it can be a program name with args.
9831set dummy $ac_prog; ac_word=$2
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9833$as_echo_n "checking for $ac_word... " >&6; }
9834if ${ac_cv_path_TEE+:} false; then :
9835  $as_echo_n "(cached) " >&6
9836else
9837  case $TEE in
9838  [\\/]* | ?:[\\/]*)
9839  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9840  ;;
9841  *)
9842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9843for as_dir in $PATH
9844do
9845  IFS=$as_save_IFS
9846  test -z "$as_dir" && as_dir=.
9847    for ac_exec_ext in '' $ac_executable_extensions; do
9848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9849    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9851    break 2
9852  fi
9853done
9854  done
9855IFS=$as_save_IFS
9856
9857  ;;
9858esac
9859fi
9860TEE=$ac_cv_path_TEE
9861if test -n "$TEE"; then
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9863$as_echo "$TEE" >&6; }
9864else
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867fi
9868
9869
9870  test -n "$TEE" && break
9871done
9872
9873  else
9874    # The variable is set, but is it from the command line or the environment?
9875
9876    # Try to remove the string !TEE! from our list.
9877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9879      # If it failed, the variable was not from the command line. Ignore it,
9880      # but warn the user (except for BASH, which is always set by the calling BASH).
9881      if test "xTEE" != xBASH; then
9882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9883$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9884      fi
9885      # Try to locate tool using the code snippet
9886      for ac_prog in tee
9887do
9888  # Extract the first word of "$ac_prog", so it can be a program name with args.
9889set dummy $ac_prog; ac_word=$2
9890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9891$as_echo_n "checking for $ac_word... " >&6; }
9892if ${ac_cv_path_TEE+:} false; then :
9893  $as_echo_n "(cached) " >&6
9894else
9895  case $TEE in
9896  [\\/]* | ?:[\\/]*)
9897  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9898  ;;
9899  *)
9900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9901for as_dir in $PATH
9902do
9903  IFS=$as_save_IFS
9904  test -z "$as_dir" && as_dir=.
9905    for ac_exec_ext in '' $ac_executable_extensions; do
9906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9907    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9909    break 2
9910  fi
9911done
9912  done
9913IFS=$as_save_IFS
9914
9915  ;;
9916esac
9917fi
9918TEE=$ac_cv_path_TEE
9919if test -n "$TEE"; then
9920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9921$as_echo "$TEE" >&6; }
9922else
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9924$as_echo "no" >&6; }
9925fi
9926
9927
9928  test -n "$TEE" && break
9929done
9930
9931    else
9932      # If it succeeded, then it was overridden by the user. We will use it
9933      # for the tool.
9934
9935      # First remove it from the list of overridden variables, so we can test
9936      # for unknown variables in the end.
9937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9938
9939      # Check if the provided tool contains a complete path.
9940      tool_specified="$TEE"
9941      tool_basename="${tool_specified##*/}"
9942      if test "x$tool_basename" = "x$tool_specified"; then
9943        # A command without a complete path is provided, search $PATH.
9944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9945$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9946        # Extract the first word of "$tool_basename", so it can be a program name with args.
9947set dummy $tool_basename; ac_word=$2
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9949$as_echo_n "checking for $ac_word... " >&6; }
9950if ${ac_cv_path_TEE+:} false; then :
9951  $as_echo_n "(cached) " >&6
9952else
9953  case $TEE in
9954  [\\/]* | ?:[\\/]*)
9955  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9956  ;;
9957  *)
9958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959for as_dir in $PATH
9960do
9961  IFS=$as_save_IFS
9962  test -z "$as_dir" && as_dir=.
9963    for ac_exec_ext in '' $ac_executable_extensions; do
9964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9965    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9967    break 2
9968  fi
9969done
9970  done
9971IFS=$as_save_IFS
9972
9973  ;;
9974esac
9975fi
9976TEE=$ac_cv_path_TEE
9977if test -n "$TEE"; then
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9979$as_echo "$TEE" >&6; }
9980else
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
9983fi
9984
9985
9986        if test "x$TEE" = x; then
9987          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9988        fi
9989      else
9990        # Otherwise we believe it is a complete path. Use it as it is.
9991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9992$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9994$as_echo_n "checking for TEE... " >&6; }
9995        if test ! -x "$tool_specified"; then
9996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9997$as_echo "not found" >&6; }
9998          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9999        fi
10000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10001$as_echo "$tool_specified" >&6; }
10002      fi
10003    fi
10004  fi
10005
10006
10007
10008  if test "x$TEE" = x; then
10009    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10010  fi
10011
10012
10013
10014
10015
10016  # Publish this variable in the help.
10017
10018
10019  if test "x$TOUCH" = x; then
10020    # The variable is not set by user, try to locate tool using the code snippet
10021    for ac_prog in touch
10022do
10023  # Extract the first word of "$ac_prog", so it can be a program name with args.
10024set dummy $ac_prog; ac_word=$2
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026$as_echo_n "checking for $ac_word... " >&6; }
10027if ${ac_cv_path_TOUCH+:} false; then :
10028  $as_echo_n "(cached) " >&6
10029else
10030  case $TOUCH in
10031  [\\/]* | ?:[\\/]*)
10032  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10033  ;;
10034  *)
10035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036for as_dir in $PATH
10037do
10038  IFS=$as_save_IFS
10039  test -z "$as_dir" && as_dir=.
10040    for ac_exec_ext in '' $ac_executable_extensions; do
10041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10042    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044    break 2
10045  fi
10046done
10047  done
10048IFS=$as_save_IFS
10049
10050  ;;
10051esac
10052fi
10053TOUCH=$ac_cv_path_TOUCH
10054if test -n "$TOUCH"; then
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10056$as_echo "$TOUCH" >&6; }
10057else
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
10060fi
10061
10062
10063  test -n "$TOUCH" && break
10064done
10065
10066  else
10067    # The variable is set, but is it from the command line or the environment?
10068
10069    # Try to remove the string !TOUCH! from our list.
10070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10072      # If it failed, the variable was not from the command line. Ignore it,
10073      # but warn the user (except for BASH, which is always set by the calling BASH).
10074      if test "xTOUCH" != xBASH; then
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10076$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10077      fi
10078      # Try to locate tool using the code snippet
10079      for ac_prog in touch
10080do
10081  # Extract the first word of "$ac_prog", so it can be a program name with args.
10082set dummy $ac_prog; ac_word=$2
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10084$as_echo_n "checking for $ac_word... " >&6; }
10085if ${ac_cv_path_TOUCH+:} false; then :
10086  $as_echo_n "(cached) " >&6
10087else
10088  case $TOUCH in
10089  [\\/]* | ?:[\\/]*)
10090  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10091  ;;
10092  *)
10093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10094for as_dir in $PATH
10095do
10096  IFS=$as_save_IFS
10097  test -z "$as_dir" && as_dir=.
10098    for ac_exec_ext in '' $ac_executable_extensions; do
10099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10100    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10102    break 2
10103  fi
10104done
10105  done
10106IFS=$as_save_IFS
10107
10108  ;;
10109esac
10110fi
10111TOUCH=$ac_cv_path_TOUCH
10112if test -n "$TOUCH"; then
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10114$as_echo "$TOUCH" >&6; }
10115else
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120
10121  test -n "$TOUCH" && break
10122done
10123
10124    else
10125      # If it succeeded, then it was overridden by the user. We will use it
10126      # for the tool.
10127
10128      # First remove it from the list of overridden variables, so we can test
10129      # for unknown variables in the end.
10130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10131
10132      # Check if the provided tool contains a complete path.
10133      tool_specified="$TOUCH"
10134      tool_basename="${tool_specified##*/}"
10135      if test "x$tool_basename" = "x$tool_specified"; then
10136        # A command without a complete path is provided, search $PATH.
10137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10138$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10139        # Extract the first word of "$tool_basename", so it can be a program name with args.
10140set dummy $tool_basename; ac_word=$2
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10142$as_echo_n "checking for $ac_word... " >&6; }
10143if ${ac_cv_path_TOUCH+:} false; then :
10144  $as_echo_n "(cached) " >&6
10145else
10146  case $TOUCH in
10147  [\\/]* | ?:[\\/]*)
10148  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10149  ;;
10150  *)
10151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10152for as_dir in $PATH
10153do
10154  IFS=$as_save_IFS
10155  test -z "$as_dir" && as_dir=.
10156    for ac_exec_ext in '' $ac_executable_extensions; do
10157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10158    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10160    break 2
10161  fi
10162done
10163  done
10164IFS=$as_save_IFS
10165
10166  ;;
10167esac
10168fi
10169TOUCH=$ac_cv_path_TOUCH
10170if test -n "$TOUCH"; then
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10172$as_echo "$TOUCH" >&6; }
10173else
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10175$as_echo "no" >&6; }
10176fi
10177
10178
10179        if test "x$TOUCH" = x; then
10180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10181        fi
10182      else
10183        # Otherwise we believe it is a complete path. Use it as it is.
10184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10185$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10187$as_echo_n "checking for TOUCH... " >&6; }
10188        if test ! -x "$tool_specified"; then
10189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10190$as_echo "not found" >&6; }
10191          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10192        fi
10193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10194$as_echo "$tool_specified" >&6; }
10195      fi
10196    fi
10197  fi
10198
10199
10200
10201  if test "x$TOUCH" = x; then
10202    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10203  fi
10204
10205
10206
10207
10208
10209  # Publish this variable in the help.
10210
10211
10212  if test "x$TR" = x; then
10213    # The variable is not set by user, try to locate tool using the code snippet
10214    for ac_prog in tr
10215do
10216  # Extract the first word of "$ac_prog", so it can be a program name with args.
10217set dummy $ac_prog; ac_word=$2
10218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10219$as_echo_n "checking for $ac_word... " >&6; }
10220if ${ac_cv_path_TR+:} false; then :
10221  $as_echo_n "(cached) " >&6
10222else
10223  case $TR in
10224  [\\/]* | ?:[\\/]*)
10225  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10226  ;;
10227  *)
10228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10229for as_dir in $PATH
10230do
10231  IFS=$as_save_IFS
10232  test -z "$as_dir" && as_dir=.
10233    for ac_exec_ext in '' $ac_executable_extensions; do
10234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10235    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10237    break 2
10238  fi
10239done
10240  done
10241IFS=$as_save_IFS
10242
10243  ;;
10244esac
10245fi
10246TR=$ac_cv_path_TR
10247if test -n "$TR"; then
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10249$as_echo "$TR" >&6; }
10250else
10251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10252$as_echo "no" >&6; }
10253fi
10254
10255
10256  test -n "$TR" && break
10257done
10258
10259  else
10260    # The variable is set, but is it from the command line or the environment?
10261
10262    # Try to remove the string !TR! from our list.
10263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10265      # If it failed, the variable was not from the command line. Ignore it,
10266      # but warn the user (except for BASH, which is always set by the calling BASH).
10267      if test "xTR" != xBASH; then
10268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10269$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10270      fi
10271      # Try to locate tool using the code snippet
10272      for ac_prog in tr
10273do
10274  # Extract the first word of "$ac_prog", so it can be a program name with args.
10275set dummy $ac_prog; ac_word=$2
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10277$as_echo_n "checking for $ac_word... " >&6; }
10278if ${ac_cv_path_TR+:} false; then :
10279  $as_echo_n "(cached) " >&6
10280else
10281  case $TR in
10282  [\\/]* | ?:[\\/]*)
10283  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10284  ;;
10285  *)
10286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10287for as_dir in $PATH
10288do
10289  IFS=$as_save_IFS
10290  test -z "$as_dir" && as_dir=.
10291    for ac_exec_ext in '' $ac_executable_extensions; do
10292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10293    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10295    break 2
10296  fi
10297done
10298  done
10299IFS=$as_save_IFS
10300
10301  ;;
10302esac
10303fi
10304TR=$ac_cv_path_TR
10305if test -n "$TR"; then
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10307$as_echo "$TR" >&6; }
10308else
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
10311fi
10312
10313
10314  test -n "$TR" && break
10315done
10316
10317    else
10318      # If it succeeded, then it was overridden by the user. We will use it
10319      # for the tool.
10320
10321      # First remove it from the list of overridden variables, so we can test
10322      # for unknown variables in the end.
10323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10324
10325      # Check if the provided tool contains a complete path.
10326      tool_specified="$TR"
10327      tool_basename="${tool_specified##*/}"
10328      if test "x$tool_basename" = "x$tool_specified"; then
10329        # A command without a complete path is provided, search $PATH.
10330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10331$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10332        # Extract the first word of "$tool_basename", so it can be a program name with args.
10333set dummy $tool_basename; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_TR+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $TR in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362TR=$ac_cv_path_TR
10363if test -n "$TR"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10365$as_echo "$TR" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372        if test "x$TR" = x; then
10373          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10374        fi
10375      else
10376        # Otherwise we believe it is a complete path. Use it as it is.
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10378$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10380$as_echo_n "checking for TR... " >&6; }
10381        if test ! -x "$tool_specified"; then
10382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10383$as_echo "not found" >&6; }
10384          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10385        fi
10386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10387$as_echo "$tool_specified" >&6; }
10388      fi
10389    fi
10390  fi
10391
10392
10393
10394  if test "x$TR" = x; then
10395    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10396  fi
10397
10398
10399
10400
10401
10402  # Publish this variable in the help.
10403
10404
10405  if test "x$UNAME" = x; then
10406    # The variable is not set by user, try to locate tool using the code snippet
10407    for ac_prog in uname
10408do
10409  # Extract the first word of "$ac_prog", so it can be a program name with args.
10410set dummy $ac_prog; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_UNAME+:} false; then :
10414  $as_echo_n "(cached) " >&6
10415else
10416  case $UNAME in
10417  [\\/]* | ?:[\\/]*)
10418  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10419  ;;
10420  *)
10421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436  ;;
10437esac
10438fi
10439UNAME=$ac_cv_path_UNAME
10440if test -n "$UNAME"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10442$as_echo "$UNAME" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$UNAME" && break
10450done
10451
10452  else
10453    # The variable is set, but is it from the command line or the environment?
10454
10455    # Try to remove the string !UNAME! from our list.
10456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10458      # If it failed, the variable was not from the command line. Ignore it,
10459      # but warn the user (except for BASH, which is always set by the calling BASH).
10460      if test "xUNAME" != xBASH; then
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10462$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10463      fi
10464      # Try to locate tool using the code snippet
10465      for ac_prog in uname
10466do
10467  # Extract the first word of "$ac_prog", so it can be a program name with args.
10468set dummy $ac_prog; ac_word=$2
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10470$as_echo_n "checking for $ac_word... " >&6; }
10471if ${ac_cv_path_UNAME+:} false; then :
10472  $as_echo_n "(cached) " >&6
10473else
10474  case $UNAME in
10475  [\\/]* | ?:[\\/]*)
10476  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10477  ;;
10478  *)
10479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  test -z "$as_dir" && as_dir=.
10484    for ac_exec_ext in '' $ac_executable_extensions; do
10485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10486    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10488    break 2
10489  fi
10490done
10491  done
10492IFS=$as_save_IFS
10493
10494  ;;
10495esac
10496fi
10497UNAME=$ac_cv_path_UNAME
10498if test -n "$UNAME"; then
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10500$as_echo "$UNAME" >&6; }
10501else
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
10504fi
10505
10506
10507  test -n "$UNAME" && break
10508done
10509
10510    else
10511      # If it succeeded, then it was overridden by the user. We will use it
10512      # for the tool.
10513
10514      # First remove it from the list of overridden variables, so we can test
10515      # for unknown variables in the end.
10516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10517
10518      # Check if the provided tool contains a complete path.
10519      tool_specified="$UNAME"
10520      tool_basename="${tool_specified##*/}"
10521      if test "x$tool_basename" = "x$tool_specified"; then
10522        # A command without a complete path is provided, search $PATH.
10523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10524$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10525        # Extract the first word of "$tool_basename", so it can be a program name with args.
10526set dummy $tool_basename; ac_word=$2
10527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10528$as_echo_n "checking for $ac_word... " >&6; }
10529if ${ac_cv_path_UNAME+:} false; then :
10530  $as_echo_n "(cached) " >&6
10531else
10532  case $UNAME in
10533  [\\/]* | ?:[\\/]*)
10534  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10535  ;;
10536  *)
10537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10538for as_dir in $PATH
10539do
10540  IFS=$as_save_IFS
10541  test -z "$as_dir" && as_dir=.
10542    for ac_exec_ext in '' $ac_executable_extensions; do
10543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10544    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10546    break 2
10547  fi
10548done
10549  done
10550IFS=$as_save_IFS
10551
10552  ;;
10553esac
10554fi
10555UNAME=$ac_cv_path_UNAME
10556if test -n "$UNAME"; then
10557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10558$as_echo "$UNAME" >&6; }
10559else
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10561$as_echo "no" >&6; }
10562fi
10563
10564
10565        if test "x$UNAME" = x; then
10566          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10567        fi
10568      else
10569        # Otherwise we believe it is a complete path. Use it as it is.
10570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10571$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10573$as_echo_n "checking for UNAME... " >&6; }
10574        if test ! -x "$tool_specified"; then
10575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10576$as_echo "not found" >&6; }
10577          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10578        fi
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10580$as_echo "$tool_specified" >&6; }
10581      fi
10582    fi
10583  fi
10584
10585
10586
10587  if test "x$UNAME" = x; then
10588    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10589  fi
10590
10591
10592
10593
10594
10595  # Publish this variable in the help.
10596
10597
10598  if test "x$UNIQ" = x; then
10599    # The variable is not set by user, try to locate tool using the code snippet
10600    for ac_prog in uniq
10601do
10602  # Extract the first word of "$ac_prog", so it can be a program name with args.
10603set dummy $ac_prog; ac_word=$2
10604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10605$as_echo_n "checking for $ac_word... " >&6; }
10606if ${ac_cv_path_UNIQ+:} false; then :
10607  $as_echo_n "(cached) " >&6
10608else
10609  case $UNIQ in
10610  [\\/]* | ?:[\\/]*)
10611  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10612  ;;
10613  *)
10614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10615for as_dir in $PATH
10616do
10617  IFS=$as_save_IFS
10618  test -z "$as_dir" && as_dir=.
10619    for ac_exec_ext in '' $ac_executable_extensions; do
10620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10621    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10623    break 2
10624  fi
10625done
10626  done
10627IFS=$as_save_IFS
10628
10629  ;;
10630esac
10631fi
10632UNIQ=$ac_cv_path_UNIQ
10633if test -n "$UNIQ"; then
10634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10635$as_echo "$UNIQ" >&6; }
10636else
10637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10638$as_echo "no" >&6; }
10639fi
10640
10641
10642  test -n "$UNIQ" && break
10643done
10644
10645  else
10646    # The variable is set, but is it from the command line or the environment?
10647
10648    # Try to remove the string !UNIQ! from our list.
10649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10651      # If it failed, the variable was not from the command line. Ignore it,
10652      # but warn the user (except for BASH, which is always set by the calling BASH).
10653      if test "xUNIQ" != xBASH; then
10654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10655$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10656      fi
10657      # Try to locate tool using the code snippet
10658      for ac_prog in uniq
10659do
10660  # Extract the first word of "$ac_prog", so it can be a program name with args.
10661set dummy $ac_prog; ac_word=$2
10662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10663$as_echo_n "checking for $ac_word... " >&6; }
10664if ${ac_cv_path_UNIQ+:} false; then :
10665  $as_echo_n "(cached) " >&6
10666else
10667  case $UNIQ in
10668  [\\/]* | ?:[\\/]*)
10669  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10670  ;;
10671  *)
10672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10673for as_dir in $PATH
10674do
10675  IFS=$as_save_IFS
10676  test -z "$as_dir" && as_dir=.
10677    for ac_exec_ext in '' $ac_executable_extensions; do
10678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10679    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10681    break 2
10682  fi
10683done
10684  done
10685IFS=$as_save_IFS
10686
10687  ;;
10688esac
10689fi
10690UNIQ=$ac_cv_path_UNIQ
10691if test -n "$UNIQ"; then
10692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10693$as_echo "$UNIQ" >&6; }
10694else
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10696$as_echo "no" >&6; }
10697fi
10698
10699
10700  test -n "$UNIQ" && break
10701done
10702
10703    else
10704      # If it succeeded, then it was overridden by the user. We will use it
10705      # for the tool.
10706
10707      # First remove it from the list of overridden variables, so we can test
10708      # for unknown variables in the end.
10709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10710
10711      # Check if the provided tool contains a complete path.
10712      tool_specified="$UNIQ"
10713      tool_basename="${tool_specified##*/}"
10714      if test "x$tool_basename" = "x$tool_specified"; then
10715        # A command without a complete path is provided, search $PATH.
10716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10717$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10718        # Extract the first word of "$tool_basename", so it can be a program name with args.
10719set dummy $tool_basename; ac_word=$2
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10721$as_echo_n "checking for $ac_word... " >&6; }
10722if ${ac_cv_path_UNIQ+:} false; then :
10723  $as_echo_n "(cached) " >&6
10724else
10725  case $UNIQ in
10726  [\\/]* | ?:[\\/]*)
10727  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10728  ;;
10729  *)
10730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10731for as_dir in $PATH
10732do
10733  IFS=$as_save_IFS
10734  test -z "$as_dir" && as_dir=.
10735    for ac_exec_ext in '' $ac_executable_extensions; do
10736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10737    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10739    break 2
10740  fi
10741done
10742  done
10743IFS=$as_save_IFS
10744
10745  ;;
10746esac
10747fi
10748UNIQ=$ac_cv_path_UNIQ
10749if test -n "$UNIQ"; then
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10751$as_echo "$UNIQ" >&6; }
10752else
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754$as_echo "no" >&6; }
10755fi
10756
10757
10758        if test "x$UNIQ" = x; then
10759          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10760        fi
10761      else
10762        # Otherwise we believe it is a complete path. Use it as it is.
10763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10764$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10766$as_echo_n "checking for UNIQ... " >&6; }
10767        if test ! -x "$tool_specified"; then
10768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10769$as_echo "not found" >&6; }
10770          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10771        fi
10772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10773$as_echo "$tool_specified" >&6; }
10774      fi
10775    fi
10776  fi
10777
10778
10779
10780  if test "x$UNIQ" = x; then
10781    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10782  fi
10783
10784
10785
10786
10787
10788  # Publish this variable in the help.
10789
10790
10791  if test "x$WC" = x; then
10792    # The variable is not set by user, try to locate tool using the code snippet
10793    for ac_prog in wc
10794do
10795  # Extract the first word of "$ac_prog", so it can be a program name with args.
10796set dummy $ac_prog; ac_word=$2
10797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10798$as_echo_n "checking for $ac_word... " >&6; }
10799if ${ac_cv_path_WC+:} false; then :
10800  $as_echo_n "(cached) " >&6
10801else
10802  case $WC in
10803  [\\/]* | ?:[\\/]*)
10804  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10805  ;;
10806  *)
10807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10808for as_dir in $PATH
10809do
10810  IFS=$as_save_IFS
10811  test -z "$as_dir" && as_dir=.
10812    for ac_exec_ext in '' $ac_executable_extensions; do
10813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10814    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10816    break 2
10817  fi
10818done
10819  done
10820IFS=$as_save_IFS
10821
10822  ;;
10823esac
10824fi
10825WC=$ac_cv_path_WC
10826if test -n "$WC"; then
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10828$as_echo "$WC" >&6; }
10829else
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10831$as_echo "no" >&6; }
10832fi
10833
10834
10835  test -n "$WC" && break
10836done
10837
10838  else
10839    # The variable is set, but is it from the command line or the environment?
10840
10841    # Try to remove the string !WC! from our list.
10842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10844      # If it failed, the variable was not from the command line. Ignore it,
10845      # but warn the user (except for BASH, which is always set by the calling BASH).
10846      if test "xWC" != xBASH; then
10847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10848$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10849      fi
10850      # Try to locate tool using the code snippet
10851      for ac_prog in wc
10852do
10853  # Extract the first word of "$ac_prog", so it can be a program name with args.
10854set dummy $ac_prog; ac_word=$2
10855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10856$as_echo_n "checking for $ac_word... " >&6; }
10857if ${ac_cv_path_WC+:} false; then :
10858  $as_echo_n "(cached) " >&6
10859else
10860  case $WC in
10861  [\\/]* | ?:[\\/]*)
10862  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10863  ;;
10864  *)
10865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10866for as_dir in $PATH
10867do
10868  IFS=$as_save_IFS
10869  test -z "$as_dir" && as_dir=.
10870    for ac_exec_ext in '' $ac_executable_extensions; do
10871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10872    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10874    break 2
10875  fi
10876done
10877  done
10878IFS=$as_save_IFS
10879
10880  ;;
10881esac
10882fi
10883WC=$ac_cv_path_WC
10884if test -n "$WC"; then
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10886$as_echo "$WC" >&6; }
10887else
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10889$as_echo "no" >&6; }
10890fi
10891
10892
10893  test -n "$WC" && break
10894done
10895
10896    else
10897      # If it succeeded, then it was overridden by the user. We will use it
10898      # for the tool.
10899
10900      # First remove it from the list of overridden variables, so we can test
10901      # for unknown variables in the end.
10902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10903
10904      # Check if the provided tool contains a complete path.
10905      tool_specified="$WC"
10906      tool_basename="${tool_specified##*/}"
10907      if test "x$tool_basename" = "x$tool_specified"; then
10908        # A command without a complete path is provided, search $PATH.
10909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10910$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10911        # Extract the first word of "$tool_basename", so it can be a program name with args.
10912set dummy $tool_basename; ac_word=$2
10913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10914$as_echo_n "checking for $ac_word... " >&6; }
10915if ${ac_cv_path_WC+:} false; then :
10916  $as_echo_n "(cached) " >&6
10917else
10918  case $WC in
10919  [\\/]* | ?:[\\/]*)
10920  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10921  ;;
10922  *)
10923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10924for as_dir in $PATH
10925do
10926  IFS=$as_save_IFS
10927  test -z "$as_dir" && as_dir=.
10928    for ac_exec_ext in '' $ac_executable_extensions; do
10929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10930    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10932    break 2
10933  fi
10934done
10935  done
10936IFS=$as_save_IFS
10937
10938  ;;
10939esac
10940fi
10941WC=$ac_cv_path_WC
10942if test -n "$WC"; then
10943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10944$as_echo "$WC" >&6; }
10945else
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10947$as_echo "no" >&6; }
10948fi
10949
10950
10951        if test "x$WC" = x; then
10952          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10953        fi
10954      else
10955        # Otherwise we believe it is a complete path. Use it as it is.
10956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10957$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10959$as_echo_n "checking for WC... " >&6; }
10960        if test ! -x "$tool_specified"; then
10961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10962$as_echo "not found" >&6; }
10963          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10964        fi
10965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10966$as_echo "$tool_specified" >&6; }
10967      fi
10968    fi
10969  fi
10970
10971
10972
10973  if test "x$WC" = x; then
10974    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10975  fi
10976
10977
10978
10979
10980
10981  # Publish this variable in the help.
10982
10983
10984  if test "x$WHICH" = x; then
10985    # The variable is not set by user, try to locate tool using the code snippet
10986    for ac_prog in which
10987do
10988  # Extract the first word of "$ac_prog", so it can be a program name with args.
10989set dummy $ac_prog; ac_word=$2
10990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10991$as_echo_n "checking for $ac_word... " >&6; }
10992if ${ac_cv_path_WHICH+:} false; then :
10993  $as_echo_n "(cached) " >&6
10994else
10995  case $WHICH in
10996  [\\/]* | ?:[\\/]*)
10997  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10998  ;;
10999  *)
11000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11001for as_dir in $PATH
11002do
11003  IFS=$as_save_IFS
11004  test -z "$as_dir" && as_dir=.
11005    for ac_exec_ext in '' $ac_executable_extensions; do
11006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11007    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11009    break 2
11010  fi
11011done
11012  done
11013IFS=$as_save_IFS
11014
11015  ;;
11016esac
11017fi
11018WHICH=$ac_cv_path_WHICH
11019if test -n "$WHICH"; then
11020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11021$as_echo "$WHICH" >&6; }
11022else
11023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11024$as_echo "no" >&6; }
11025fi
11026
11027
11028  test -n "$WHICH" && break
11029done
11030
11031  else
11032    # The variable is set, but is it from the command line or the environment?
11033
11034    # Try to remove the string !WHICH! from our list.
11035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11037      # If it failed, the variable was not from the command line. Ignore it,
11038      # but warn the user (except for BASH, which is always set by the calling BASH).
11039      if test "xWHICH" != xBASH; then
11040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11041$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11042      fi
11043      # Try to locate tool using the code snippet
11044      for ac_prog in which
11045do
11046  # Extract the first word of "$ac_prog", so it can be a program name with args.
11047set dummy $ac_prog; ac_word=$2
11048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11049$as_echo_n "checking for $ac_word... " >&6; }
11050if ${ac_cv_path_WHICH+:} false; then :
11051  $as_echo_n "(cached) " >&6
11052else
11053  case $WHICH in
11054  [\\/]* | ?:[\\/]*)
11055  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11056  ;;
11057  *)
11058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11059for as_dir in $PATH
11060do
11061  IFS=$as_save_IFS
11062  test -z "$as_dir" && as_dir=.
11063    for ac_exec_ext in '' $ac_executable_extensions; do
11064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11065    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11067    break 2
11068  fi
11069done
11070  done
11071IFS=$as_save_IFS
11072
11073  ;;
11074esac
11075fi
11076WHICH=$ac_cv_path_WHICH
11077if test -n "$WHICH"; then
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11079$as_echo "$WHICH" >&6; }
11080else
11081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
11083fi
11084
11085
11086  test -n "$WHICH" && break
11087done
11088
11089    else
11090      # If it succeeded, then it was overridden by the user. We will use it
11091      # for the tool.
11092
11093      # First remove it from the list of overridden variables, so we can test
11094      # for unknown variables in the end.
11095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11096
11097      # Check if the provided tool contains a complete path.
11098      tool_specified="$WHICH"
11099      tool_basename="${tool_specified##*/}"
11100      if test "x$tool_basename" = "x$tool_specified"; then
11101        # A command without a complete path is provided, search $PATH.
11102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11103$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11104        # Extract the first word of "$tool_basename", so it can be a program name with args.
11105set dummy $tool_basename; ac_word=$2
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107$as_echo_n "checking for $ac_word... " >&6; }
11108if ${ac_cv_path_WHICH+:} false; then :
11109  $as_echo_n "(cached) " >&6
11110else
11111  case $WHICH in
11112  [\\/]* | ?:[\\/]*)
11113  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11114  ;;
11115  *)
11116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117for as_dir in $PATH
11118do
11119  IFS=$as_save_IFS
11120  test -z "$as_dir" && as_dir=.
11121    for ac_exec_ext in '' $ac_executable_extensions; do
11122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11123    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125    break 2
11126  fi
11127done
11128  done
11129IFS=$as_save_IFS
11130
11131  ;;
11132esac
11133fi
11134WHICH=$ac_cv_path_WHICH
11135if test -n "$WHICH"; then
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11137$as_echo "$WHICH" >&6; }
11138else
11139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
11141fi
11142
11143
11144        if test "x$WHICH" = x; then
11145          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11146        fi
11147      else
11148        # Otherwise we believe it is a complete path. Use it as it is.
11149        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11150$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11152$as_echo_n "checking for WHICH... " >&6; }
11153        if test ! -x "$tool_specified"; then
11154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11155$as_echo "not found" >&6; }
11156          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11157        fi
11158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11159$as_echo "$tool_specified" >&6; }
11160      fi
11161    fi
11162  fi
11163
11164
11165
11166  if test "x$WHICH" = x; then
11167    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11168  fi
11169
11170
11171
11172
11173
11174  # Publish this variable in the help.
11175
11176
11177  if test "x$XARGS" = x; then
11178    # The variable is not set by user, try to locate tool using the code snippet
11179    for ac_prog in xargs
11180do
11181  # Extract the first word of "$ac_prog", so it can be a program name with args.
11182set dummy $ac_prog; ac_word=$2
11183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11184$as_echo_n "checking for $ac_word... " >&6; }
11185if ${ac_cv_path_XARGS+:} false; then :
11186  $as_echo_n "(cached) " >&6
11187else
11188  case $XARGS in
11189  [\\/]* | ?:[\\/]*)
11190  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11191  ;;
11192  *)
11193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11194for as_dir in $PATH
11195do
11196  IFS=$as_save_IFS
11197  test -z "$as_dir" && as_dir=.
11198    for ac_exec_ext in '' $ac_executable_extensions; do
11199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11200    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11202    break 2
11203  fi
11204done
11205  done
11206IFS=$as_save_IFS
11207
11208  ;;
11209esac
11210fi
11211XARGS=$ac_cv_path_XARGS
11212if test -n "$XARGS"; then
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11214$as_echo "$XARGS" >&6; }
11215else
11216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
11218fi
11219
11220
11221  test -n "$XARGS" && break
11222done
11223
11224  else
11225    # The variable is set, but is it from the command line or the environment?
11226
11227    # Try to remove the string !XARGS! from our list.
11228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11230      # If it failed, the variable was not from the command line. Ignore it,
11231      # but warn the user (except for BASH, which is always set by the calling BASH).
11232      if test "xXARGS" != xBASH; then
11233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11234$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11235      fi
11236      # Try to locate tool using the code snippet
11237      for ac_prog in xargs
11238do
11239  # Extract the first word of "$ac_prog", so it can be a program name with args.
11240set dummy $ac_prog; ac_word=$2
11241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11242$as_echo_n "checking for $ac_word... " >&6; }
11243if ${ac_cv_path_XARGS+:} false; then :
11244  $as_echo_n "(cached) " >&6
11245else
11246  case $XARGS in
11247  [\\/]* | ?:[\\/]*)
11248  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11249  ;;
11250  *)
11251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11252for as_dir in $PATH
11253do
11254  IFS=$as_save_IFS
11255  test -z "$as_dir" && as_dir=.
11256    for ac_exec_ext in '' $ac_executable_extensions; do
11257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11258    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11260    break 2
11261  fi
11262done
11263  done
11264IFS=$as_save_IFS
11265
11266  ;;
11267esac
11268fi
11269XARGS=$ac_cv_path_XARGS
11270if test -n "$XARGS"; then
11271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11272$as_echo "$XARGS" >&6; }
11273else
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11275$as_echo "no" >&6; }
11276fi
11277
11278
11279  test -n "$XARGS" && break
11280done
11281
11282    else
11283      # If it succeeded, then it was overridden by the user. We will use it
11284      # for the tool.
11285
11286      # First remove it from the list of overridden variables, so we can test
11287      # for unknown variables in the end.
11288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11289
11290      # Check if the provided tool contains a complete path.
11291      tool_specified="$XARGS"
11292      tool_basename="${tool_specified##*/}"
11293      if test "x$tool_basename" = "x$tool_specified"; then
11294        # A command without a complete path is provided, search $PATH.
11295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11296$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11297        # Extract the first word of "$tool_basename", so it can be a program name with args.
11298set dummy $tool_basename; ac_word=$2
11299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11300$as_echo_n "checking for $ac_word... " >&6; }
11301if ${ac_cv_path_XARGS+:} false; then :
11302  $as_echo_n "(cached) " >&6
11303else
11304  case $XARGS in
11305  [\\/]* | ?:[\\/]*)
11306  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11307  ;;
11308  *)
11309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11310for as_dir in $PATH
11311do
11312  IFS=$as_save_IFS
11313  test -z "$as_dir" && as_dir=.
11314    for ac_exec_ext in '' $ac_executable_extensions; do
11315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11316    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11318    break 2
11319  fi
11320done
11321  done
11322IFS=$as_save_IFS
11323
11324  ;;
11325esac
11326fi
11327XARGS=$ac_cv_path_XARGS
11328if test -n "$XARGS"; then
11329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11330$as_echo "$XARGS" >&6; }
11331else
11332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
11334fi
11335
11336
11337        if test "x$XARGS" = x; then
11338          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11339        fi
11340      else
11341        # Otherwise we believe it is a complete path. Use it as it is.
11342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11343$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11345$as_echo_n "checking for XARGS... " >&6; }
11346        if test ! -x "$tool_specified"; then
11347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11348$as_echo "not found" >&6; }
11349          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11350        fi
11351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11352$as_echo "$tool_specified" >&6; }
11353      fi
11354    fi
11355  fi
11356
11357
11358
11359  if test "x$XARGS" = x; then
11360    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11361  fi
11362
11363
11364
11365  # Then required tools that require some special treatment.
11366
11367
11368  # Publish this variable in the help.
11369
11370
11371  if test "x$AWK" = x; then
11372    # The variable is not set by user, try to locate tool using the code snippet
11373    for ac_prog in gawk mawk nawk awk
11374do
11375  # Extract the first word of "$ac_prog", so it can be a program name with args.
11376set dummy $ac_prog; ac_word=$2
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
11379if ${ac_cv_prog_AWK+:} false; then :
11380  $as_echo_n "(cached) " >&6
11381else
11382  if test -n "$AWK"; then
11383  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11384else
11385as_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_prog_AWK="$ac_prog"
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
11400fi
11401fi
11402AWK=$ac_cv_prog_AWK
11403if test -n "$AWK"; then
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11405$as_echo "$AWK" >&6; }
11406else
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409fi
11410
11411
11412  test -n "$AWK" && break
11413done
11414
11415  else
11416    # The variable is set, but is it from the command line or the environment?
11417
11418    # Try to remove the string !AWK! from our list.
11419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11421      # If it failed, the variable was not from the command line. Ignore it,
11422      # but warn the user (except for BASH, which is always set by the calling BASH).
11423      if test "xAWK" != xBASH; then
11424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11425$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11426      fi
11427      # Try to locate tool using the code snippet
11428      for ac_prog in gawk mawk nawk awk
11429do
11430  # Extract the first word of "$ac_prog", so it can be a program name with args.
11431set dummy $ac_prog; ac_word=$2
11432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11433$as_echo_n "checking for $ac_word... " >&6; }
11434if ${ac_cv_prog_AWK+:} false; then :
11435  $as_echo_n "(cached) " >&6
11436else
11437  if test -n "$AWK"; then
11438  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11439else
11440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11441for as_dir in $PATH
11442do
11443  IFS=$as_save_IFS
11444  test -z "$as_dir" && as_dir=.
11445    for ac_exec_ext in '' $ac_executable_extensions; do
11446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11447    ac_cv_prog_AWK="$ac_prog"
11448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11449    break 2
11450  fi
11451done
11452  done
11453IFS=$as_save_IFS
11454
11455fi
11456fi
11457AWK=$ac_cv_prog_AWK
11458if test -n "$AWK"; then
11459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11460$as_echo "$AWK" >&6; }
11461else
11462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
11464fi
11465
11466
11467  test -n "$AWK" && break
11468done
11469
11470    else
11471      # If it succeeded, then it was overridden by the user. We will use it
11472      # for the tool.
11473
11474      # First remove it from the list of overridden variables, so we can test
11475      # for unknown variables in the end.
11476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11477
11478      # Check if the provided tool contains a complete path.
11479      tool_specified="$AWK"
11480      tool_basename="${tool_specified##*/}"
11481      if test "x$tool_basename" = "x$tool_specified"; then
11482        # A command without a complete path is provided, search $PATH.
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11484$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11485        # Extract the first word of "$tool_basename", so it can be a program name with args.
11486set dummy $tool_basename; ac_word=$2
11487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11488$as_echo_n "checking for $ac_word... " >&6; }
11489if ${ac_cv_path_AWK+:} false; then :
11490  $as_echo_n "(cached) " >&6
11491else
11492  case $AWK in
11493  [\\/]* | ?:[\\/]*)
11494  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11495  ;;
11496  *)
11497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11498for as_dir in $PATH
11499do
11500  IFS=$as_save_IFS
11501  test -z "$as_dir" && as_dir=.
11502    for ac_exec_ext in '' $ac_executable_extensions; do
11503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11504    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11506    break 2
11507  fi
11508done
11509  done
11510IFS=$as_save_IFS
11511
11512  ;;
11513esac
11514fi
11515AWK=$ac_cv_path_AWK
11516if test -n "$AWK"; then
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11518$as_echo "$AWK" >&6; }
11519else
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11521$as_echo "no" >&6; }
11522fi
11523
11524
11525        if test "x$AWK" = x; then
11526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11527        fi
11528      else
11529        # Otherwise we believe it is a complete path. Use it as it is.
11530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11531$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11533$as_echo_n "checking for AWK... " >&6; }
11534        if test ! -x "$tool_specified"; then
11535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11536$as_echo "not found" >&6; }
11537          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11538        fi
11539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11540$as_echo "$tool_specified" >&6; }
11541      fi
11542    fi
11543  fi
11544
11545
11546  if test "x$AWK" = x; then
11547    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11548  fi
11549
11550
11551
11552
11553  # Publish this variable in the help.
11554
11555
11556  if test "x$GREP" = x; then
11557    # The variable is not set by user, try to locate tool using the code snippet
11558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11559$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11560if ${ac_cv_path_GREP+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  if test -z "$GREP"; then
11564  ac_path_GREP_found=false
11565  # Loop through the user's path and test for each of PROGNAME-LIST
11566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11567for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11568do
11569  IFS=$as_save_IFS
11570  test -z "$as_dir" && as_dir=.
11571    for ac_prog in grep ggrep; do
11572    for ac_exec_ext in '' $ac_executable_extensions; do
11573      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11574      as_fn_executable_p "$ac_path_GREP" || continue
11575# Check for GNU ac_path_GREP and select it if it is found.
11576  # Check for GNU $ac_path_GREP
11577case `"$ac_path_GREP" --version 2>&1` in
11578*GNU*)
11579  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11580*)
11581  ac_count=0
11582  $as_echo_n 0123456789 >"conftest.in"
11583  while :
11584  do
11585    cat "conftest.in" "conftest.in" >"conftest.tmp"
11586    mv "conftest.tmp" "conftest.in"
11587    cp "conftest.in" "conftest.nl"
11588    $as_echo 'GREP' >> "conftest.nl"
11589    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11590    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11591    as_fn_arith $ac_count + 1 && ac_count=$as_val
11592    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11593      # Best one so far, save it but keep looking for a better one
11594      ac_cv_path_GREP="$ac_path_GREP"
11595      ac_path_GREP_max=$ac_count
11596    fi
11597    # 10*(2^10) chars as input seems more than enough
11598    test $ac_count -gt 10 && break
11599  done
11600  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11601esac
11602
11603      $ac_path_GREP_found && break 3
11604    done
11605  done
11606  done
11607IFS=$as_save_IFS
11608  if test -z "$ac_cv_path_GREP"; then
11609    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11610  fi
11611else
11612  ac_cv_path_GREP=$GREP
11613fi
11614
11615fi
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11617$as_echo "$ac_cv_path_GREP" >&6; }
11618 GREP="$ac_cv_path_GREP"
11619
11620
11621  else
11622    # The variable is set, but is it from the command line or the environment?
11623
11624    # Try to remove the string !GREP! from our list.
11625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11627      # If it failed, the variable was not from the command line. Ignore it,
11628      # but warn the user (except for BASH, which is always set by the calling BASH).
11629      if test "xGREP" != xBASH; then
11630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11631$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11632      fi
11633      # Try to locate tool using the code snippet
11634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11635$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11636if ${ac_cv_path_GREP+:} false; then :
11637  $as_echo_n "(cached) " >&6
11638else
11639  if test -z "$GREP"; then
11640  ac_path_GREP_found=false
11641  # Loop through the user's path and test for each of PROGNAME-LIST
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_prog in grep ggrep; do
11648    for ac_exec_ext in '' $ac_executable_extensions; do
11649      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11650      as_fn_executable_p "$ac_path_GREP" || continue
11651# Check for GNU ac_path_GREP and select it if it is found.
11652  # Check for GNU $ac_path_GREP
11653case `"$ac_path_GREP" --version 2>&1` in
11654*GNU*)
11655  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11656*)
11657  ac_count=0
11658  $as_echo_n 0123456789 >"conftest.in"
11659  while :
11660  do
11661    cat "conftest.in" "conftest.in" >"conftest.tmp"
11662    mv "conftest.tmp" "conftest.in"
11663    cp "conftest.in" "conftest.nl"
11664    $as_echo 'GREP' >> "conftest.nl"
11665    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11666    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11667    as_fn_arith $ac_count + 1 && ac_count=$as_val
11668    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11669      # Best one so far, save it but keep looking for a better one
11670      ac_cv_path_GREP="$ac_path_GREP"
11671      ac_path_GREP_max=$ac_count
11672    fi
11673    # 10*(2^10) chars as input seems more than enough
11674    test $ac_count -gt 10 && break
11675  done
11676  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11677esac
11678
11679      $ac_path_GREP_found && break 3
11680    done
11681  done
11682  done
11683IFS=$as_save_IFS
11684  if test -z "$ac_cv_path_GREP"; then
11685    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11686  fi
11687else
11688  ac_cv_path_GREP=$GREP
11689fi
11690
11691fi
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11693$as_echo "$ac_cv_path_GREP" >&6; }
11694 GREP="$ac_cv_path_GREP"
11695
11696
11697    else
11698      # If it succeeded, then it was overridden by the user. We will use it
11699      # for the tool.
11700
11701      # First remove it from the list of overridden variables, so we can test
11702      # for unknown variables in the end.
11703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11704
11705      # Check if the provided tool contains a complete path.
11706      tool_specified="$GREP"
11707      tool_basename="${tool_specified##*/}"
11708      if test "x$tool_basename" = "x$tool_specified"; then
11709        # A command without a complete path is provided, search $PATH.
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11711$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11712        # Extract the first word of "$tool_basename", so it can be a program name with args.
11713set dummy $tool_basename; ac_word=$2
11714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11715$as_echo_n "checking for $ac_word... " >&6; }
11716if ${ac_cv_path_GREP+:} false; then :
11717  $as_echo_n "(cached) " >&6
11718else
11719  case $GREP in
11720  [\\/]* | ?:[\\/]*)
11721  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11722  ;;
11723  *)
11724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11725for as_dir in $PATH
11726do
11727  IFS=$as_save_IFS
11728  test -z "$as_dir" && as_dir=.
11729    for ac_exec_ext in '' $ac_executable_extensions; do
11730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11731    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11733    break 2
11734  fi
11735done
11736  done
11737IFS=$as_save_IFS
11738
11739  ;;
11740esac
11741fi
11742GREP=$ac_cv_path_GREP
11743if test -n "$GREP"; then
11744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11745$as_echo "$GREP" >&6; }
11746else
11747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11748$as_echo "no" >&6; }
11749fi
11750
11751
11752        if test "x$GREP" = x; then
11753          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11754        fi
11755      else
11756        # Otherwise we believe it is a complete path. Use it as it is.
11757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11758$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11760$as_echo_n "checking for GREP... " >&6; }
11761        if test ! -x "$tool_specified"; then
11762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11763$as_echo "not found" >&6; }
11764          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11765        fi
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11767$as_echo "$tool_specified" >&6; }
11768      fi
11769    fi
11770  fi
11771
11772
11773  if test "x$GREP" = x; then
11774    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11775  fi
11776
11777
11778
11779
11780  # Publish this variable in the help.
11781
11782
11783  if test "x$EGREP" = x; then
11784    # The variable is not set by user, try to locate tool using the code snippet
11785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11786$as_echo_n "checking for egrep... " >&6; }
11787if ${ac_cv_path_EGREP+:} false; then :
11788  $as_echo_n "(cached) " >&6
11789else
11790  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11791   then ac_cv_path_EGREP="$GREP -E"
11792   else
11793     if test -z "$EGREP"; then
11794  ac_path_EGREP_found=false
11795  # Loop through the user's path and test for each of PROGNAME-LIST
11796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11797for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11798do
11799  IFS=$as_save_IFS
11800  test -z "$as_dir" && as_dir=.
11801    for ac_prog in egrep; do
11802    for ac_exec_ext in '' $ac_executable_extensions; do
11803      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11804      as_fn_executable_p "$ac_path_EGREP" || continue
11805# Check for GNU ac_path_EGREP and select it if it is found.
11806  # Check for GNU $ac_path_EGREP
11807case `"$ac_path_EGREP" --version 2>&1` in
11808*GNU*)
11809  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11810*)
11811  ac_count=0
11812  $as_echo_n 0123456789 >"conftest.in"
11813  while :
11814  do
11815    cat "conftest.in" "conftest.in" >"conftest.tmp"
11816    mv "conftest.tmp" "conftest.in"
11817    cp "conftest.in" "conftest.nl"
11818    $as_echo 'EGREP' >> "conftest.nl"
11819    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11820    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11821    as_fn_arith $ac_count + 1 && ac_count=$as_val
11822    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11823      # Best one so far, save it but keep looking for a better one
11824      ac_cv_path_EGREP="$ac_path_EGREP"
11825      ac_path_EGREP_max=$ac_count
11826    fi
11827    # 10*(2^10) chars as input seems more than enough
11828    test $ac_count -gt 10 && break
11829  done
11830  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11831esac
11832
11833      $ac_path_EGREP_found && break 3
11834    done
11835  done
11836  done
11837IFS=$as_save_IFS
11838  if test -z "$ac_cv_path_EGREP"; then
11839    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11840  fi
11841else
11842  ac_cv_path_EGREP=$EGREP
11843fi
11844
11845   fi
11846fi
11847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11848$as_echo "$ac_cv_path_EGREP" >&6; }
11849 EGREP="$ac_cv_path_EGREP"
11850
11851
11852  else
11853    # The variable is set, but is it from the command line or the environment?
11854
11855    # Try to remove the string !EGREP! from our list.
11856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11858      # If it failed, the variable was not from the command line. Ignore it,
11859      # but warn the user (except for BASH, which is always set by the calling BASH).
11860      if test "xEGREP" != xBASH; then
11861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11862$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11863      fi
11864      # Try to locate tool using the code snippet
11865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11866$as_echo_n "checking for egrep... " >&6; }
11867if ${ac_cv_path_EGREP+:} false; then :
11868  $as_echo_n "(cached) " >&6
11869else
11870  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11871   then ac_cv_path_EGREP="$GREP -E"
11872   else
11873     if test -z "$EGREP"; then
11874  ac_path_EGREP_found=false
11875  # Loop through the user's path and test for each of PROGNAME-LIST
11876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11877for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11878do
11879  IFS=$as_save_IFS
11880  test -z "$as_dir" && as_dir=.
11881    for ac_prog in egrep; do
11882    for ac_exec_ext in '' $ac_executable_extensions; do
11883      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11884      as_fn_executable_p "$ac_path_EGREP" || continue
11885# Check for GNU ac_path_EGREP and select it if it is found.
11886  # Check for GNU $ac_path_EGREP
11887case `"$ac_path_EGREP" --version 2>&1` in
11888*GNU*)
11889  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11890*)
11891  ac_count=0
11892  $as_echo_n 0123456789 >"conftest.in"
11893  while :
11894  do
11895    cat "conftest.in" "conftest.in" >"conftest.tmp"
11896    mv "conftest.tmp" "conftest.in"
11897    cp "conftest.in" "conftest.nl"
11898    $as_echo 'EGREP' >> "conftest.nl"
11899    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11900    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11901    as_fn_arith $ac_count + 1 && ac_count=$as_val
11902    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11903      # Best one so far, save it but keep looking for a better one
11904      ac_cv_path_EGREP="$ac_path_EGREP"
11905      ac_path_EGREP_max=$ac_count
11906    fi
11907    # 10*(2^10) chars as input seems more than enough
11908    test $ac_count -gt 10 && break
11909  done
11910  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11911esac
11912
11913      $ac_path_EGREP_found && break 3
11914    done
11915  done
11916  done
11917IFS=$as_save_IFS
11918  if test -z "$ac_cv_path_EGREP"; then
11919    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11920  fi
11921else
11922  ac_cv_path_EGREP=$EGREP
11923fi
11924
11925   fi
11926fi
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11928$as_echo "$ac_cv_path_EGREP" >&6; }
11929 EGREP="$ac_cv_path_EGREP"
11930
11931
11932    else
11933      # If it succeeded, then it was overridden by the user. We will use it
11934      # for the tool.
11935
11936      # First remove it from the list of overridden variables, so we can test
11937      # for unknown variables in the end.
11938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11939
11940      # Check if the provided tool contains a complete path.
11941      tool_specified="$EGREP"
11942      tool_basename="${tool_specified##*/}"
11943      if test "x$tool_basename" = "x$tool_specified"; then
11944        # A command without a complete path is provided, search $PATH.
11945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11946$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11947        # Extract the first word of "$tool_basename", so it can be a program name with args.
11948set dummy $tool_basename; ac_word=$2
11949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11950$as_echo_n "checking for $ac_word... " >&6; }
11951if ${ac_cv_path_EGREP+:} false; then :
11952  $as_echo_n "(cached) " >&6
11953else
11954  case $EGREP in
11955  [\\/]* | ?:[\\/]*)
11956  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11957  ;;
11958  *)
11959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11960for as_dir in $PATH
11961do
11962  IFS=$as_save_IFS
11963  test -z "$as_dir" && as_dir=.
11964    for ac_exec_ext in '' $ac_executable_extensions; do
11965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11966    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11968    break 2
11969  fi
11970done
11971  done
11972IFS=$as_save_IFS
11973
11974  ;;
11975esac
11976fi
11977EGREP=$ac_cv_path_EGREP
11978if test -n "$EGREP"; then
11979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11980$as_echo "$EGREP" >&6; }
11981else
11982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11983$as_echo "no" >&6; }
11984fi
11985
11986
11987        if test "x$EGREP" = x; then
11988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11989        fi
11990      else
11991        # Otherwise we believe it is a complete path. Use it as it is.
11992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11993$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11995$as_echo_n "checking for EGREP... " >&6; }
11996        if test ! -x "$tool_specified"; then
11997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11998$as_echo "not found" >&6; }
11999          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12000        fi
12001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12002$as_echo "$tool_specified" >&6; }
12003      fi
12004    fi
12005  fi
12006
12007
12008  if test "x$EGREP" = x; then
12009    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12010  fi
12011
12012
12013
12014
12015  # Publish this variable in the help.
12016
12017
12018  if test "x$FGREP" = x; then
12019    # The variable is not set by user, try to locate tool using the code snippet
12020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12021$as_echo_n "checking for fgrep... " >&6; }
12022if ${ac_cv_path_FGREP+:} false; then :
12023  $as_echo_n "(cached) " >&6
12024else
12025  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12026   then ac_cv_path_FGREP="$GREP -F"
12027   else
12028     if test -z "$FGREP"; then
12029  ac_path_FGREP_found=false
12030  # Loop through the user's path and test for each of PROGNAME-LIST
12031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12032for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12033do
12034  IFS=$as_save_IFS
12035  test -z "$as_dir" && as_dir=.
12036    for ac_prog in fgrep; do
12037    for ac_exec_ext in '' $ac_executable_extensions; do
12038      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12039      as_fn_executable_p "$ac_path_FGREP" || continue
12040# Check for GNU ac_path_FGREP and select it if it is found.
12041  # Check for GNU $ac_path_FGREP
12042case `"$ac_path_FGREP" --version 2>&1` in
12043*GNU*)
12044  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12045*)
12046  ac_count=0
12047  $as_echo_n 0123456789 >"conftest.in"
12048  while :
12049  do
12050    cat "conftest.in" "conftest.in" >"conftest.tmp"
12051    mv "conftest.tmp" "conftest.in"
12052    cp "conftest.in" "conftest.nl"
12053    $as_echo 'FGREP' >> "conftest.nl"
12054    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12055    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12056    as_fn_arith $ac_count + 1 && ac_count=$as_val
12057    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12058      # Best one so far, save it but keep looking for a better one
12059      ac_cv_path_FGREP="$ac_path_FGREP"
12060      ac_path_FGREP_max=$ac_count
12061    fi
12062    # 10*(2^10) chars as input seems more than enough
12063    test $ac_count -gt 10 && break
12064  done
12065  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12066esac
12067
12068      $ac_path_FGREP_found && break 3
12069    done
12070  done
12071  done
12072IFS=$as_save_IFS
12073  if test -z "$ac_cv_path_FGREP"; then
12074    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12075  fi
12076else
12077  ac_cv_path_FGREP=$FGREP
12078fi
12079
12080   fi
12081fi
12082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12083$as_echo "$ac_cv_path_FGREP" >&6; }
12084 FGREP="$ac_cv_path_FGREP"
12085
12086
12087  else
12088    # The variable is set, but is it from the command line or the environment?
12089
12090    # Try to remove the string !FGREP! from our list.
12091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12093      # If it failed, the variable was not from the command line. Ignore it,
12094      # but warn the user (except for BASH, which is always set by the calling BASH).
12095      if test "xFGREP" != xBASH; then
12096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12097$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12098      fi
12099      # Try to locate tool using the code snippet
12100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12101$as_echo_n "checking for fgrep... " >&6; }
12102if ${ac_cv_path_FGREP+:} false; then :
12103  $as_echo_n "(cached) " >&6
12104else
12105  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12106   then ac_cv_path_FGREP="$GREP -F"
12107   else
12108     if test -z "$FGREP"; then
12109  ac_path_FGREP_found=false
12110  # Loop through the user's path and test for each of PROGNAME-LIST
12111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12112for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12113do
12114  IFS=$as_save_IFS
12115  test -z "$as_dir" && as_dir=.
12116    for ac_prog in fgrep; do
12117    for ac_exec_ext in '' $ac_executable_extensions; do
12118      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12119      as_fn_executable_p "$ac_path_FGREP" || continue
12120# Check for GNU ac_path_FGREP and select it if it is found.
12121  # Check for GNU $ac_path_FGREP
12122case `"$ac_path_FGREP" --version 2>&1` in
12123*GNU*)
12124  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12125*)
12126  ac_count=0
12127  $as_echo_n 0123456789 >"conftest.in"
12128  while :
12129  do
12130    cat "conftest.in" "conftest.in" >"conftest.tmp"
12131    mv "conftest.tmp" "conftest.in"
12132    cp "conftest.in" "conftest.nl"
12133    $as_echo 'FGREP' >> "conftest.nl"
12134    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12135    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12136    as_fn_arith $ac_count + 1 && ac_count=$as_val
12137    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12138      # Best one so far, save it but keep looking for a better one
12139      ac_cv_path_FGREP="$ac_path_FGREP"
12140      ac_path_FGREP_max=$ac_count
12141    fi
12142    # 10*(2^10) chars as input seems more than enough
12143    test $ac_count -gt 10 && break
12144  done
12145  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12146esac
12147
12148      $ac_path_FGREP_found && break 3
12149    done
12150  done
12151  done
12152IFS=$as_save_IFS
12153  if test -z "$ac_cv_path_FGREP"; then
12154    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12155  fi
12156else
12157  ac_cv_path_FGREP=$FGREP
12158fi
12159
12160   fi
12161fi
12162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12163$as_echo "$ac_cv_path_FGREP" >&6; }
12164 FGREP="$ac_cv_path_FGREP"
12165
12166
12167    else
12168      # If it succeeded, then it was overridden by the user. We will use it
12169      # for the tool.
12170
12171      # First remove it from the list of overridden variables, so we can test
12172      # for unknown variables in the end.
12173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12174
12175      # Check if the provided tool contains a complete path.
12176      tool_specified="$FGREP"
12177      tool_basename="${tool_specified##*/}"
12178      if test "x$tool_basename" = "x$tool_specified"; then
12179        # A command without a complete path is provided, search $PATH.
12180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12181$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12182        # Extract the first word of "$tool_basename", so it can be a program name with args.
12183set dummy $tool_basename; ac_word=$2
12184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12185$as_echo_n "checking for $ac_word... " >&6; }
12186if ${ac_cv_path_FGREP+:} false; then :
12187  $as_echo_n "(cached) " >&6
12188else
12189  case $FGREP in
12190  [\\/]* | ?:[\\/]*)
12191  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12192  ;;
12193  *)
12194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12195for as_dir in $PATH
12196do
12197  IFS=$as_save_IFS
12198  test -z "$as_dir" && as_dir=.
12199    for ac_exec_ext in '' $ac_executable_extensions; do
12200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12201    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12203    break 2
12204  fi
12205done
12206  done
12207IFS=$as_save_IFS
12208
12209  ;;
12210esac
12211fi
12212FGREP=$ac_cv_path_FGREP
12213if test -n "$FGREP"; then
12214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12215$as_echo "$FGREP" >&6; }
12216else
12217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218$as_echo "no" >&6; }
12219fi
12220
12221
12222        if test "x$FGREP" = x; then
12223          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12224        fi
12225      else
12226        # Otherwise we believe it is a complete path. Use it as it is.
12227        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12228$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12230$as_echo_n "checking for FGREP... " >&6; }
12231        if test ! -x "$tool_specified"; then
12232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12233$as_echo "not found" >&6; }
12234          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12235        fi
12236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12237$as_echo "$tool_specified" >&6; }
12238      fi
12239    fi
12240  fi
12241
12242
12243  if test "x$FGREP" = x; then
12244    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12245  fi
12246
12247
12248
12249
12250  # Publish this variable in the help.
12251
12252
12253  if test "x$SED" = x; then
12254    # The variable is not set by user, try to locate tool using the code snippet
12255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12256$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12257if ${ac_cv_path_SED+:} false; then :
12258  $as_echo_n "(cached) " >&6
12259else
12260            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12261     for ac_i in 1 2 3 4 5 6 7; do
12262       ac_script="$ac_script$as_nl$ac_script"
12263     done
12264     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12265     { ac_script=; unset ac_script;}
12266     if test -z "$SED"; then
12267  ac_path_SED_found=false
12268  # Loop through the user's path and test for each of PROGNAME-LIST
12269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12270for as_dir in $PATH
12271do
12272  IFS=$as_save_IFS
12273  test -z "$as_dir" && as_dir=.
12274    for ac_prog in sed gsed; do
12275    for ac_exec_ext in '' $ac_executable_extensions; do
12276      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12277      as_fn_executable_p "$ac_path_SED" || continue
12278# Check for GNU ac_path_SED and select it if it is found.
12279  # Check for GNU $ac_path_SED
12280case `"$ac_path_SED" --version 2>&1` in
12281*GNU*)
12282  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12283*)
12284  ac_count=0
12285  $as_echo_n 0123456789 >"conftest.in"
12286  while :
12287  do
12288    cat "conftest.in" "conftest.in" >"conftest.tmp"
12289    mv "conftest.tmp" "conftest.in"
12290    cp "conftest.in" "conftest.nl"
12291    $as_echo '' >> "conftest.nl"
12292    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12293    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12294    as_fn_arith $ac_count + 1 && ac_count=$as_val
12295    if test $ac_count -gt ${ac_path_SED_max-0}; then
12296      # Best one so far, save it but keep looking for a better one
12297      ac_cv_path_SED="$ac_path_SED"
12298      ac_path_SED_max=$ac_count
12299    fi
12300    # 10*(2^10) chars as input seems more than enough
12301    test $ac_count -gt 10 && break
12302  done
12303  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12304esac
12305
12306      $ac_path_SED_found && break 3
12307    done
12308  done
12309  done
12310IFS=$as_save_IFS
12311  if test -z "$ac_cv_path_SED"; then
12312    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12313  fi
12314else
12315  ac_cv_path_SED=$SED
12316fi
12317
12318fi
12319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12320$as_echo "$ac_cv_path_SED" >&6; }
12321 SED="$ac_cv_path_SED"
12322  rm -f conftest.sed
12323
12324  else
12325    # The variable is set, but is it from the command line or the environment?
12326
12327    # Try to remove the string !SED! from our list.
12328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12330      # If it failed, the variable was not from the command line. Ignore it,
12331      # but warn the user (except for BASH, which is always set by the calling BASH).
12332      if test "xSED" != xBASH; then
12333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12334$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12335      fi
12336      # Try to locate tool using the code snippet
12337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12338$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12339if ${ac_cv_path_SED+:} false; then :
12340  $as_echo_n "(cached) " >&6
12341else
12342            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12343     for ac_i in 1 2 3 4 5 6 7; do
12344       ac_script="$ac_script$as_nl$ac_script"
12345     done
12346     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12347     { ac_script=; unset ac_script;}
12348     if test -z "$SED"; then
12349  ac_path_SED_found=false
12350  # Loop through the user's path and test for each of PROGNAME-LIST
12351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12352for as_dir in $PATH
12353do
12354  IFS=$as_save_IFS
12355  test -z "$as_dir" && as_dir=.
12356    for ac_prog in sed gsed; do
12357    for ac_exec_ext in '' $ac_executable_extensions; do
12358      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12359      as_fn_executable_p "$ac_path_SED" || continue
12360# Check for GNU ac_path_SED and select it if it is found.
12361  # Check for GNU $ac_path_SED
12362case `"$ac_path_SED" --version 2>&1` in
12363*GNU*)
12364  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12365*)
12366  ac_count=0
12367  $as_echo_n 0123456789 >"conftest.in"
12368  while :
12369  do
12370    cat "conftest.in" "conftest.in" >"conftest.tmp"
12371    mv "conftest.tmp" "conftest.in"
12372    cp "conftest.in" "conftest.nl"
12373    $as_echo '' >> "conftest.nl"
12374    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12375    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12376    as_fn_arith $ac_count + 1 && ac_count=$as_val
12377    if test $ac_count -gt ${ac_path_SED_max-0}; then
12378      # Best one so far, save it but keep looking for a better one
12379      ac_cv_path_SED="$ac_path_SED"
12380      ac_path_SED_max=$ac_count
12381    fi
12382    # 10*(2^10) chars as input seems more than enough
12383    test $ac_count -gt 10 && break
12384  done
12385  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12386esac
12387
12388      $ac_path_SED_found && break 3
12389    done
12390  done
12391  done
12392IFS=$as_save_IFS
12393  if test -z "$ac_cv_path_SED"; then
12394    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12395  fi
12396else
12397  ac_cv_path_SED=$SED
12398fi
12399
12400fi
12401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12402$as_echo "$ac_cv_path_SED" >&6; }
12403 SED="$ac_cv_path_SED"
12404  rm -f conftest.sed
12405
12406    else
12407      # If it succeeded, then it was overridden by the user. We will use it
12408      # for the tool.
12409
12410      # First remove it from the list of overridden variables, so we can test
12411      # for unknown variables in the end.
12412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12413
12414      # Check if the provided tool contains a complete path.
12415      tool_specified="$SED"
12416      tool_basename="${tool_specified##*/}"
12417      if test "x$tool_basename" = "x$tool_specified"; then
12418        # A command without a complete path is provided, search $PATH.
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12420$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12421        # Extract the first word of "$tool_basename", so it can be a program name with args.
12422set dummy $tool_basename; ac_word=$2
12423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12424$as_echo_n "checking for $ac_word... " >&6; }
12425if ${ac_cv_path_SED+:} false; then :
12426  $as_echo_n "(cached) " >&6
12427else
12428  case $SED in
12429  [\\/]* | ?:[\\/]*)
12430  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12431  ;;
12432  *)
12433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12434for as_dir in $PATH
12435do
12436  IFS=$as_save_IFS
12437  test -z "$as_dir" && as_dir=.
12438    for ac_exec_ext in '' $ac_executable_extensions; do
12439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12440    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12442    break 2
12443  fi
12444done
12445  done
12446IFS=$as_save_IFS
12447
12448  ;;
12449esac
12450fi
12451SED=$ac_cv_path_SED
12452if test -n "$SED"; then
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12454$as_echo "$SED" >&6; }
12455else
12456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12457$as_echo "no" >&6; }
12458fi
12459
12460
12461        if test "x$SED" = x; then
12462          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12463        fi
12464      else
12465        # Otherwise we believe it is a complete path. Use it as it is.
12466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12467$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12469$as_echo_n "checking for SED... " >&6; }
12470        if test ! -x "$tool_specified"; then
12471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12472$as_echo "not found" >&6; }
12473          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12474        fi
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12476$as_echo "$tool_specified" >&6; }
12477      fi
12478    fi
12479  fi
12480
12481
12482  if test "x$SED" = x; then
12483    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12484  fi
12485
12486
12487
12488  # Always force rm.
12489  RM="$RM -f"
12490
12491  # pwd behaves differently on various platforms and some don't support the -L flag.
12492  # Always use the bash builtin pwd to get uniform behavior.
12493  THEPWDCMD=pwd
12494
12495  # These are not required on all platforms
12496
12497
12498  # Publish this variable in the help.
12499
12500
12501  if test "x$CYGPATH" = x; then
12502    # The variable is not set by user, try to locate tool using the code snippet
12503    for ac_prog in cygpath
12504do
12505  # Extract the first word of "$ac_prog", so it can be a program name with args.
12506set dummy $ac_prog; ac_word=$2
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12508$as_echo_n "checking for $ac_word... " >&6; }
12509if ${ac_cv_path_CYGPATH+:} false; then :
12510  $as_echo_n "(cached) " >&6
12511else
12512  case $CYGPATH in
12513  [\\/]* | ?:[\\/]*)
12514  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12515  ;;
12516  *)
12517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12518for as_dir in $PATH
12519do
12520  IFS=$as_save_IFS
12521  test -z "$as_dir" && as_dir=.
12522    for ac_exec_ext in '' $ac_executable_extensions; do
12523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12524    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12526    break 2
12527  fi
12528done
12529  done
12530IFS=$as_save_IFS
12531
12532  ;;
12533esac
12534fi
12535CYGPATH=$ac_cv_path_CYGPATH
12536if test -n "$CYGPATH"; then
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12538$as_echo "$CYGPATH" >&6; }
12539else
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12541$as_echo "no" >&6; }
12542fi
12543
12544
12545  test -n "$CYGPATH" && break
12546done
12547
12548  else
12549    # The variable is set, but is it from the command line or the environment?
12550
12551    # Try to remove the string !CYGPATH! from our list.
12552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12554      # If it failed, the variable was not from the command line. Ignore it,
12555      # but warn the user (except for BASH, which is always set by the calling BASH).
12556      if test "xCYGPATH" != xBASH; then
12557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12558$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12559      fi
12560      # Try to locate tool using the code snippet
12561      for ac_prog in cygpath
12562do
12563  # Extract the first word of "$ac_prog", so it can be a program name with args.
12564set dummy $ac_prog; ac_word=$2
12565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566$as_echo_n "checking for $ac_word... " >&6; }
12567if ${ac_cv_path_CYGPATH+:} false; then :
12568  $as_echo_n "(cached) " >&6
12569else
12570  case $CYGPATH in
12571  [\\/]* | ?:[\\/]*)
12572  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12573  ;;
12574  *)
12575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12576for as_dir in $PATH
12577do
12578  IFS=$as_save_IFS
12579  test -z "$as_dir" && as_dir=.
12580    for ac_exec_ext in '' $ac_executable_extensions; do
12581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12582    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12584    break 2
12585  fi
12586done
12587  done
12588IFS=$as_save_IFS
12589
12590  ;;
12591esac
12592fi
12593CYGPATH=$ac_cv_path_CYGPATH
12594if test -n "$CYGPATH"; then
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12596$as_echo "$CYGPATH" >&6; }
12597else
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12599$as_echo "no" >&6; }
12600fi
12601
12602
12603  test -n "$CYGPATH" && break
12604done
12605
12606    else
12607      # If it succeeded, then it was overridden by the user. We will use it
12608      # for the tool.
12609
12610      # First remove it from the list of overridden variables, so we can test
12611      # for unknown variables in the end.
12612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12613
12614      # Check if the provided tool contains a complete path.
12615      tool_specified="$CYGPATH"
12616      tool_basename="${tool_specified##*/}"
12617      if test "x$tool_basename" = "x$tool_specified"; then
12618        # A command without a complete path is provided, search $PATH.
12619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12620$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12621        # Extract the first word of "$tool_basename", so it can be a program name with args.
12622set dummy $tool_basename; ac_word=$2
12623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12624$as_echo_n "checking for $ac_word... " >&6; }
12625if ${ac_cv_path_CYGPATH+:} false; then :
12626  $as_echo_n "(cached) " >&6
12627else
12628  case $CYGPATH in
12629  [\\/]* | ?:[\\/]*)
12630  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12631  ;;
12632  *)
12633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12634for as_dir in $PATH
12635do
12636  IFS=$as_save_IFS
12637  test -z "$as_dir" && as_dir=.
12638    for ac_exec_ext in '' $ac_executable_extensions; do
12639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12640    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12642    break 2
12643  fi
12644done
12645  done
12646IFS=$as_save_IFS
12647
12648  ;;
12649esac
12650fi
12651CYGPATH=$ac_cv_path_CYGPATH
12652if test -n "$CYGPATH"; then
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12654$as_echo "$CYGPATH" >&6; }
12655else
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
12658fi
12659
12660
12661        if test "x$CYGPATH" = x; then
12662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12663        fi
12664      else
12665        # Otherwise we believe it is a complete path. Use it as it is.
12666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12667$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12669$as_echo_n "checking for CYGPATH... " >&6; }
12670        if test ! -x "$tool_specified"; then
12671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12672$as_echo "not found" >&6; }
12673          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12674        fi
12675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12676$as_echo "$tool_specified" >&6; }
12677      fi
12678    fi
12679  fi
12680
12681
12682
12683
12684  # Publish this variable in the help.
12685
12686
12687  if test "x$READLINK" = x; then
12688    # The variable is not set by user, try to locate tool using the code snippet
12689    for ac_prog in greadlink readlink
12690do
12691  # Extract the first word of "$ac_prog", so it can be a program name with args.
12692set dummy $ac_prog; ac_word=$2
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12694$as_echo_n "checking for $ac_word... " >&6; }
12695if ${ac_cv_path_READLINK+:} false; then :
12696  $as_echo_n "(cached) " >&6
12697else
12698  case $READLINK in
12699  [\\/]* | ?:[\\/]*)
12700  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12701  ;;
12702  *)
12703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12704for as_dir in $PATH
12705do
12706  IFS=$as_save_IFS
12707  test -z "$as_dir" && as_dir=.
12708    for ac_exec_ext in '' $ac_executable_extensions; do
12709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12710    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12712    break 2
12713  fi
12714done
12715  done
12716IFS=$as_save_IFS
12717
12718  ;;
12719esac
12720fi
12721READLINK=$ac_cv_path_READLINK
12722if test -n "$READLINK"; then
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12724$as_echo "$READLINK" >&6; }
12725else
12726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12727$as_echo "no" >&6; }
12728fi
12729
12730
12731  test -n "$READLINK" && break
12732done
12733
12734  else
12735    # The variable is set, but is it from the command line or the environment?
12736
12737    # Try to remove the string !READLINK! from our list.
12738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12740      # If it failed, the variable was not from the command line. Ignore it,
12741      # but warn the user (except for BASH, which is always set by the calling BASH).
12742      if test "xREADLINK" != xBASH; then
12743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12744$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12745      fi
12746      # Try to locate tool using the code snippet
12747      for ac_prog in greadlink readlink
12748do
12749  # Extract the first word of "$ac_prog", so it can be a program name with args.
12750set dummy $ac_prog; ac_word=$2
12751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12752$as_echo_n "checking for $ac_word... " >&6; }
12753if ${ac_cv_path_READLINK+:} false; then :
12754  $as_echo_n "(cached) " >&6
12755else
12756  case $READLINK in
12757  [\\/]* | ?:[\\/]*)
12758  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12759  ;;
12760  *)
12761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12762for as_dir in $PATH
12763do
12764  IFS=$as_save_IFS
12765  test -z "$as_dir" && as_dir=.
12766    for ac_exec_ext in '' $ac_executable_extensions; do
12767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12768    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12770    break 2
12771  fi
12772done
12773  done
12774IFS=$as_save_IFS
12775
12776  ;;
12777esac
12778fi
12779READLINK=$ac_cv_path_READLINK
12780if test -n "$READLINK"; then
12781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12782$as_echo "$READLINK" >&6; }
12783else
12784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12785$as_echo "no" >&6; }
12786fi
12787
12788
12789  test -n "$READLINK" && break
12790done
12791
12792    else
12793      # If it succeeded, then it was overridden by the user. We will use it
12794      # for the tool.
12795
12796      # First remove it from the list of overridden variables, so we can test
12797      # for unknown variables in the end.
12798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12799
12800      # Check if the provided tool contains a complete path.
12801      tool_specified="$READLINK"
12802      tool_basename="${tool_specified##*/}"
12803      if test "x$tool_basename" = "x$tool_specified"; then
12804        # A command without a complete path is provided, search $PATH.
12805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12806$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12807        # Extract the first word of "$tool_basename", so it can be a program name with args.
12808set dummy $tool_basename; ac_word=$2
12809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12810$as_echo_n "checking for $ac_word... " >&6; }
12811if ${ac_cv_path_READLINK+:} false; then :
12812  $as_echo_n "(cached) " >&6
12813else
12814  case $READLINK in
12815  [\\/]* | ?:[\\/]*)
12816  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12817  ;;
12818  *)
12819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12820for as_dir in $PATH
12821do
12822  IFS=$as_save_IFS
12823  test -z "$as_dir" && as_dir=.
12824    for ac_exec_ext in '' $ac_executable_extensions; do
12825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12826    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12828    break 2
12829  fi
12830done
12831  done
12832IFS=$as_save_IFS
12833
12834  ;;
12835esac
12836fi
12837READLINK=$ac_cv_path_READLINK
12838if test -n "$READLINK"; then
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12840$as_echo "$READLINK" >&6; }
12841else
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12843$as_echo "no" >&6; }
12844fi
12845
12846
12847        if test "x$READLINK" = x; then
12848          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12849        fi
12850      else
12851        # Otherwise we believe it is a complete path. Use it as it is.
12852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12853$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12855$as_echo_n "checking for READLINK... " >&6; }
12856        if test ! -x "$tool_specified"; then
12857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12858$as_echo "not found" >&6; }
12859          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12860        fi
12861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12862$as_echo "$tool_specified" >&6; }
12863      fi
12864    fi
12865  fi
12866
12867
12868
12869
12870  # Publish this variable in the help.
12871
12872
12873  if test "x$DF" = x; then
12874    # The variable is not set by user, try to locate tool using the code snippet
12875    for ac_prog in df
12876do
12877  # Extract the first word of "$ac_prog", so it can be a program name with args.
12878set dummy $ac_prog; ac_word=$2
12879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12880$as_echo_n "checking for $ac_word... " >&6; }
12881if ${ac_cv_path_DF+:} false; then :
12882  $as_echo_n "(cached) " >&6
12883else
12884  case $DF in
12885  [\\/]* | ?:[\\/]*)
12886  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12887  ;;
12888  *)
12889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12890for as_dir in $PATH
12891do
12892  IFS=$as_save_IFS
12893  test -z "$as_dir" && as_dir=.
12894    for ac_exec_ext in '' $ac_executable_extensions; do
12895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12896    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12898    break 2
12899  fi
12900done
12901  done
12902IFS=$as_save_IFS
12903
12904  ;;
12905esac
12906fi
12907DF=$ac_cv_path_DF
12908if test -n "$DF"; then
12909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12910$as_echo "$DF" >&6; }
12911else
12912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12913$as_echo "no" >&6; }
12914fi
12915
12916
12917  test -n "$DF" && break
12918done
12919
12920  else
12921    # The variable is set, but is it from the command line or the environment?
12922
12923    # Try to remove the string !DF! from our list.
12924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12926      # If it failed, the variable was not from the command line. Ignore it,
12927      # but warn the user (except for BASH, which is always set by the calling BASH).
12928      if test "xDF" != xBASH; then
12929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12930$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12931      fi
12932      # Try to locate tool using the code snippet
12933      for ac_prog in df
12934do
12935  # Extract the first word of "$ac_prog", so it can be a program name with args.
12936set dummy $ac_prog; ac_word=$2
12937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12938$as_echo_n "checking for $ac_word... " >&6; }
12939if ${ac_cv_path_DF+:} false; then :
12940  $as_echo_n "(cached) " >&6
12941else
12942  case $DF in
12943  [\\/]* | ?:[\\/]*)
12944  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12945  ;;
12946  *)
12947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12948for as_dir in $PATH
12949do
12950  IFS=$as_save_IFS
12951  test -z "$as_dir" && as_dir=.
12952    for ac_exec_ext in '' $ac_executable_extensions; do
12953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12954    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12956    break 2
12957  fi
12958done
12959  done
12960IFS=$as_save_IFS
12961
12962  ;;
12963esac
12964fi
12965DF=$ac_cv_path_DF
12966if test -n "$DF"; then
12967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12968$as_echo "$DF" >&6; }
12969else
12970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12971$as_echo "no" >&6; }
12972fi
12973
12974
12975  test -n "$DF" && break
12976done
12977
12978    else
12979      # If it succeeded, then it was overridden by the user. We will use it
12980      # for the tool.
12981
12982      # First remove it from the list of overridden variables, so we can test
12983      # for unknown variables in the end.
12984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12985
12986      # Check if the provided tool contains a complete path.
12987      tool_specified="$DF"
12988      tool_basename="${tool_specified##*/}"
12989      if test "x$tool_basename" = "x$tool_specified"; then
12990        # A command without a complete path is provided, search $PATH.
12991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12992$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12993        # Extract the first word of "$tool_basename", so it can be a program name with args.
12994set dummy $tool_basename; ac_word=$2
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12996$as_echo_n "checking for $ac_word... " >&6; }
12997if ${ac_cv_path_DF+:} false; then :
12998  $as_echo_n "(cached) " >&6
12999else
13000  case $DF in
13001  [\\/]* | ?:[\\/]*)
13002  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13003  ;;
13004  *)
13005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020  ;;
13021esac
13022fi
13023DF=$ac_cv_path_DF
13024if test -n "$DF"; then
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13026$as_echo "$DF" >&6; }
13027else
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030fi
13031
13032
13033        if test "x$DF" = x; then
13034          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13035        fi
13036      else
13037        # Otherwise we believe it is a complete path. Use it as it is.
13038        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13039$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13041$as_echo_n "checking for DF... " >&6; }
13042        if test ! -x "$tool_specified"; then
13043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13044$as_echo "not found" >&6; }
13045          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13046        fi
13047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13048$as_echo "$tool_specified" >&6; }
13049      fi
13050    fi
13051  fi
13052
13053
13054
13055
13056  # Publish this variable in the help.
13057
13058
13059  if test "x$CPIO" = x; then
13060    # The variable is not set by user, try to locate tool using the code snippet
13061    for ac_prog in cpio bsdcpio
13062do
13063  # Extract the first word of "$ac_prog", so it can be a program name with args.
13064set dummy $ac_prog; ac_word=$2
13065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13066$as_echo_n "checking for $ac_word... " >&6; }
13067if ${ac_cv_path_CPIO+:} false; then :
13068  $as_echo_n "(cached) " >&6
13069else
13070  case $CPIO in
13071  [\\/]* | ?:[\\/]*)
13072  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13073  ;;
13074  *)
13075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13076for as_dir in $PATH
13077do
13078  IFS=$as_save_IFS
13079  test -z "$as_dir" && as_dir=.
13080    for ac_exec_ext in '' $ac_executable_extensions; do
13081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13082    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13084    break 2
13085  fi
13086done
13087  done
13088IFS=$as_save_IFS
13089
13090  ;;
13091esac
13092fi
13093CPIO=$ac_cv_path_CPIO
13094if test -n "$CPIO"; then
13095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13096$as_echo "$CPIO" >&6; }
13097else
13098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13099$as_echo "no" >&6; }
13100fi
13101
13102
13103  test -n "$CPIO" && break
13104done
13105
13106  else
13107    # The variable is set, but is it from the command line or the environment?
13108
13109    # Try to remove the string !CPIO! from our list.
13110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13112      # If it failed, the variable was not from the command line. Ignore it,
13113      # but warn the user (except for BASH, which is always set by the calling BASH).
13114      if test "xCPIO" != xBASH; then
13115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13116$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13117      fi
13118      # Try to locate tool using the code snippet
13119      for ac_prog in cpio bsdcpio
13120do
13121  # Extract the first word of "$ac_prog", so it can be a program name with args.
13122set dummy $ac_prog; ac_word=$2
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124$as_echo_n "checking for $ac_word... " >&6; }
13125if ${ac_cv_path_CPIO+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  case $CPIO in
13129  [\\/]* | ?:[\\/]*)
13130  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13131  ;;
13132  *)
13133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_exec_ext in '' $ac_executable_extensions; do
13139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13140    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13142    break 2
13143  fi
13144done
13145  done
13146IFS=$as_save_IFS
13147
13148  ;;
13149esac
13150fi
13151CPIO=$ac_cv_path_CPIO
13152if test -n "$CPIO"; then
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13154$as_echo "$CPIO" >&6; }
13155else
13156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13157$as_echo "no" >&6; }
13158fi
13159
13160
13161  test -n "$CPIO" && break
13162done
13163
13164    else
13165      # If it succeeded, then it was overridden by the user. We will use it
13166      # for the tool.
13167
13168      # First remove it from the list of overridden variables, so we can test
13169      # for unknown variables in the end.
13170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13171
13172      # Check if the provided tool contains a complete path.
13173      tool_specified="$CPIO"
13174      tool_basename="${tool_specified##*/}"
13175      if test "x$tool_basename" = "x$tool_specified"; then
13176        # A command without a complete path is provided, search $PATH.
13177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13178$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13179        # Extract the first word of "$tool_basename", so it can be a program name with args.
13180set dummy $tool_basename; ac_word=$2
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13182$as_echo_n "checking for $ac_word... " >&6; }
13183if ${ac_cv_path_CPIO+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  case $CPIO in
13187  [\\/]* | ?:[\\/]*)
13188  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13189  ;;
13190  *)
13191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13192for as_dir in $PATH
13193do
13194  IFS=$as_save_IFS
13195  test -z "$as_dir" && as_dir=.
13196    for ac_exec_ext in '' $ac_executable_extensions; do
13197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13198    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13200    break 2
13201  fi
13202done
13203  done
13204IFS=$as_save_IFS
13205
13206  ;;
13207esac
13208fi
13209CPIO=$ac_cv_path_CPIO
13210if test -n "$CPIO"; then
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13212$as_echo "$CPIO" >&6; }
13213else
13214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13215$as_echo "no" >&6; }
13216fi
13217
13218
13219        if test "x$CPIO" = x; then
13220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13221        fi
13222      else
13223        # Otherwise we believe it is a complete path. Use it as it is.
13224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13225$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13227$as_echo_n "checking for CPIO... " >&6; }
13228        if test ! -x "$tool_specified"; then
13229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13230$as_echo "not found" >&6; }
13231          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13232        fi
13233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13234$as_echo "$tool_specified" >&6; }
13235      fi
13236    fi
13237  fi
13238
13239
13240
13241
13242# Now we can determine OpenJDK build and target platforms. This is required to
13243# have early on.
13244# Make sure we can run config.sub.
13245$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13246  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13247
13248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13249$as_echo_n "checking build system type... " >&6; }
13250if ${ac_cv_build+:} false; then :
13251  $as_echo_n "(cached) " >&6
13252else
13253  ac_build_alias=$build_alias
13254test "x$ac_build_alias" = x &&
13255  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13256test "x$ac_build_alias" = x &&
13257  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13258ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13259  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13260
13261fi
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13263$as_echo "$ac_cv_build" >&6; }
13264case $ac_cv_build in
13265*-*-*) ;;
13266*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13267esac
13268build=$ac_cv_build
13269ac_save_IFS=$IFS; IFS='-'
13270set x $ac_cv_build
13271shift
13272build_cpu=$1
13273build_vendor=$2
13274shift; shift
13275# Remember, the first character of IFS is used to create $*,
13276# except with old shells:
13277build_os=$*
13278IFS=$ac_save_IFS
13279case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13280
13281
13282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13283$as_echo_n "checking host system type... " >&6; }
13284if ${ac_cv_host+:} false; then :
13285  $as_echo_n "(cached) " >&6
13286else
13287  if test "x$host_alias" = x; then
13288  ac_cv_host=$ac_cv_build
13289else
13290  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13291    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13292fi
13293
13294fi
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13296$as_echo "$ac_cv_host" >&6; }
13297case $ac_cv_host in
13298*-*-*) ;;
13299*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13300esac
13301host=$ac_cv_host
13302ac_save_IFS=$IFS; IFS='-'
13303set x $ac_cv_host
13304shift
13305host_cpu=$1
13306host_vendor=$2
13307shift; shift
13308# Remember, the first character of IFS is used to create $*,
13309# except with old shells:
13310host_os=$*
13311IFS=$ac_save_IFS
13312case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13313
13314
13315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13316$as_echo_n "checking target system type... " >&6; }
13317if ${ac_cv_target+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  if test "x$target_alias" = x; then
13321  ac_cv_target=$ac_cv_host
13322else
13323  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13324    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13325fi
13326
13327fi
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13329$as_echo "$ac_cv_target" >&6; }
13330case $ac_cv_target in
13331*-*-*) ;;
13332*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13333esac
13334target=$ac_cv_target
13335ac_save_IFS=$IFS; IFS='-'
13336set x $ac_cv_target
13337shift
13338target_cpu=$1
13339target_vendor=$2
13340shift; shift
13341# Remember, the first character of IFS is used to create $*,
13342# except with old shells:
13343target_os=$*
13344IFS=$ac_save_IFS
13345case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13346
13347
13348# The aliases save the names the user supplied, while $host etc.
13349# will get canonicalized.
13350test -n "$target_alias" &&
13351  test "$program_prefix$program_suffix$program_transform_name" = \
13352    NONENONEs,x,x, &&
13353  program_prefix=${target_alias}-
13354
13355  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13356  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13357  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13358  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13359  # to use the configure naming style.
13360
13361
13362
13363
13364
13365  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13366  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13367  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13368  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13369  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13370  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13371
13372
13373
13374  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13375
13376  case "$build_os" in
13377    *linux*)
13378      VAR_OS=linux
13379      VAR_OS_TYPE=unix
13380      ;;
13381    *solaris*)
13382      VAR_OS=solaris
13383      VAR_OS_TYPE=unix
13384      ;;
13385    *darwin*)
13386      VAR_OS=macosx
13387      VAR_OS_TYPE=unix
13388      ;;
13389    *bsd*)
13390      VAR_OS=bsd
13391      VAR_OS_TYPE=unix
13392      ;;
13393    *cygwin*)
13394      VAR_OS=windows
13395      VAR_OS_ENV=windows.cygwin
13396      ;;
13397    *mingw*)
13398      VAR_OS=windows
13399      VAR_OS_ENV=windows.msys
13400      ;;
13401    *aix*)
13402      VAR_OS=aix
13403      VAR_OS_TYPE=unix
13404      ;;
13405    *)
13406      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13407      ;;
13408  esac
13409
13410
13411  # First argument is the cpu name from the trip/quad
13412  case "$build_cpu" in
13413    x86_64)
13414      VAR_CPU=x86_64
13415      VAR_CPU_ARCH=x86
13416      VAR_CPU_BITS=64
13417      VAR_CPU_ENDIAN=little
13418      ;;
13419    i?86)
13420      VAR_CPU=x86
13421      VAR_CPU_ARCH=x86
13422      VAR_CPU_BITS=32
13423      VAR_CPU_ENDIAN=little
13424      ;;
13425    arm*)
13426      VAR_CPU=arm
13427      VAR_CPU_ARCH=arm
13428      VAR_CPU_BITS=32
13429      VAR_CPU_ENDIAN=little
13430      ;;
13431    aarch64)
13432      VAR_CPU=aarch64
13433      VAR_CPU_ARCH=aarch64
13434      VAR_CPU_BITS=64
13435      VAR_CPU_ENDIAN=little
13436      ;;
13437    powerpc)
13438      VAR_CPU=ppc
13439      VAR_CPU_ARCH=ppc
13440      VAR_CPU_BITS=32
13441      VAR_CPU_ENDIAN=big
13442      ;;
13443    powerpc64)
13444      VAR_CPU=ppc64
13445      VAR_CPU_ARCH=ppc
13446      VAR_CPU_BITS=64
13447      VAR_CPU_ENDIAN=big
13448      ;;
13449    powerpc64le)
13450      VAR_CPU=ppc64
13451      VAR_CPU_ARCH=ppc
13452      VAR_CPU_BITS=64
13453      VAR_CPU_ENDIAN=little
13454      ;;
13455    s390)
13456      VAR_CPU=s390
13457      VAR_CPU_ARCH=s390
13458      VAR_CPU_BITS=32
13459      VAR_CPU_ENDIAN=big
13460      ;;
13461    s390x)
13462      VAR_CPU=s390x
13463      VAR_CPU_ARCH=s390
13464      VAR_CPU_BITS=64
13465      VAR_CPU_ENDIAN=big
13466      ;;
13467    sparc)
13468      VAR_CPU=sparc
13469      VAR_CPU_ARCH=sparc
13470      VAR_CPU_BITS=32
13471      VAR_CPU_ENDIAN=big
13472      ;;
13473    sparcv9|sparc64)
13474      VAR_CPU=sparcv9
13475      VAR_CPU_ARCH=sparc
13476      VAR_CPU_BITS=64
13477      VAR_CPU_ENDIAN=big
13478      ;;
13479    *)
13480      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13481      ;;
13482  esac
13483
13484  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13485  OPENJDK_BUILD_OS="$VAR_OS"
13486  if test "x$VAR_OS_TYPE" != x; then
13487    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13488  else
13489    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13490  fi
13491  if test "x$VAR_OS_ENV" != x; then
13492    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13493  else
13494    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13495  fi
13496  OPENJDK_BUILD_CPU="$VAR_CPU"
13497  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13498  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13499  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13500
13501
13502
13503
13504
13505
13506
13507
13508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13509$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13511$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13512
13513  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13514
13515  case "$host_os" in
13516    *linux*)
13517      VAR_OS=linux
13518      VAR_OS_TYPE=unix
13519      ;;
13520    *solaris*)
13521      VAR_OS=solaris
13522      VAR_OS_TYPE=unix
13523      ;;
13524    *darwin*)
13525      VAR_OS=macosx
13526      VAR_OS_TYPE=unix
13527      ;;
13528    *bsd*)
13529      VAR_OS=bsd
13530      VAR_OS_TYPE=unix
13531      ;;
13532    *cygwin*)
13533      VAR_OS=windows
13534      VAR_OS_ENV=windows.cygwin
13535      ;;
13536    *mingw*)
13537      VAR_OS=windows
13538      VAR_OS_ENV=windows.msys
13539      ;;
13540    *aix*)
13541      VAR_OS=aix
13542      VAR_OS_TYPE=unix
13543      ;;
13544    *)
13545      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13546      ;;
13547  esac
13548
13549
13550  # First argument is the cpu name from the trip/quad
13551  case "$host_cpu" in
13552    x86_64)
13553      VAR_CPU=x86_64
13554      VAR_CPU_ARCH=x86
13555      VAR_CPU_BITS=64
13556      VAR_CPU_ENDIAN=little
13557      ;;
13558    i?86)
13559      VAR_CPU=x86
13560      VAR_CPU_ARCH=x86
13561      VAR_CPU_BITS=32
13562      VAR_CPU_ENDIAN=little
13563      ;;
13564    arm*)
13565      VAR_CPU=arm
13566      VAR_CPU_ARCH=arm
13567      VAR_CPU_BITS=32
13568      VAR_CPU_ENDIAN=little
13569      ;;
13570    aarch64)
13571      VAR_CPU=aarch64
13572      VAR_CPU_ARCH=aarch64
13573      VAR_CPU_BITS=64
13574      VAR_CPU_ENDIAN=little
13575      ;;
13576    powerpc)
13577      VAR_CPU=ppc
13578      VAR_CPU_ARCH=ppc
13579      VAR_CPU_BITS=32
13580      VAR_CPU_ENDIAN=big
13581      ;;
13582    powerpc64)
13583      VAR_CPU=ppc64
13584      VAR_CPU_ARCH=ppc
13585      VAR_CPU_BITS=64
13586      VAR_CPU_ENDIAN=big
13587      ;;
13588    powerpc64le)
13589      VAR_CPU=ppc64
13590      VAR_CPU_ARCH=ppc
13591      VAR_CPU_BITS=64
13592      VAR_CPU_ENDIAN=little
13593      ;;
13594    s390)
13595      VAR_CPU=s390
13596      VAR_CPU_ARCH=s390
13597      VAR_CPU_BITS=32
13598      VAR_CPU_ENDIAN=big
13599      ;;
13600    s390x)
13601      VAR_CPU=s390x
13602      VAR_CPU_ARCH=s390
13603      VAR_CPU_BITS=64
13604      VAR_CPU_ENDIAN=big
13605      ;;
13606    sparc)
13607      VAR_CPU=sparc
13608      VAR_CPU_ARCH=sparc
13609      VAR_CPU_BITS=32
13610      VAR_CPU_ENDIAN=big
13611      ;;
13612    sparcv9|sparc64)
13613      VAR_CPU=sparcv9
13614      VAR_CPU_ARCH=sparc
13615      VAR_CPU_BITS=64
13616      VAR_CPU_ENDIAN=big
13617      ;;
13618    *)
13619      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13620      ;;
13621  esac
13622
13623  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13624  OPENJDK_TARGET_OS="$VAR_OS"
13625  if test "x$VAR_OS_TYPE" != x; then
13626    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13627  else
13628    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13629  fi
13630  if test "x$VAR_OS_ENV" != x; then
13631    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13632  else
13633    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13634  fi
13635  OPENJDK_TARGET_CPU="$VAR_CPU"
13636  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13637  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13638  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13639
13640
13641
13642
13643
13644
13645
13646
13647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13648$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13650$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13651
13652
13653
13654# Check whether --with-target-bits was given.
13655if test "${with_target_bits+set}" = set; then :
13656  withval=$with_target_bits;
13657fi
13658
13659
13660  # We have three types of compiles:
13661  # native  == normal compilation, target system == build system
13662  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13663  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13664  #
13665  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13666    # We're doing a proper cross-compilation
13667    COMPILE_TYPE="cross"
13668  else
13669    COMPILE_TYPE="native"
13670  fi
13671
13672  if test "x$with_target_bits" != x; then
13673    if test "x$COMPILE_TYPE" = "xcross"; then
13674      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13675    fi
13676
13677    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13678      # A reduced build is requested
13679      COMPILE_TYPE="reduced"
13680      OPENJDK_TARGET_CPU_BITS=32
13681      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13682        OPENJDK_TARGET_CPU=x86
13683      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13684        OPENJDK_TARGET_CPU=sparc
13685      else
13686        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13687      fi
13688    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13689      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
13690    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13691      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13692$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13693    else
13694      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13695    fi
13696  fi
13697
13698
13699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13700$as_echo_n "checking compilation type... " >&6; }
13701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13702$as_echo "$COMPILE_TYPE" >&6; }
13703
13704
13705  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13706    REQUIRED_OS_NAME=SunOS
13707    REQUIRED_OS_VERSION=5.10
13708  fi
13709  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13710    REQUIRED_OS_NAME=Linux
13711    REQUIRED_OS_VERSION=2.6
13712  fi
13713  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13714    REQUIRED_OS_NAME=Windows
13715    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13716      REQUIRED_OS_VERSION=5.2
13717    else
13718      REQUIRED_OS_VERSION=5.1
13719    fi
13720  fi
13721  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13722    REQUIRED_OS_NAME=Darwin
13723    REQUIRED_OS_VERSION=11.2
13724  fi
13725
13726
13727
13728
13729
13730  # Also store the legacy naming of the cpu.
13731  # Ie i586 and amd64 instead of x86 and x86_64
13732  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13733  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13734    OPENJDK_TARGET_CPU_LEGACY="i586"
13735  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13736    # On all platforms except MacOSX replace x86_64 with amd64.
13737    OPENJDK_TARGET_CPU_LEGACY="amd64"
13738  fi
13739
13740
13741  # And the second legacy naming of the cpu.
13742  # Ie i386 and amd64 instead of x86 and x86_64.
13743  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13744  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13745    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13746  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13747    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13748  fi
13749
13750
13751  # This is the name of the cpu (but using i386 and amd64 instead of
13752  # x86 and x86_64, respectively), preceeded by a /, to be used when
13753  # locating libraries. On macosx, it's empty, though.
13754  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13755  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13756    OPENJDK_TARGET_CPU_LIBDIR=""
13757  fi
13758
13759
13760  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13761  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13762  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13763  OPENJDK_TARGET_CPU_ISADIR=""
13764  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13765    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13766      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13767    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13768      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13769    fi
13770  fi
13771
13772
13773  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13774  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13775  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13776    # On linux only, we replace x86 with i386.
13777    OPENJDK_TARGET_CPU_OSARCH="i386"
13778  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13779    # On all platforms except macosx, we replace x86_64 with amd64.
13780    OPENJDK_TARGET_CPU_OSARCH="amd64"
13781  fi
13782
13783
13784  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13785  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13786    OPENJDK_TARGET_CPU_JLI="i386"
13787  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13788    # On all platforms except macosx, we replace x86_64 with amd64.
13789    OPENJDK_TARGET_CPU_JLI="amd64"
13790  fi
13791  # Now setup the -D flags for building libjli.
13792  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13793  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13794    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13795      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13796    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13797      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13798    fi
13799  fi
13800
13801
13802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13803      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13804  else
13805      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13806  fi
13807
13808
13809  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13810    A_LP64="LP64:="
13811    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13812    # unpack200.exe
13813    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13814      ADD_LP64="-D_LP64=1"
13815    fi
13816  fi
13817  LP64=$A_LP64
13818
13819
13820  if test "x$COMPILE_TYPE" = "xcross"; then
13821    # FIXME: ... or should this include reduced builds..?
13822    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13823  else
13824    DEFINE_CROSS_COMPILE_ARCH=""
13825  fi
13826
13827
13828  # ZERO_ARCHDEF is used to enable architecture-specific code
13829  case "${OPENJDK_TARGET_CPU}" in
13830    ppc)     ZERO_ARCHDEF=PPC32 ;;
13831    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13832    s390*)   ZERO_ARCHDEF=S390  ;;
13833    sparc*)  ZERO_ARCHDEF=SPARC ;;
13834    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13835    x86)     ZERO_ARCHDEF=IA32  ;;
13836    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13837  esac
13838
13839
13840
13841
13842# Continue setting up basic stuff. Most remaining code require fundamental tools.
13843
13844  # Save the current directory this script was started from
13845  CURDIR="$PWD"
13846
13847  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
13848  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
13849  # was not available at that time.
13850  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
13851  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
13852    ORIGINAL_PATH="$REWRITTEN_PATH"
13853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
13854$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
13855  fi
13856
13857  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13858    PATH_SEP=";"
13859
13860  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13861  if test $SRC_ROOT_LENGTH -gt 100; then
13862    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13863  fi
13864
13865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13867$as_echo_n "checking cygwin release... " >&6; }
13868    CYGWIN_VERSION=`$UNAME -r`
13869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13870$as_echo "$CYGWIN_VERSION" >&6; }
13871    WINDOWS_ENV_VENDOR='cygwin'
13872    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13873
13874    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13875    if test "x$CYGWIN_VERSION_OLD" != x; then
13876      { $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
13877$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;}
13878      as_fn_error $? "Cannot continue" "$LINENO" 5
13879    fi
13880    if test "x$CYGPATH" = x; then
13881      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13882    fi
13883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13884$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13885    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13886    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13887    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13888    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13890$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13891    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13892    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13893    if test "x$test_cygdrive_prefix" = x; then
13894      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13895    fi
13896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13898$as_echo_n "checking msys release... " >&6; }
13899    MSYS_VERSION=`$UNAME -r`
13900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13901$as_echo "$MSYS_VERSION" >&6; }
13902
13903    WINDOWS_ENV_VENDOR='msys'
13904    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13905
13906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13907$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13908    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13909    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13910
13911  windows_path="$MSYS_ROOT_PATH"
13912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13913    unix_path=`$CYGPATH -u "$windows_path"`
13914    MSYS_ROOT_PATH="$unix_path"
13915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13917    MSYS_ROOT_PATH="$unix_path"
13918  fi
13919
13920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13921$as_echo "$MSYS_ROOT_PATH" >&6; }
13922    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13923  else
13924    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13925  fi
13926
13927  # Test if windows or unix (cygwin/msys) find is first in path.
13928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13929$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13930  FIND_BINARY_OUTPUT=`find --version 2>&1`
13931  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13933$as_echo "unix style" >&6; }
13934  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13936$as_echo "Windows" >&6; }
13937    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13938$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13939    { $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
13940$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13941    as_fn_error $? "Cannot continue" "$LINENO" 5
13942  else
13943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13944$as_echo "unknown" >&6; }
13945    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13946$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13947  fi
13948
13949  else
13950    PATH_SEP=":"
13951  fi
13952
13953
13954  # We get the top-level directory from the supporting wrappers.
13955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13956$as_echo_n "checking for top-level directory... " >&6; }
13957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13958$as_echo "$TOPDIR" >&6; }
13959
13960
13961  # Save the original version of TOPDIR for string comparisons
13962  ORIGINAL_TOPDIR="$TOPDIR"
13963
13964
13965  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13966
13967  # Only process if variable expands to non-empty
13968
13969  if test "x$CURDIR" != x; then
13970    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13971
13972  # Input might be given as Windows format, start by converting to
13973  # unix format.
13974  path="$CURDIR"
13975  new_path=`$CYGPATH -u "$path"`
13976
13977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13980  # "foo.exe" is OK but "foo" is an error.
13981  #
13982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13983  # It is also a way to make sure we got the proper file name for the real test later on.
13984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13985  if test "x$test_shortpath" = x; then
13986    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13987$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13988    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13989  fi
13990
13991  # Call helper function which possibly converts this using DOS-style short mode.
13992  # If so, the updated path is stored in $new_path.
13993
13994  input_path="$new_path"
13995  # Check if we need to convert this using DOS-style short mode. If the path
13996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13997  # take no chances and rewrite it.
13998  # Note: m4 eats our [], so we need to use [ and ] instead.
13999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14000  if test "x$has_forbidden_chars" != x; then
14001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14005      # Going to short mode and back again did indeed matter. Since short mode is
14006      # case insensitive, let's make it lowercase to improve readability.
14007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14008      # Now convert it back to Unix-style (cygpath)
14009      input_path=`$CYGPATH -u "$shortmode_path"`
14010      new_path="$input_path"
14011    fi
14012  fi
14013
14014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14015  if test "x$test_cygdrive_prefix" = x; then
14016    # As a simple fix, exclude /usr/bin since it's not a real path.
14017    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14019      # a path prefixed by /cygdrive for fixpath to work.
14020      new_path="$CYGWIN_ROOT_PATH$input_path"
14021    fi
14022  fi
14023
14024
14025  if test "x$path" != "x$new_path"; then
14026    CURDIR="$new_path"
14027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14028$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14029  fi
14030
14031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14032
14033  path="$CURDIR"
14034  has_colon=`$ECHO $path | $GREP ^.:`
14035  new_path="$path"
14036  if test "x$has_colon" = x; then
14037    # Not in mixed or Windows style, start by that.
14038    new_path=`cmd //c echo $path`
14039  fi
14040
14041
14042  input_path="$new_path"
14043  # Check if we need to convert this using DOS-style short mode. If the path
14044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14045  # take no chances and rewrite it.
14046  # Note: m4 eats our [], so we need to use [ and ] instead.
14047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14048  if test "x$has_forbidden_chars" != x; then
14049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14051  fi
14052
14053
14054  windows_path="$new_path"
14055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14056    unix_path=`$CYGPATH -u "$windows_path"`
14057    new_path="$unix_path"
14058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14060    new_path="$unix_path"
14061  fi
14062
14063  if test "x$path" != "x$new_path"; then
14064    CURDIR="$new_path"
14065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14066$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14067  fi
14068
14069  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14070  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14071
14072    else
14073      # We're on a unix platform. Hooray! :)
14074      path="$CURDIR"
14075      has_space=`$ECHO "$path" | $GREP " "`
14076      if test "x$has_space" != x; then
14077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14078$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14079        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14080      fi
14081
14082      # Use eval to expand a potential ~
14083      eval path="$path"
14084      if test ! -f "$path" && test ! -d "$path"; then
14085        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14086      fi
14087
14088      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14089    fi
14090  fi
14091
14092
14093  # Only process if variable expands to non-empty
14094
14095  if test "x$TOPDIR" != x; then
14096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14097
14098  # Input might be given as Windows format, start by converting to
14099  # unix format.
14100  path="$TOPDIR"
14101  new_path=`$CYGPATH -u "$path"`
14102
14103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14106  # "foo.exe" is OK but "foo" is an error.
14107  #
14108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14109  # It is also a way to make sure we got the proper file name for the real test later on.
14110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14111  if test "x$test_shortpath" = x; then
14112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14113$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14114    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14115  fi
14116
14117  # Call helper function which possibly converts this using DOS-style short mode.
14118  # If so, the updated path is stored in $new_path.
14119
14120  input_path="$new_path"
14121  # Check if we need to convert this using DOS-style short mode. If the path
14122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14123  # take no chances and rewrite it.
14124  # Note: m4 eats our [], so we need to use [ and ] instead.
14125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14126  if test "x$has_forbidden_chars" != x; then
14127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14131      # Going to short mode and back again did indeed matter. Since short mode is
14132      # case insensitive, let's make it lowercase to improve readability.
14133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14134      # Now convert it back to Unix-style (cygpath)
14135      input_path=`$CYGPATH -u "$shortmode_path"`
14136      new_path="$input_path"
14137    fi
14138  fi
14139
14140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14141  if test "x$test_cygdrive_prefix" = x; then
14142    # As a simple fix, exclude /usr/bin since it's not a real path.
14143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14145      # a path prefixed by /cygdrive for fixpath to work.
14146      new_path="$CYGWIN_ROOT_PATH$input_path"
14147    fi
14148  fi
14149
14150
14151  if test "x$path" != "x$new_path"; then
14152    TOPDIR="$new_path"
14153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14154$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14155  fi
14156
14157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14158
14159  path="$TOPDIR"
14160  has_colon=`$ECHO $path | $GREP ^.:`
14161  new_path="$path"
14162  if test "x$has_colon" = x; then
14163    # Not in mixed or Windows style, start by that.
14164    new_path=`cmd //c echo $path`
14165  fi
14166
14167
14168  input_path="$new_path"
14169  # Check if we need to convert this using DOS-style short mode. If the path
14170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14171  # take no chances and rewrite it.
14172  # Note: m4 eats our [], so we need to use [ and ] instead.
14173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14174  if test "x$has_forbidden_chars" != x; then
14175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14177  fi
14178
14179
14180  windows_path="$new_path"
14181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14182    unix_path=`$CYGPATH -u "$windows_path"`
14183    new_path="$unix_path"
14184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14186    new_path="$unix_path"
14187  fi
14188
14189  if test "x$path" != "x$new_path"; then
14190    TOPDIR="$new_path"
14191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14192$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14193  fi
14194
14195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14197
14198    else
14199      # We're on a unix platform. Hooray! :)
14200      path="$TOPDIR"
14201      has_space=`$ECHO "$path" | $GREP " "`
14202      if test "x$has_space" != x; then
14203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14204$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14206      fi
14207
14208      # Use eval to expand a potential ~
14209      eval path="$path"
14210      if test ! -f "$path" && test ! -d "$path"; then
14211        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14212      fi
14213
14214      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14215    fi
14216  fi
14217
14218  # SRC_ROOT is a traditional alias for TOPDIR.
14219  SRC_ROOT=$TOPDIR
14220
14221  # Calculate a canonical version of TOPDIR for string comparisons
14222  CANONICAL_TOPDIR=$TOPDIR
14223
14224  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14225    # Follow a chain of symbolic links. Use readlink
14226    # where it exists, else fall back to horribly
14227    # complicated shell code.
14228    if test "x$READLINK_TESTED" != yes; then
14229      # On MacOSX there is a readlink tool with a different
14230      # purpose than the GNU readlink tool. Check the found readlink.
14231      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14232      if test "x$ISGNU" = x; then
14233        # A readlink that we do not know how to use.
14234        # Are there other non-GNU readlinks out there?
14235        READLINK_TESTED=yes
14236        READLINK=
14237      fi
14238    fi
14239
14240    if test "x$READLINK" != x; then
14241      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14242    else
14243      # Save the current directory for restoring afterwards
14244      STARTDIR=$PWD
14245      COUNTER=0
14246      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14247      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14248      cd $sym_link_dir
14249      # Use -P flag to resolve symlinks in directories.
14250      cd `$THEPWDCMD -P`
14251      sym_link_dir=`$THEPWDCMD -P`
14252      # Resolve file symlinks
14253      while test $COUNTER -lt 20; do
14254        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14255        if test "x$ISLINK" == x; then
14256          # This is not a symbolic link! We are done!
14257          break
14258        fi
14259        # Again resolve directory symlinks since the target of the just found
14260        # link could be in a different directory
14261        cd `$DIRNAME $ISLINK`
14262        sym_link_dir=`$THEPWDCMD -P`
14263        sym_link_file=`$BASENAME $ISLINK`
14264        let COUNTER=COUNTER+1
14265      done
14266      cd $STARTDIR
14267      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14268    fi
14269  fi
14270
14271
14272
14273  # Locate the directory of this script.
14274  AUTOCONF_DIR=$TOPDIR/common/autoconf
14275
14276
14277# Check if it's a pure open build or if custom sources are to be used.
14278
14279  # Check whether --enable-openjdk-only was given.
14280if test "${enable_openjdk_only+set}" = set; then :
14281  enableval=$enable_openjdk_only;
14282else
14283  enable_openjdk_only="no"
14284fi
14285
14286
14287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14288$as_echo_n "checking for presence of closed sources... " >&6; }
14289  if test -d "$SRC_ROOT/jdk/src/closed"; then
14290    CLOSED_SOURCE_PRESENT=yes
14291  else
14292    CLOSED_SOURCE_PRESENT=no
14293  fi
14294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14295$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14296
14297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14298$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14299  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14301$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14302
14303  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14304    OPENJDK=true
14305    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14306      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14307$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14308    fi
14309  else
14310    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14311      OPENJDK=true
14312    else
14313      OPENJDK=false
14314    fi
14315  fi
14316
14317  if test "x$OPENJDK" = "xtrue"; then
14318    SET_OPENJDK="OPENJDK=true"
14319  fi
14320
14321
14322
14323  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14324  # the IncludeCustomExtension macro.
14325
14326
14327# Check whether --with-custom-make-dir was given.
14328if test "${with_custom_make_dir+set}" = set; then :
14329  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
14330$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14331fi
14332
14333
14334
14335
14336# These are needed to be able to create a configuration name (and thus the output directory)
14337
14338  ###############################################################################
14339  #
14340  # Check which variant of the JDK that we want to build.
14341  # Currently we have:
14342  #    normal:   standard edition
14343  # but the custom make system may add other variants
14344  #
14345  # Effectively the JDK variant gives a name to a specific set of
14346  # modules to compile into the JDK. In the future, these modules
14347  # might even be Jigsaw modules.
14348  #
14349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14350$as_echo_n "checking which variant of the JDK to build... " >&6; }
14351
14352# Check whether --with-jdk-variant was given.
14353if test "${with_jdk_variant+set}" = set; then :
14354  withval=$with_jdk_variant;
14355fi
14356
14357
14358  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14359    JDK_VARIANT="normal"
14360  else
14361    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14362  fi
14363
14364
14365
14366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14367$as_echo "$JDK_VARIANT" >&6; }
14368
14369
14370###############################################################################
14371#
14372# Check which interpreter of the JVM we want to build.
14373# Currently we have:
14374#    template: Template interpreter (the default)
14375#    cpp     : C++ interpreter
14376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14377$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14378
14379# Check whether --with-jvm-interpreter was given.
14380if test "${with_jvm_interpreter+set}" = set; then :
14381  withval=$with_jvm_interpreter;
14382fi
14383
14384
14385if test "x$with_jvm_interpreter" = x; then
14386     with_jvm_interpreter="template"
14387fi
14388
14389JVM_INTERPRETER="$with_jvm_interpreter"
14390
14391if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14392   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14393fi
14394
14395
14396
14397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14398$as_echo "$with_jvm_interpreter" >&6; }
14399
14400
14401
14402  ###############################################################################
14403  #
14404  # Check which variants of the JVM that we want to build.
14405  # Currently we have:
14406  #    server: normal interpreter and a tiered C1/C2 compiler
14407  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14408  #    minimal1: reduced form of client with optional VM services and features stripped out
14409  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14410  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14411  #    zero: no machine code interpreter, no compiler
14412  #    zeroshark: zero interpreter and shark/llvm compiler backend
14413#    core: interpreter only, no compiler (only works on some platforms)
14414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14415$as_echo_n "checking which variants of the JVM to build... " >&6; }
14416
14417# Check whether --with-jvm-variants was given.
14418if test "${with_jvm_variants+set}" = set; then :
14419  withval=$with_jvm_variants;
14420fi
14421
14422
14423  if test "x$with_jvm_variants" = x; then
14424    with_jvm_variants="server"
14425  fi
14426
14427  JVM_VARIANTS=",$with_jvm_variants,"
14428  TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
14429
14430  if test "x$TEST_VARIANTS" != "x,"; then
14431     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14432  fi
14433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14434$as_echo "$with_jvm_variants" >&6; }
14435
14436  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14437  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14438  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14439  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14440  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14441  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14442  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14443
14444  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14445    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14446      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14447    fi
14448  fi
14449  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14450    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14451      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14452    fi
14453  fi
14454  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14455    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14456      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14457    fi
14458  fi
14459
14460  # Replace the commas with AND for use in the build directory name.
14461  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14462  COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
14463  if test "x$COUNT_VARIANTS" != "x,1"; then
14464    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14465  else
14466    BUILDING_MULTIPLE_JVM_VARIANTS=no
14467  fi
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478  INCLUDE_SA=true
14479  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14480    INCLUDE_SA=false
14481  fi
14482  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14483    INCLUDE_SA=false
14484  fi
14485  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14486    INCLUDE_SA=false
14487  fi
14488  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14489    INCLUDE_SA=false
14490  fi
14491
14492
14493  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14494    MACOSX_UNIVERSAL="true"
14495  fi
14496
14497
14498
14499
14500  ###############################################################################
14501  #
14502  # Set the debug level
14503  #    release: no debug information, all optimizations, no asserts.
14504  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14505  #    fastdebug: debug information (-g), all optimizations, all asserts
14506  #    slowdebug: debug information (-g), no optimizations, all asserts
14507  #
14508  DEBUG_LEVEL="release"
14509  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14510$as_echo_n "checking which debug level to use... " >&6; }
14511  # Check whether --enable-debug was given.
14512if test "${enable_debug+set}" = set; then :
14513  enableval=$enable_debug;
14514        ENABLE_DEBUG="${enableval}"
14515        DEBUG_LEVEL="fastdebug"
14516
14517else
14518  ENABLE_DEBUG="no"
14519fi
14520
14521
14522
14523# Check whether --with-debug-level was given.
14524if test "${with_debug_level+set}" = set; then :
14525  withval=$with_debug_level;
14526        DEBUG_LEVEL="${withval}"
14527        if test "x$ENABLE_DEBUG" = xyes; then
14528          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14529        fi
14530
14531fi
14532
14533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14534$as_echo "$DEBUG_LEVEL" >&6; }
14535
14536  if test "x$DEBUG_LEVEL" != xrelease && \
14537      test "x$DEBUG_LEVEL" != xoptimized && \
14538      test "x$DEBUG_LEVEL" != xfastdebug && \
14539      test "x$DEBUG_LEVEL" != xslowdebug; then
14540    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14541  fi
14542
14543
14544  ###############################################################################
14545  #
14546  # Setup legacy vars/targets and new vars to deal with different debug levels.
14547  #
14548
14549  case $DEBUG_LEVEL in
14550    release )
14551      VARIANT="OPT"
14552      FASTDEBUG="false"
14553      DEBUG_CLASSFILES="false"
14554      BUILD_VARIANT_RELEASE=""
14555      HOTSPOT_DEBUG_LEVEL="product"
14556      HOTSPOT_EXPORT="product"
14557      ;;
14558    fastdebug )
14559      VARIANT="DBG"
14560      FASTDEBUG="true"
14561      DEBUG_CLASSFILES="true"
14562      BUILD_VARIANT_RELEASE="-fastdebug"
14563      HOTSPOT_DEBUG_LEVEL="fastdebug"
14564      HOTSPOT_EXPORT="fastdebug"
14565      ;;
14566    slowdebug )
14567      VARIANT="DBG"
14568      FASTDEBUG="false"
14569      DEBUG_CLASSFILES="true"
14570      BUILD_VARIANT_RELEASE="-debug"
14571      HOTSPOT_DEBUG_LEVEL="debug"
14572      HOTSPOT_EXPORT="debug"
14573      ;;
14574    optimized )
14575      VARIANT="OPT"
14576      FASTDEBUG="false"
14577      DEBUG_CLASSFILES="false"
14578      BUILD_VARIANT_RELEASE="-optimized"
14579      HOTSPOT_DEBUG_LEVEL="optimized"
14580      HOTSPOT_EXPORT="optimized"
14581      ;;
14582  esac
14583
14584  # The debug level 'optimized' is a little special because it is currently only
14585  # applicable to the HotSpot build where it means to build a completely
14586  # optimized version of the VM without any debugging code (like for the
14587  # 'release' debug level which is called 'product' in the HotSpot build) but
14588  # with the exception that it can contain additional code which is otherwise
14589  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14590  # test new and/or experimental features which are not intended for customer
14591  # shipment. Because these new features need to be tested and benchmarked in
14592  # real world scenarios, we want to build the containing JDK at the 'release'
14593  # debug level.
14594  if test "x$DEBUG_LEVEL" = xoptimized; then
14595    DEBUG_LEVEL="release"
14596  fi
14597
14598  #####
14599  # Generate the legacy makefile targets for hotspot.
14600  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14601  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14602  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14603  # But until then ...
14604  HOTSPOT_TARGET=""
14605
14606  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14607    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14608  fi
14609
14610  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14611    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14612  fi
14613
14614  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14615    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14616  fi
14617
14618  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14619    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14620  fi
14621
14622  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14623    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14624  fi
14625
14626  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14627    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14628  fi
14629
14630  if test "x$JVM_VARIANT_CORE" = xtrue; then
14631    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14632  fi
14633
14634  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14635
14636  # On Macosx universal binaries are produced, but they only contain
14637  # 64 bit intel. This invalidates control of which jvms are built
14638  # from configure, but only server is valid anyway. Fix this
14639  # when hotspot makefiles are rewritten.
14640  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14641    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14642  fi
14643
14644  #####
14645
14646
14647
14648
14649
14650
14651
14652
14653# With basic setup done, call the custom early hook.
14654
14655
14656# Check if we have devkits, extra paths or sysroot set.
14657
14658
14659# Check whether --with-devkit was given.
14660if test "${with_devkit+set}" = set; then :
14661  withval=$with_devkit;
14662
14663  # Only process if variable expands to non-empty
14664
14665  if test "x$with_devkit" != x; then
14666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14667
14668  # Input might be given as Windows format, start by converting to
14669  # unix format.
14670  path="$with_devkit"
14671  new_path=`$CYGPATH -u "$path"`
14672
14673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14676  # "foo.exe" is OK but "foo" is an error.
14677  #
14678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14679  # It is also a way to make sure we got the proper file name for the real test later on.
14680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14681  if test "x$test_shortpath" = x; then
14682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14683$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14684    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14685  fi
14686
14687  # Call helper function which possibly converts this using DOS-style short mode.
14688  # If so, the updated path is stored in $new_path.
14689
14690  input_path="$new_path"
14691  # Check if we need to convert this using DOS-style short mode. If the path
14692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14693  # take no chances and rewrite it.
14694  # Note: m4 eats our [], so we need to use [ and ] instead.
14695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14696  if test "x$has_forbidden_chars" != x; then
14697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14701      # Going to short mode and back again did indeed matter. Since short mode is
14702      # case insensitive, let's make it lowercase to improve readability.
14703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14704      # Now convert it back to Unix-style (cygpath)
14705      input_path=`$CYGPATH -u "$shortmode_path"`
14706      new_path="$input_path"
14707    fi
14708  fi
14709
14710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14711  if test "x$test_cygdrive_prefix" = x; then
14712    # As a simple fix, exclude /usr/bin since it's not a real path.
14713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14715      # a path prefixed by /cygdrive for fixpath to work.
14716      new_path="$CYGWIN_ROOT_PATH$input_path"
14717    fi
14718  fi
14719
14720
14721  if test "x$path" != "x$new_path"; then
14722    with_devkit="$new_path"
14723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14724$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14725  fi
14726
14727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14728
14729  path="$with_devkit"
14730  has_colon=`$ECHO $path | $GREP ^.:`
14731  new_path="$path"
14732  if test "x$has_colon" = x; then
14733    # Not in mixed or Windows style, start by that.
14734    new_path=`cmd //c echo $path`
14735  fi
14736
14737
14738  input_path="$new_path"
14739  # Check if we need to convert this using DOS-style short mode. If the path
14740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14741  # take no chances and rewrite it.
14742  # Note: m4 eats our [], so we need to use [ and ] instead.
14743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14744  if test "x$has_forbidden_chars" != x; then
14745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14747  fi
14748
14749
14750  windows_path="$new_path"
14751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14752    unix_path=`$CYGPATH -u "$windows_path"`
14753    new_path="$unix_path"
14754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14756    new_path="$unix_path"
14757  fi
14758
14759  if test "x$path" != "x$new_path"; then
14760    with_devkit="$new_path"
14761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14762$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14763  fi
14764
14765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14767
14768    else
14769      # We're on a unix platform. Hooray! :)
14770      path="$with_devkit"
14771      has_space=`$ECHO "$path" | $GREP " "`
14772      if test "x$has_space" != x; then
14773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14774$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14776      fi
14777
14778      # Use eval to expand a potential ~
14779      eval path="$path"
14780      if test ! -f "$path" && test ! -d "$path"; then
14781        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14782      fi
14783
14784      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14785    fi
14786  fi
14787
14788        DEVKIT_ROOT="$with_devkit"
14789        # Check for a meta data info file in the root of the devkit
14790        if test -f "$DEVKIT_ROOT/devkit.info"; then
14791          . $DEVKIT_ROOT/devkit.info
14792          # This potentially sets the following:
14793          # A descriptive name of the devkit
14794
14795  if test "x$DEVKIT_NAME" = x; then
14796    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14797  fi
14798
14799          # Corresponds to --with-extra-path
14800
14801  if test "x$DEVKIT_EXTRA_PATH" = x; then
14802    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14803  fi
14804
14805          # Corresponds to --with-toolchain-path
14806
14807  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14808    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14809  fi
14810
14811          # Corresponds to --with-sysroot
14812
14813  if test "x$DEVKIT_SYSROOT" = x; then
14814    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14815  fi
14816
14817
14818          # Identifies the Visual Studio version in the devkit
14819
14820  if test "x$DEVKIT_VS_VERSION" = x; then
14821    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14822  fi
14823
14824          # The Visual Studio include environment variable
14825
14826  if test "x$DEVKIT_VS_INCLUDE" = x; then
14827    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14828  fi
14829
14830          # The Visual Studio lib environment variable
14831
14832  if test "x$DEVKIT_VS_LIB" = x; then
14833    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14834  fi
14835
14836          # Corresponds to --with-msvcr-dll
14837
14838  if test "x$DEVKIT_MSVCR_DLL" = x; then
14839    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14840  fi
14841
14842          # Corresponds to --with-msvcp-dll
14843
14844  if test "x$DEVKIT_MSVCP_DLL" = x; then
14845    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14846  fi
14847
14848        fi
14849
14850        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14851$as_echo_n "checking for devkit... " >&6; }
14852        if test "x$DEVKIT_NAME" != x; then
14853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14854$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14855        else
14856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14857$as_echo "$DEVKIT_ROOT" >&6; }
14858        fi
14859
14860
14861  if test "x$DEVKIT_EXTRA_PATH" != x; then
14862    if test "x$EXTRA_PATH" = x; then
14863      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14864    else
14865      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14866    fi
14867  fi
14868
14869
14870        # Fallback default of just /bin if DEVKIT_PATH is not defined
14871        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14872          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14873        fi
14874
14875  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14876    if test "x$TOOLCHAIN_PATH" = x; then
14877      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14878    else
14879      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14880    fi
14881  fi
14882
14883
14884        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14885        # places for backwards compatiblity.
14886        if test "x$DEVKIT_SYSROOT" != x; then
14887          SYSROOT="$DEVKIT_SYSROOT"
14888        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14889          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14890        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14891          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14892        fi
14893
14894
14895fi
14896
14897
14898  # You can force the sysroot if the sysroot encoded into the compiler tools
14899  # is not correct.
14900
14901# Check whether --with-sys-root was given.
14902if test "${with_sys_root+set}" = set; then :
14903  withval=$with_sys_root; SYSROOT=$with_sys_root
14904
14905fi
14906
14907
14908
14909# Check whether --with-sysroot was given.
14910if test "${with_sysroot+set}" = set; then :
14911  withval=$with_sysroot; SYSROOT=$with_sysroot
14912
14913fi
14914
14915
14916
14917# Check whether --with-tools-dir was given.
14918if test "${with_tools_dir+set}" = set; then :
14919  withval=$with_tools_dir;
14920  if test "x$with_tools_dir" != x; then
14921    if test "x$TOOLCHAIN_PATH" = x; then
14922      TOOLCHAIN_PATH="$with_tools_dir"
14923    else
14924      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14925    fi
14926  fi
14927
14928
14929fi
14930
14931
14932
14933# Check whether --with-toolchain-path was given.
14934if test "${with_toolchain_path+set}" = set; then :
14935  withval=$with_toolchain_path;
14936  if test "x$with_toolchain_path" != x; then
14937    if test "x$TOOLCHAIN_PATH" = x; then
14938      TOOLCHAIN_PATH="$with_toolchain_path"
14939    else
14940      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14941    fi
14942  fi
14943
14944
14945fi
14946
14947
14948
14949# Check whether --with-extra-path was given.
14950if test "${with_extra_path+set}" = set; then :
14951  withval=$with_extra_path;
14952  if test "x$with_extra_path" != x; then
14953    if test "x$EXTRA_PATH" = x; then
14954      EXTRA_PATH="$with_extra_path"
14955    else
14956      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14957    fi
14958  fi
14959
14960
14961fi
14962
14963
14964  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14965    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
14966    # If not, detect if Xcode is installed by running xcodebuild -version
14967    # if no Xcode installed, xcodebuild exits with 1
14968    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14969    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14970      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14971      # fall back on the stub binary in /usr/bin/xcodebuild
14972      # Extract the first word of "xcodebuild", so it can be a program name with args.
14973set dummy xcodebuild; ac_word=$2
14974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14975$as_echo_n "checking for $ac_word... " >&6; }
14976if ${ac_cv_path_XCODEBUILD+:} false; then :
14977  $as_echo_n "(cached) " >&6
14978else
14979  case $XCODEBUILD in
14980  [\\/]* | ?:[\\/]*)
14981  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14982  ;;
14983  *)
14984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14985for as_dir in $TOOLCHAIN_PATH
14986do
14987  IFS=$as_save_IFS
14988  test -z "$as_dir" && as_dir=.
14989    for ac_exec_ext in '' $ac_executable_extensions; do
14990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14991    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
14992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14993    break 2
14994  fi
14995done
14996  done
14997IFS=$as_save_IFS
14998
14999  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15000  ;;
15001esac
15002fi
15003XCODEBUILD=$ac_cv_path_XCODEBUILD
15004if test -n "$XCODEBUILD"; then
15005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15006$as_echo "$XCODEBUILD" >&6; }
15007else
15008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15009$as_echo "no" >&6; }
15010fi
15011
15012
15013    else
15014      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15015      # when only the command line tools are installed there are no SDKs, so headers
15016      # are copied into the system frameworks
15017      XCODEBUILD=
15018
15019    fi
15020
15021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15022$as_echo_n "checking for sdk name... " >&6; }
15023
15024# Check whether --with-sdk-name was given.
15025if test "${with_sdk_name+set}" = set; then :
15026  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15027
15028fi
15029
15030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15031$as_echo "$SDKNAME" >&6; }
15032
15033    # if toolchain path is specified then don't rely on system headers, they may not compile
15034    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15035    test -z "$TOOLCHAIN_PATH" && \
15036      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15037
15038    if test -z "$SYSROOT"; then
15039      if test -n "$XCODEBUILD"; then
15040        # if we don't have system headers, use default SDK name (last resort)
15041        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15042          SDKNAME=${SDKNAME:-macosx}
15043        fi
15044
15045        if test -n "$SDKNAME"; then
15046          # Call xcodebuild to determine SYSROOT
15047          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15048        fi
15049      else
15050        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15051          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
15052        fi
15053      fi
15054    else
15055      # warn user if --with-sdk-name was also set
15056      if test -n "$with_sdk_name"; then
15057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15058$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15059      fi
15060    fi
15061
15062    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15063      # If no system framework headers, then SYSROOT must be set, or we won't build
15064      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
15065    fi
15066
15067    # Perform a basic sanity test
15068    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15069      if test -z "$SYSROOT"; then
15070        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
15071      else
15072        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15073      fi
15074    fi
15075
15076    # set SDKROOT too, Xcode tools will pick it up
15077    SDKROOT=$SYSROOT
15078
15079  fi
15080
15081  # Prepend the extra path to the global path
15082
15083  if test "x$EXTRA_PATH" != x; then
15084    if test "x$PATH" = x; then
15085      PATH="$EXTRA_PATH"
15086    else
15087      PATH="$EXTRA_PATH:$PATH"
15088    fi
15089  fi
15090
15091
15092  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15093    # Add extra search paths on solaris for utilities like ar and as etc...
15094    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15095  fi
15096
15097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15098$as_echo_n "checking for sysroot... " >&6; }
15099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15100$as_echo "$SYSROOT" >&6; }
15101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15102$as_echo_n "checking for toolchain path... " >&6; }
15103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15104$as_echo "$TOOLCHAIN_PATH" >&6; }
15105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15106$as_echo_n "checking for extra path... " >&6; }
15107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15108$as_echo "$EXTRA_PATH" >&6; }
15109
15110
15111# To properly create a configuration name, we need to have the OpenJDK target
15112# and options (variants and debug level) parsed.
15113
15114
15115
15116# Check whether --with-conf-name was given.
15117if test "${with_conf_name+set}" = set; then :
15118  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15119fi
15120
15121
15122  # Test from where we are running configure, in or outside of src root.
15123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15124$as_echo_n "checking where to store configuration... " >&6; }
15125  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15126      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15127      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15128    # We are running configure from the src root.
15129    # Create a default ./build/target-variant-debuglevel output root.
15130    if test "x${CONF_NAME}" = x; then
15131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15132$as_echo "in default location" >&6; }
15133      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15134    else
15135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15136$as_echo "in build directory with custom name" >&6; }
15137    fi
15138    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15139    $MKDIR -p "$OUTPUT_ROOT"
15140    if test ! -d "$OUTPUT_ROOT"; then
15141      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15142    fi
15143  else
15144    # We are running configure from outside of the src dir.
15145    # Then use the current directory as output dir!
15146    # If configuration is situated in normal build directory, just use the build
15147    # directory name as configuration name, otherwise use the complete path.
15148    if test "x${CONF_NAME}" = x; then
15149      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15150    fi
15151    OUTPUT_ROOT="$CURDIR"
15152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15153$as_echo "in current directory" >&6; }
15154
15155    # WARNING: This might be a bad thing to do. You need to be sure you want to
15156    # have a configuration in this directory. Do some sanity checks!
15157
15158    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15159      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15160      # other files
15161      files_present=`$LS $OUTPUT_ROOT`
15162      # Configure has already touched config.log and confdefs.h in the current dir when this check
15163      # is performed.
15164      filtered_files=`$ECHO "$files_present" \
15165          | $SED -e 's/config.log//g' \
15166              -e 's/configure.log//g' \
15167              -e 's/confdefs.h//g' \
15168              -e 's/ //g' \
15169          | $TR -d '\n'`
15170      if test "x$filtered_files" != x; then
15171        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15172$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15173        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15174$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15175        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15176$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15177        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15178$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15179        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15180$as_echo "$as_me: seriously mess up just about everything." >&6;}
15181        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15182$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15183        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15184$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15185        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15186      fi
15187    fi
15188  fi
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15190$as_echo_n "checking what configuration name to use... " >&6; }
15191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15192$as_echo "$CONF_NAME" >&6; }
15193
15194
15195  # Only process if variable expands to non-empty
15196
15197  if test "x$OUTPUT_ROOT" != x; then
15198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15199
15200  # Input might be given as Windows format, start by converting to
15201  # unix format.
15202  path="$OUTPUT_ROOT"
15203  new_path=`$CYGPATH -u "$path"`
15204
15205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15208  # "foo.exe" is OK but "foo" is an error.
15209  #
15210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15211  # It is also a way to make sure we got the proper file name for the real test later on.
15212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15213  if test "x$test_shortpath" = x; then
15214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15215$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15216    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15217  fi
15218
15219  # Call helper function which possibly converts this using DOS-style short mode.
15220  # If so, the updated path is stored in $new_path.
15221
15222  input_path="$new_path"
15223  # Check if we need to convert this using DOS-style short mode. If the path
15224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15225  # take no chances and rewrite it.
15226  # Note: m4 eats our [], so we need to use [ and ] instead.
15227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15228  if test "x$has_forbidden_chars" != x; then
15229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15233      # Going to short mode and back again did indeed matter. Since short mode is
15234      # case insensitive, let's make it lowercase to improve readability.
15235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15236      # Now convert it back to Unix-style (cygpath)
15237      input_path=`$CYGPATH -u "$shortmode_path"`
15238      new_path="$input_path"
15239    fi
15240  fi
15241
15242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15243  if test "x$test_cygdrive_prefix" = x; then
15244    # As a simple fix, exclude /usr/bin since it's not a real path.
15245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15247      # a path prefixed by /cygdrive for fixpath to work.
15248      new_path="$CYGWIN_ROOT_PATH$input_path"
15249    fi
15250  fi
15251
15252
15253  if test "x$path" != "x$new_path"; then
15254    OUTPUT_ROOT="$new_path"
15255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15256$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15257  fi
15258
15259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15260
15261  path="$OUTPUT_ROOT"
15262  has_colon=`$ECHO $path | $GREP ^.:`
15263  new_path="$path"
15264  if test "x$has_colon" = x; then
15265    # Not in mixed or Windows style, start by that.
15266    new_path=`cmd //c echo $path`
15267  fi
15268
15269
15270  input_path="$new_path"
15271  # Check if we need to convert this using DOS-style short mode. If the path
15272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15273  # take no chances and rewrite it.
15274  # Note: m4 eats our [], so we need to use [ and ] instead.
15275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15276  if test "x$has_forbidden_chars" != x; then
15277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15279  fi
15280
15281
15282  windows_path="$new_path"
15283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15284    unix_path=`$CYGPATH -u "$windows_path"`
15285    new_path="$unix_path"
15286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15288    new_path="$unix_path"
15289  fi
15290
15291  if test "x$path" != "x$new_path"; then
15292    OUTPUT_ROOT="$new_path"
15293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15294$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15295  fi
15296
15297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15299
15300    else
15301      # We're on a unix platform. Hooray! :)
15302      path="$OUTPUT_ROOT"
15303      has_space=`$ECHO "$path" | $GREP " "`
15304      if test "x$has_space" != x; then
15305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15306$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15308      fi
15309
15310      # Use eval to expand a potential ~
15311      eval path="$path"
15312      if test ! -f "$path" && test ! -d "$path"; then
15313        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15314      fi
15315
15316      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15317    fi
15318  fi
15319
15320
15321  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15322  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15323
15324  SPEC=$OUTPUT_ROOT/spec.gmk
15325
15326  CONF_NAME=$CONF_NAME
15327
15328  OUTPUT_ROOT=$OUTPUT_ROOT
15329
15330
15331
15332  # The spec.gmk file contains all variables for the make system.
15333  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15334
15335  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15336  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15337
15338  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15339  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15340
15341  # The compare.sh is used to compare the build output to other builds.
15342  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15343
15344  # The generated Makefile knows where the spec.gmk is and where the source is.
15345  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15346  # which will look for generated configurations
15347  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15348
15349
15350
15351# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15352
15353  for ac_prog in apt-get yum port pkgutil pkgadd
15354do
15355  # Extract the first word of "$ac_prog", so it can be a program name with args.
15356set dummy $ac_prog; ac_word=$2
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15358$as_echo_n "checking for $ac_word... " >&6; }
15359if ${ac_cv_prog_PKGHANDLER+:} false; then :
15360  $as_echo_n "(cached) " >&6
15361else
15362  if test -n "$PKGHANDLER"; then
15363  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15364else
15365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15366for as_dir in $PATH
15367do
15368  IFS=$as_save_IFS
15369  test -z "$as_dir" && as_dir=.
15370    for ac_exec_ext in '' $ac_executable_extensions; do
15371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15372    ac_cv_prog_PKGHANDLER="$ac_prog"
15373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15374    break 2
15375  fi
15376done
15377  done
15378IFS=$as_save_IFS
15379
15380fi
15381fi
15382PKGHANDLER=$ac_cv_prog_PKGHANDLER
15383if test -n "$PKGHANDLER"; then
15384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15385$as_echo "$PKGHANDLER" >&6; }
15386else
15387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15388$as_echo "no" >&6; }
15389fi
15390
15391
15392  test -n "$PKGHANDLER" && break
15393done
15394
15395
15396
15397# Setup tools that requires more complex handling, or that is not needed by the configure script.
15398
15399
15400  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15401  if test "x$MAKE" != x; then
15402    # User has supplied a make, test it.
15403    if test ! -f "$MAKE"; then
15404      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15405    fi
15406
15407  MAKE_CANDIDATE=""$MAKE""
15408  DESCRIPTION="user supplied MAKE=$MAKE"
15409
15410  # On Cygwin, we require a newer version of make than on other platforms
15411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15412    MAKE_VERSION_EXPR="-e 4\."
15413    MAKE_REQUIRED_VERSION="4.0"
15414   else
15415    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15416    MAKE_REQUIRED_VERSION="3.81"
15417  fi
15418
15419  if test "x$MAKE_CANDIDATE" != x; then
15420    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15421$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15422    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15423    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15424    if test "x$IS_GNU_MAKE" = x; then
15425      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15426$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15427    else
15428      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15429      if test "x$IS_MODERN_MAKE" = x; then
15430        { $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
15431$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;}
15432      else
15433        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15434          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15435            MAKE_EXPECTED_ENV='cygwin'
15436          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15437            MAKE_EXPECTED_ENV='msys'
15438          else
15439            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15440          fi
15441          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15442          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15443        else
15444          # Not relevant for non-Windows
15445          IS_MAKE_CORRECT_ENV=true
15446        fi
15447        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15448          { $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
15449$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;}
15450        else
15451          FOUND_MAKE=$MAKE_CANDIDATE
15452
15453  # Only process if variable expands to non-empty
15454
15455  if test "x$FOUND_MAKE" != x; then
15456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15457
15458  # First separate the path from the arguments. This will split at the first
15459  # space.
15460  complete="$FOUND_MAKE"
15461  path="${complete%% *}"
15462  tmp="$complete EOL"
15463  arguments="${tmp#* }"
15464
15465  # Input might be given as Windows format, start by converting to
15466  # unix format.
15467  new_path=`$CYGPATH -u "$path"`
15468
15469  # Now try to locate executable using which
15470  new_path=`$WHICH "$new_path" 2> /dev/null`
15471  # bat and cmd files are not always considered executable in cygwin causing which
15472  # to not find them
15473  if test "x$new_path" = x \
15474      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15475      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15476    new_path=`$CYGPATH -u "$path"`
15477  fi
15478  if test "x$new_path" = x; then
15479    # Oops. Which didn't find the executable.
15480    # The splitting of arguments from the executable at a space might have been incorrect,
15481    # since paths with space are more likely in Windows. Give it another try with the whole
15482    # argument.
15483    path="$complete"
15484    arguments="EOL"
15485    new_path=`$CYGPATH -u "$path"`
15486    new_path=`$WHICH "$new_path" 2> /dev/null`
15487    # bat and cmd files are not always considered executable in cygwin causing which
15488    # to not find them
15489    if test "x$new_path" = x \
15490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15492      new_path=`$CYGPATH -u "$path"`
15493    fi
15494    if test "x$new_path" = x; then
15495      # It's still not found. Now this is an unrecoverable error.
15496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15497$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15498      has_space=`$ECHO "$complete" | $GREP " "`
15499      if test "x$has_space" != x; then
15500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15502      fi
15503      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15504    fi
15505  fi
15506
15507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15510  # "foo.exe" is OK but "foo" is an error.
15511  #
15512  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15513  # It is also a way to make sure we got the proper file name for the real test later on.
15514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15515  if test "x$test_shortpath" = x; then
15516    # Short path failed, file does not exist as specified.
15517    # Try adding .exe or .cmd
15518    if test -f "${new_path}.exe"; then
15519      input_to_shortpath="${new_path}.exe"
15520    elif test -f "${new_path}.cmd"; then
15521      input_to_shortpath="${new_path}.cmd"
15522    else
15523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15524$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15525      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15526$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15527      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15528    fi
15529  else
15530    input_to_shortpath="$new_path"
15531  fi
15532
15533  # Call helper function which possibly converts this using DOS-style short mode.
15534  # If so, the updated path is stored in $new_path.
15535  new_path="$input_to_shortpath"
15536
15537  input_path="$input_to_shortpath"
15538  # Check if we need to convert this using DOS-style short mode. If the path
15539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15540  # take no chances and rewrite it.
15541  # Note: m4 eats our [], so we need to use [ and ] instead.
15542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15543  if test "x$has_forbidden_chars" != x; then
15544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15548      # Going to short mode and back again did indeed matter. Since short mode is
15549      # case insensitive, let's make it lowercase to improve readability.
15550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15551      # Now convert it back to Unix-style (cygpath)
15552      input_path=`$CYGPATH -u "$shortmode_path"`
15553      new_path="$input_path"
15554    fi
15555  fi
15556
15557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15558  if test "x$test_cygdrive_prefix" = x; then
15559    # As a simple fix, exclude /usr/bin since it's not a real path.
15560    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15562      # a path prefixed by /cygdrive for fixpath to work.
15563      new_path="$CYGWIN_ROOT_PATH$input_path"
15564    fi
15565  fi
15566
15567  # remove trailing .exe if any
15568  new_path="${new_path/%.exe/}"
15569
15570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15571
15572  # First separate the path from the arguments. This will split at the first
15573  # space.
15574  complete="$FOUND_MAKE"
15575  path="${complete%% *}"
15576  tmp="$complete EOL"
15577  arguments="${tmp#* }"
15578
15579  # Input might be given as Windows format, start by converting to
15580  # unix format.
15581  new_path="$path"
15582
15583  windows_path="$new_path"
15584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15585    unix_path=`$CYGPATH -u "$windows_path"`
15586    new_path="$unix_path"
15587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15589    new_path="$unix_path"
15590  fi
15591
15592
15593  # Now try to locate executable using which
15594  new_path=`$WHICH "$new_path" 2> /dev/null`
15595
15596  if test "x$new_path" = x; then
15597    # Oops. Which didn't find the executable.
15598    # The splitting of arguments from the executable at a space might have been incorrect,
15599    # since paths with space are more likely in Windows. Give it another try with the whole
15600    # argument.
15601    path="$complete"
15602    arguments="EOL"
15603    new_path="$path"
15604
15605  windows_path="$new_path"
15606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15607    unix_path=`$CYGPATH -u "$windows_path"`
15608    new_path="$unix_path"
15609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15611    new_path="$unix_path"
15612  fi
15613
15614
15615    new_path=`$WHICH "$new_path" 2> /dev/null`
15616    # bat and cmd files are not always considered executable in MSYS causing which
15617    # to not find them
15618    if test "x$new_path" = x \
15619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15621      new_path="$path"
15622
15623  windows_path="$new_path"
15624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15625    unix_path=`$CYGPATH -u "$windows_path"`
15626    new_path="$unix_path"
15627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15629    new_path="$unix_path"
15630  fi
15631
15632    fi
15633
15634    if test "x$new_path" = x; then
15635      # It's still not found. Now this is an unrecoverable error.
15636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15637$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15638      has_space=`$ECHO "$complete" | $GREP " "`
15639      if test "x$has_space" != x; then
15640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15642      fi
15643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15644    fi
15645  fi
15646
15647  # Now new_path has a complete unix path to the binary
15648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15649    # Keep paths in /bin as-is, but remove trailing .exe if any
15650    new_path="${new_path/%.exe/}"
15651    # Do not save /bin paths to all_fixpath_prefixes!
15652  else
15653    # Not in mixed or Windows style, start by that.
15654    new_path=`cmd //c echo $new_path`
15655
15656  input_path="$new_path"
15657  # Check if we need to convert this using DOS-style short mode. If the path
15658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15659  # take no chances and rewrite it.
15660  # Note: m4 eats our [], so we need to use [ and ] instead.
15661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15662  if test "x$has_forbidden_chars" != x; then
15663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15665  fi
15666
15667    # Output is in $new_path
15668
15669  windows_path="$new_path"
15670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15671    unix_path=`$CYGPATH -u "$windows_path"`
15672    new_path="$unix_path"
15673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15675    new_path="$unix_path"
15676  fi
15677
15678    # remove trailing .exe if any
15679    new_path="${new_path/%.exe/}"
15680
15681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15683  fi
15684
15685    else
15686      # We're on a unix platform. Hooray! :)
15687      # First separate the path from the arguments. This will split at the first
15688      # space.
15689      complete="$FOUND_MAKE"
15690      path="${complete%% *}"
15691      tmp="$complete EOL"
15692      arguments="${tmp#* }"
15693
15694      # Cannot rely on the command "which" here since it doesn't always work.
15695      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15696      if test -z "$is_absolute_path"; then
15697        # Path to executable is not absolute. Find it.
15698        IFS_save="$IFS"
15699        IFS=:
15700        for p in $PATH; do
15701          if test -f "$p/$path" && test -x "$p/$path"; then
15702            new_path="$p/$path"
15703            break
15704          fi
15705        done
15706        IFS="$IFS_save"
15707      else
15708        # This is an absolute path, we can use it without further modifications.
15709        new_path="$path"
15710      fi
15711
15712      if test "x$new_path" = x; then
15713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15714$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15715        has_space=`$ECHO "$complete" | $GREP " "`
15716        if test "x$has_space" != x; then
15717          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15718$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15719        fi
15720        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15721      fi
15722    fi
15723
15724    # Now join together the path and the arguments once again
15725    if test "x$arguments" != xEOL; then
15726      new_complete="$new_path ${arguments% *}"
15727    else
15728      new_complete="$new_path"
15729    fi
15730
15731    if test "x$complete" != "x$new_complete"; then
15732      FOUND_MAKE="$new_complete"
15733      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15734$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15735    fi
15736  fi
15737
15738        fi
15739      fi
15740    fi
15741  fi
15742
15743    if test "x$FOUND_MAKE" = x; then
15744      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15745    fi
15746  else
15747    # Try our hardest to locate a correct version of GNU make
15748    for ac_prog in gmake
15749do
15750  # Extract the first word of "$ac_prog", so it can be a program name with args.
15751set dummy $ac_prog; ac_word=$2
15752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15753$as_echo_n "checking for $ac_word... " >&6; }
15754if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15755  $as_echo_n "(cached) " >&6
15756else
15757  case $CHECK_GMAKE in
15758  [\\/]* | ?:[\\/]*)
15759  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15760  ;;
15761  *)
15762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15763for as_dir in $PATH
15764do
15765  IFS=$as_save_IFS
15766  test -z "$as_dir" && as_dir=.
15767    for ac_exec_ext in '' $ac_executable_extensions; do
15768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15769    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15771    break 2
15772  fi
15773done
15774  done
15775IFS=$as_save_IFS
15776
15777  ;;
15778esac
15779fi
15780CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15781if test -n "$CHECK_GMAKE"; then
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15783$as_echo "$CHECK_GMAKE" >&6; }
15784else
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15786$as_echo "no" >&6; }
15787fi
15788
15789
15790  test -n "$CHECK_GMAKE" && break
15791done
15792
15793
15794  MAKE_CANDIDATE=""$CHECK_GMAKE""
15795  DESCRIPTION="gmake in PATH"
15796
15797  # On Cygwin, we require a newer version of make than on other platforms
15798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15799    MAKE_VERSION_EXPR="-e 4\."
15800    MAKE_REQUIRED_VERSION="4.0"
15801   else
15802    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15803    MAKE_REQUIRED_VERSION="3.81"
15804  fi
15805
15806  if test "x$MAKE_CANDIDATE" != x; then
15807    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15808$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15809    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15810    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15811    if test "x$IS_GNU_MAKE" = x; then
15812      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15813$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15814    else
15815      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15816      if test "x$IS_MODERN_MAKE" = x; then
15817        { $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
15818$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;}
15819      else
15820        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15821          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15822            MAKE_EXPECTED_ENV='cygwin'
15823          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15824            MAKE_EXPECTED_ENV='msys'
15825          else
15826            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15827          fi
15828          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15829          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15830        else
15831          # Not relevant for non-Windows
15832          IS_MAKE_CORRECT_ENV=true
15833        fi
15834        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15835          { $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
15836$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;}
15837        else
15838          FOUND_MAKE=$MAKE_CANDIDATE
15839
15840  # Only process if variable expands to non-empty
15841
15842  if test "x$FOUND_MAKE" != x; then
15843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15844
15845  # First separate the path from the arguments. This will split at the first
15846  # space.
15847  complete="$FOUND_MAKE"
15848  path="${complete%% *}"
15849  tmp="$complete EOL"
15850  arguments="${tmp#* }"
15851
15852  # Input might be given as Windows format, start by converting to
15853  # unix format.
15854  new_path=`$CYGPATH -u "$path"`
15855
15856  # Now try to locate executable using which
15857  new_path=`$WHICH "$new_path" 2> /dev/null`
15858  # bat and cmd files are not always considered executable in cygwin causing which
15859  # to not find them
15860  if test "x$new_path" = x \
15861      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15862      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15863    new_path=`$CYGPATH -u "$path"`
15864  fi
15865  if test "x$new_path" = x; then
15866    # Oops. Which didn't find the executable.
15867    # The splitting of arguments from the executable at a space might have been incorrect,
15868    # since paths with space are more likely in Windows. Give it another try with the whole
15869    # argument.
15870    path="$complete"
15871    arguments="EOL"
15872    new_path=`$CYGPATH -u "$path"`
15873    new_path=`$WHICH "$new_path" 2> /dev/null`
15874    # bat and cmd files are not always considered executable in cygwin causing which
15875    # to not find them
15876    if test "x$new_path" = x \
15877        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15878        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15879      new_path=`$CYGPATH -u "$path"`
15880    fi
15881    if test "x$new_path" = x; then
15882      # It's still not found. Now this is an unrecoverable error.
15883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15885      has_space=`$ECHO "$complete" | $GREP " "`
15886      if test "x$has_space" != x; then
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15889      fi
15890      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15891    fi
15892  fi
15893
15894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15897  # "foo.exe" is OK but "foo" is an error.
15898  #
15899  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15900  # It is also a way to make sure we got the proper file name for the real test later on.
15901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15902  if test "x$test_shortpath" = x; then
15903    # Short path failed, file does not exist as specified.
15904    # Try adding .exe or .cmd
15905    if test -f "${new_path}.exe"; then
15906      input_to_shortpath="${new_path}.exe"
15907    elif test -f "${new_path}.cmd"; then
15908      input_to_shortpath="${new_path}.cmd"
15909    else
15910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15912      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15913$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15914      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15915    fi
15916  else
15917    input_to_shortpath="$new_path"
15918  fi
15919
15920  # Call helper function which possibly converts this using DOS-style short mode.
15921  # If so, the updated path is stored in $new_path.
15922  new_path="$input_to_shortpath"
15923
15924  input_path="$input_to_shortpath"
15925  # Check if we need to convert this using DOS-style short mode. If the path
15926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15927  # take no chances and rewrite it.
15928  # Note: m4 eats our [], so we need to use [ and ] instead.
15929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15930  if test "x$has_forbidden_chars" != x; then
15931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15935      # Going to short mode and back again did indeed matter. Since short mode is
15936      # case insensitive, let's make it lowercase to improve readability.
15937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15938      # Now convert it back to Unix-style (cygpath)
15939      input_path=`$CYGPATH -u "$shortmode_path"`
15940      new_path="$input_path"
15941    fi
15942  fi
15943
15944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15945  if test "x$test_cygdrive_prefix" = x; then
15946    # As a simple fix, exclude /usr/bin since it's not a real path.
15947    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15949      # a path prefixed by /cygdrive for fixpath to work.
15950      new_path="$CYGWIN_ROOT_PATH$input_path"
15951    fi
15952  fi
15953
15954  # remove trailing .exe if any
15955  new_path="${new_path/%.exe/}"
15956
15957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15958
15959  # First separate the path from the arguments. This will split at the first
15960  # space.
15961  complete="$FOUND_MAKE"
15962  path="${complete%% *}"
15963  tmp="$complete EOL"
15964  arguments="${tmp#* }"
15965
15966  # Input might be given as Windows format, start by converting to
15967  # unix format.
15968  new_path="$path"
15969
15970  windows_path="$new_path"
15971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15972    unix_path=`$CYGPATH -u "$windows_path"`
15973    new_path="$unix_path"
15974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15976    new_path="$unix_path"
15977  fi
15978
15979
15980  # Now try to locate executable using which
15981  new_path=`$WHICH "$new_path" 2> /dev/null`
15982
15983  if test "x$new_path" = x; then
15984    # Oops. Which didn't find the executable.
15985    # The splitting of arguments from the executable at a space might have been incorrect,
15986    # since paths with space are more likely in Windows. Give it another try with the whole
15987    # argument.
15988    path="$complete"
15989    arguments="EOL"
15990    new_path="$path"
15991
15992  windows_path="$new_path"
15993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15994    unix_path=`$CYGPATH -u "$windows_path"`
15995    new_path="$unix_path"
15996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15998    new_path="$unix_path"
15999  fi
16000
16001
16002    new_path=`$WHICH "$new_path" 2> /dev/null`
16003    # bat and cmd files are not always considered executable in MSYS causing which
16004    # to not find them
16005    if test "x$new_path" = x \
16006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16008      new_path="$path"
16009
16010  windows_path="$new_path"
16011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16012    unix_path=`$CYGPATH -u "$windows_path"`
16013    new_path="$unix_path"
16014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16016    new_path="$unix_path"
16017  fi
16018
16019    fi
16020
16021    if test "x$new_path" = x; then
16022      # It's still not found. Now this is an unrecoverable error.
16023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16024$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16025      has_space=`$ECHO "$complete" | $GREP " "`
16026      if test "x$has_space" != x; then
16027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16029      fi
16030      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16031    fi
16032  fi
16033
16034  # Now new_path has a complete unix path to the binary
16035  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16036    # Keep paths in /bin as-is, but remove trailing .exe if any
16037    new_path="${new_path/%.exe/}"
16038    # Do not save /bin paths to all_fixpath_prefixes!
16039  else
16040    # Not in mixed or Windows style, start by that.
16041    new_path=`cmd //c echo $new_path`
16042
16043  input_path="$new_path"
16044  # Check if we need to convert this using DOS-style short mode. If the path
16045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16046  # take no chances and rewrite it.
16047  # Note: m4 eats our [], so we need to use [ and ] instead.
16048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16049  if test "x$has_forbidden_chars" != x; then
16050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16052  fi
16053
16054    # Output is in $new_path
16055
16056  windows_path="$new_path"
16057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16058    unix_path=`$CYGPATH -u "$windows_path"`
16059    new_path="$unix_path"
16060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16062    new_path="$unix_path"
16063  fi
16064
16065    # remove trailing .exe if any
16066    new_path="${new_path/%.exe/}"
16067
16068    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16069    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16070  fi
16071
16072    else
16073      # We're on a unix platform. Hooray! :)
16074      # First separate the path from the arguments. This will split at the first
16075      # space.
16076      complete="$FOUND_MAKE"
16077      path="${complete%% *}"
16078      tmp="$complete EOL"
16079      arguments="${tmp#* }"
16080
16081      # Cannot rely on the command "which" here since it doesn't always work.
16082      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16083      if test -z "$is_absolute_path"; then
16084        # Path to executable is not absolute. Find it.
16085        IFS_save="$IFS"
16086        IFS=:
16087        for p in $PATH; do
16088          if test -f "$p/$path" && test -x "$p/$path"; then
16089            new_path="$p/$path"
16090            break
16091          fi
16092        done
16093        IFS="$IFS_save"
16094      else
16095        # This is an absolute path, we can use it without further modifications.
16096        new_path="$path"
16097      fi
16098
16099      if test "x$new_path" = x; then
16100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16101$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16102        has_space=`$ECHO "$complete" | $GREP " "`
16103        if test "x$has_space" != x; then
16104          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16105$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16106        fi
16107        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16108      fi
16109    fi
16110
16111    # Now join together the path and the arguments once again
16112    if test "x$arguments" != xEOL; then
16113      new_complete="$new_path ${arguments% *}"
16114    else
16115      new_complete="$new_path"
16116    fi
16117
16118    if test "x$complete" != "x$new_complete"; then
16119      FOUND_MAKE="$new_complete"
16120      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16121$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16122    fi
16123  fi
16124
16125        fi
16126      fi
16127    fi
16128  fi
16129
16130
16131    if test "x$FOUND_MAKE" = x; then
16132      for ac_prog in make
16133do
16134  # Extract the first word of "$ac_prog", so it can be a program name with args.
16135set dummy $ac_prog; ac_word=$2
16136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16137$as_echo_n "checking for $ac_word... " >&6; }
16138if ${ac_cv_path_CHECK_MAKE+:} false; then :
16139  $as_echo_n "(cached) " >&6
16140else
16141  case $CHECK_MAKE in
16142  [\\/]* | ?:[\\/]*)
16143  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16144  ;;
16145  *)
16146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16147for as_dir in $PATH
16148do
16149  IFS=$as_save_IFS
16150  test -z "$as_dir" && as_dir=.
16151    for ac_exec_ext in '' $ac_executable_extensions; do
16152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16153    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16155    break 2
16156  fi
16157done
16158  done
16159IFS=$as_save_IFS
16160
16161  ;;
16162esac
16163fi
16164CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16165if test -n "$CHECK_MAKE"; then
16166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16167$as_echo "$CHECK_MAKE" >&6; }
16168else
16169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16170$as_echo "no" >&6; }
16171fi
16172
16173
16174  test -n "$CHECK_MAKE" && break
16175done
16176
16177
16178  MAKE_CANDIDATE=""$CHECK_MAKE""
16179  DESCRIPTION="make in PATH"
16180
16181  # On Cygwin, we require a newer version of make than on other platforms
16182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16183    MAKE_VERSION_EXPR="-e 4\."
16184    MAKE_REQUIRED_VERSION="4.0"
16185   else
16186    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16187    MAKE_REQUIRED_VERSION="3.81"
16188  fi
16189
16190  if test "x$MAKE_CANDIDATE" != x; then
16191    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16192$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16193    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16194    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16195    if test "x$IS_GNU_MAKE" = x; then
16196      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16197$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16198    else
16199      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16200      if test "x$IS_MODERN_MAKE" = x; then
16201        { $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
16202$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;}
16203      else
16204        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16205          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206            MAKE_EXPECTED_ENV='cygwin'
16207          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16208            MAKE_EXPECTED_ENV='msys'
16209          else
16210            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16211          fi
16212          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16213          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16214        else
16215          # Not relevant for non-Windows
16216          IS_MAKE_CORRECT_ENV=true
16217        fi
16218        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16219          { $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
16220$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;}
16221        else
16222          FOUND_MAKE=$MAKE_CANDIDATE
16223
16224  # Only process if variable expands to non-empty
16225
16226  if test "x$FOUND_MAKE" != x; then
16227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16228
16229  # First separate the path from the arguments. This will split at the first
16230  # space.
16231  complete="$FOUND_MAKE"
16232  path="${complete%% *}"
16233  tmp="$complete EOL"
16234  arguments="${tmp#* }"
16235
16236  # Input might be given as Windows format, start by converting to
16237  # unix format.
16238  new_path=`$CYGPATH -u "$path"`
16239
16240  # Now try to locate executable using which
16241  new_path=`$WHICH "$new_path" 2> /dev/null`
16242  # bat and cmd files are not always considered executable in cygwin causing which
16243  # to not find them
16244  if test "x$new_path" = x \
16245      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16246      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16247    new_path=`$CYGPATH -u "$path"`
16248  fi
16249  if test "x$new_path" = x; then
16250    # Oops. Which didn't find the executable.
16251    # The splitting of arguments from the executable at a space might have been incorrect,
16252    # since paths with space are more likely in Windows. Give it another try with the whole
16253    # argument.
16254    path="$complete"
16255    arguments="EOL"
16256    new_path=`$CYGPATH -u "$path"`
16257    new_path=`$WHICH "$new_path" 2> /dev/null`
16258    # bat and cmd files are not always considered executable in cygwin causing which
16259    # to not find them
16260    if test "x$new_path" = x \
16261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16263      new_path=`$CYGPATH -u "$path"`
16264    fi
16265    if test "x$new_path" = x; then
16266      # It's still not found. Now this is an unrecoverable error.
16267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16269      has_space=`$ECHO "$complete" | $GREP " "`
16270      if test "x$has_space" != x; then
16271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16273      fi
16274      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16275    fi
16276  fi
16277
16278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16281  # "foo.exe" is OK but "foo" is an error.
16282  #
16283  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16284  # It is also a way to make sure we got the proper file name for the real test later on.
16285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16286  if test "x$test_shortpath" = x; then
16287    # Short path failed, file does not exist as specified.
16288    # Try adding .exe or .cmd
16289    if test -f "${new_path}.exe"; then
16290      input_to_shortpath="${new_path}.exe"
16291    elif test -f "${new_path}.cmd"; then
16292      input_to_shortpath="${new_path}.cmd"
16293    else
16294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16299    fi
16300  else
16301    input_to_shortpath="$new_path"
16302  fi
16303
16304  # Call helper function which possibly converts this using DOS-style short mode.
16305  # If so, the updated path is stored in $new_path.
16306  new_path="$input_to_shortpath"
16307
16308  input_path="$input_to_shortpath"
16309  # Check if we need to convert this using DOS-style short mode. If the path
16310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16311  # take no chances and rewrite it.
16312  # Note: m4 eats our [], so we need to use [ and ] instead.
16313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16314  if test "x$has_forbidden_chars" != x; then
16315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16319      # Going to short mode and back again did indeed matter. Since short mode is
16320      # case insensitive, let's make it lowercase to improve readability.
16321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16322      # Now convert it back to Unix-style (cygpath)
16323      input_path=`$CYGPATH -u "$shortmode_path"`
16324      new_path="$input_path"
16325    fi
16326  fi
16327
16328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16329  if test "x$test_cygdrive_prefix" = x; then
16330    # As a simple fix, exclude /usr/bin since it's not a real path.
16331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16333      # a path prefixed by /cygdrive for fixpath to work.
16334      new_path="$CYGWIN_ROOT_PATH$input_path"
16335    fi
16336  fi
16337
16338  # remove trailing .exe if any
16339  new_path="${new_path/%.exe/}"
16340
16341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16342
16343  # First separate the path from the arguments. This will split at the first
16344  # space.
16345  complete="$FOUND_MAKE"
16346  path="${complete%% *}"
16347  tmp="$complete EOL"
16348  arguments="${tmp#* }"
16349
16350  # Input might be given as Windows format, start by converting to
16351  # unix format.
16352  new_path="$path"
16353
16354  windows_path="$new_path"
16355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16356    unix_path=`$CYGPATH -u "$windows_path"`
16357    new_path="$unix_path"
16358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16360    new_path="$unix_path"
16361  fi
16362
16363
16364  # Now try to locate executable using which
16365  new_path=`$WHICH "$new_path" 2> /dev/null`
16366
16367  if test "x$new_path" = x; then
16368    # Oops. Which didn't find the executable.
16369    # The splitting of arguments from the executable at a space might have been incorrect,
16370    # since paths with space are more likely in Windows. Give it another try with the whole
16371    # argument.
16372    path="$complete"
16373    arguments="EOL"
16374    new_path="$path"
16375
16376  windows_path="$new_path"
16377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16378    unix_path=`$CYGPATH -u "$windows_path"`
16379    new_path="$unix_path"
16380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16382    new_path="$unix_path"
16383  fi
16384
16385
16386    new_path=`$WHICH "$new_path" 2> /dev/null`
16387    # bat and cmd files are not always considered executable in MSYS causing which
16388    # to not find them
16389    if test "x$new_path" = x \
16390        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16391        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16392      new_path="$path"
16393
16394  windows_path="$new_path"
16395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396    unix_path=`$CYGPATH -u "$windows_path"`
16397    new_path="$unix_path"
16398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16400    new_path="$unix_path"
16401  fi
16402
16403    fi
16404
16405    if test "x$new_path" = x; then
16406      # It's still not found. Now this is an unrecoverable error.
16407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16408$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16409      has_space=`$ECHO "$complete" | $GREP " "`
16410      if test "x$has_space" != x; then
16411        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16412$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16413      fi
16414      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16415    fi
16416  fi
16417
16418  # Now new_path has a complete unix path to the binary
16419  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16420    # Keep paths in /bin as-is, but remove trailing .exe if any
16421    new_path="${new_path/%.exe/}"
16422    # Do not save /bin paths to all_fixpath_prefixes!
16423  else
16424    # Not in mixed or Windows style, start by that.
16425    new_path=`cmd //c echo $new_path`
16426
16427  input_path="$new_path"
16428  # Check if we need to convert this using DOS-style short mode. If the path
16429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16430  # take no chances and rewrite it.
16431  # Note: m4 eats our [], so we need to use [ and ] instead.
16432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16433  if test "x$has_forbidden_chars" != x; then
16434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16436  fi
16437
16438    # Output is in $new_path
16439
16440  windows_path="$new_path"
16441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16442    unix_path=`$CYGPATH -u "$windows_path"`
16443    new_path="$unix_path"
16444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16446    new_path="$unix_path"
16447  fi
16448
16449    # remove trailing .exe if any
16450    new_path="${new_path/%.exe/}"
16451
16452    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16453    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16454  fi
16455
16456    else
16457      # We're on a unix platform. Hooray! :)
16458      # First separate the path from the arguments. This will split at the first
16459      # space.
16460      complete="$FOUND_MAKE"
16461      path="${complete%% *}"
16462      tmp="$complete EOL"
16463      arguments="${tmp#* }"
16464
16465      # Cannot rely on the command "which" here since it doesn't always work.
16466      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16467      if test -z "$is_absolute_path"; then
16468        # Path to executable is not absolute. Find it.
16469        IFS_save="$IFS"
16470        IFS=:
16471        for p in $PATH; do
16472          if test -f "$p/$path" && test -x "$p/$path"; then
16473            new_path="$p/$path"
16474            break
16475          fi
16476        done
16477        IFS="$IFS_save"
16478      else
16479        # This is an absolute path, we can use it without further modifications.
16480        new_path="$path"
16481      fi
16482
16483      if test "x$new_path" = x; then
16484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16485$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16486        has_space=`$ECHO "$complete" | $GREP " "`
16487        if test "x$has_space" != x; then
16488          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16489$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16490        fi
16491        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16492      fi
16493    fi
16494
16495    # Now join together the path and the arguments once again
16496    if test "x$arguments" != xEOL; then
16497      new_complete="$new_path ${arguments% *}"
16498    else
16499      new_complete="$new_path"
16500    fi
16501
16502    if test "x$complete" != "x$new_complete"; then
16503      FOUND_MAKE="$new_complete"
16504      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16505$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16506    fi
16507  fi
16508
16509        fi
16510      fi
16511    fi
16512  fi
16513
16514    fi
16515
16516    if test "x$FOUND_MAKE" = x; then
16517      if test "x$TOOLCHAIN_PATH" != x; then
16518        # We have a toolchain path, check that as well before giving up.
16519        OLD_PATH=$PATH
16520        PATH=$TOOLCHAIN_PATH:$PATH
16521        for ac_prog in gmake
16522do
16523  # Extract the first word of "$ac_prog", so it can be a program name with args.
16524set dummy $ac_prog; ac_word=$2
16525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16526$as_echo_n "checking for $ac_word... " >&6; }
16527if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16528  $as_echo_n "(cached) " >&6
16529else
16530  case $CHECK_TOOLSDIR_GMAKE in
16531  [\\/]* | ?:[\\/]*)
16532  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16533  ;;
16534  *)
16535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16536for as_dir in $PATH
16537do
16538  IFS=$as_save_IFS
16539  test -z "$as_dir" && as_dir=.
16540    for ac_exec_ext in '' $ac_executable_extensions; do
16541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16542    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16544    break 2
16545  fi
16546done
16547  done
16548IFS=$as_save_IFS
16549
16550  ;;
16551esac
16552fi
16553CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16554if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16556$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16557else
16558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16559$as_echo "no" >&6; }
16560fi
16561
16562
16563  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16564done
16565
16566
16567  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16568  DESCRIPTION="gmake in tools-dir"
16569
16570  # On Cygwin, we require a newer version of make than on other platforms
16571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16572    MAKE_VERSION_EXPR="-e 4\."
16573    MAKE_REQUIRED_VERSION="4.0"
16574   else
16575    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16576    MAKE_REQUIRED_VERSION="3.81"
16577  fi
16578
16579  if test "x$MAKE_CANDIDATE" != x; then
16580    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16581$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16582    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16583    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16584    if test "x$IS_GNU_MAKE" = x; then
16585      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16586$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16587    else
16588      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16589      if test "x$IS_MODERN_MAKE" = x; then
16590        { $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
16591$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;}
16592      else
16593        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16594          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16595            MAKE_EXPECTED_ENV='cygwin'
16596          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16597            MAKE_EXPECTED_ENV='msys'
16598          else
16599            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16600          fi
16601          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16602          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16603        else
16604          # Not relevant for non-Windows
16605          IS_MAKE_CORRECT_ENV=true
16606        fi
16607        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16608          { $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
16609$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;}
16610        else
16611          FOUND_MAKE=$MAKE_CANDIDATE
16612
16613  # Only process if variable expands to non-empty
16614
16615  if test "x$FOUND_MAKE" != x; then
16616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16617
16618  # First separate the path from the arguments. This will split at the first
16619  # space.
16620  complete="$FOUND_MAKE"
16621  path="${complete%% *}"
16622  tmp="$complete EOL"
16623  arguments="${tmp#* }"
16624
16625  # Input might be given as Windows format, start by converting to
16626  # unix format.
16627  new_path=`$CYGPATH -u "$path"`
16628
16629  # Now try to locate executable using which
16630  new_path=`$WHICH "$new_path" 2> /dev/null`
16631  # bat and cmd files are not always considered executable in cygwin causing which
16632  # to not find them
16633  if test "x$new_path" = x \
16634      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16635      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16636    new_path=`$CYGPATH -u "$path"`
16637  fi
16638  if test "x$new_path" = x; then
16639    # Oops. Which didn't find the executable.
16640    # The splitting of arguments from the executable at a space might have been incorrect,
16641    # since paths with space are more likely in Windows. Give it another try with the whole
16642    # argument.
16643    path="$complete"
16644    arguments="EOL"
16645    new_path=`$CYGPATH -u "$path"`
16646    new_path=`$WHICH "$new_path" 2> /dev/null`
16647    # bat and cmd files are not always considered executable in cygwin causing which
16648    # to not find them
16649    if test "x$new_path" = x \
16650        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16651        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16652      new_path=`$CYGPATH -u "$path"`
16653    fi
16654    if test "x$new_path" = x; then
16655      # It's still not found. Now this is an unrecoverable error.
16656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16658      has_space=`$ECHO "$complete" | $GREP " "`
16659      if test "x$has_space" != x; then
16660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16662      fi
16663      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16664    fi
16665  fi
16666
16667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16670  # "foo.exe" is OK but "foo" is an error.
16671  #
16672  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16673  # It is also a way to make sure we got the proper file name for the real test later on.
16674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16675  if test "x$test_shortpath" = x; then
16676    # Short path failed, file does not exist as specified.
16677    # Try adding .exe or .cmd
16678    if test -f "${new_path}.exe"; then
16679      input_to_shortpath="${new_path}.exe"
16680    elif test -f "${new_path}.cmd"; then
16681      input_to_shortpath="${new_path}.cmd"
16682    else
16683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16685      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16686$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16687      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16688    fi
16689  else
16690    input_to_shortpath="$new_path"
16691  fi
16692
16693  # Call helper function which possibly converts this using DOS-style short mode.
16694  # If so, the updated path is stored in $new_path.
16695  new_path="$input_to_shortpath"
16696
16697  input_path="$input_to_shortpath"
16698  # Check if we need to convert this using DOS-style short mode. If the path
16699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16700  # take no chances and rewrite it.
16701  # Note: m4 eats our [], so we need to use [ and ] instead.
16702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16703  if test "x$has_forbidden_chars" != x; then
16704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16708      # Going to short mode and back again did indeed matter. Since short mode is
16709      # case insensitive, let's make it lowercase to improve readability.
16710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16711      # Now convert it back to Unix-style (cygpath)
16712      input_path=`$CYGPATH -u "$shortmode_path"`
16713      new_path="$input_path"
16714    fi
16715  fi
16716
16717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16718  if test "x$test_cygdrive_prefix" = x; then
16719    # As a simple fix, exclude /usr/bin since it's not a real path.
16720    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16722      # a path prefixed by /cygdrive for fixpath to work.
16723      new_path="$CYGWIN_ROOT_PATH$input_path"
16724    fi
16725  fi
16726
16727  # remove trailing .exe if any
16728  new_path="${new_path/%.exe/}"
16729
16730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16731
16732  # First separate the path from the arguments. This will split at the first
16733  # space.
16734  complete="$FOUND_MAKE"
16735  path="${complete%% *}"
16736  tmp="$complete EOL"
16737  arguments="${tmp#* }"
16738
16739  # Input might be given as Windows format, start by converting to
16740  # unix format.
16741  new_path="$path"
16742
16743  windows_path="$new_path"
16744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16745    unix_path=`$CYGPATH -u "$windows_path"`
16746    new_path="$unix_path"
16747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16749    new_path="$unix_path"
16750  fi
16751
16752
16753  # Now try to locate executable using which
16754  new_path=`$WHICH "$new_path" 2> /dev/null`
16755
16756  if test "x$new_path" = x; then
16757    # Oops. Which didn't find the executable.
16758    # The splitting of arguments from the executable at a space might have been incorrect,
16759    # since paths with space are more likely in Windows. Give it another try with the whole
16760    # argument.
16761    path="$complete"
16762    arguments="EOL"
16763    new_path="$path"
16764
16765  windows_path="$new_path"
16766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16767    unix_path=`$CYGPATH -u "$windows_path"`
16768    new_path="$unix_path"
16769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16771    new_path="$unix_path"
16772  fi
16773
16774
16775    new_path=`$WHICH "$new_path" 2> /dev/null`
16776    # bat and cmd files are not always considered executable in MSYS causing which
16777    # to not find them
16778    if test "x$new_path" = x \
16779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16781      new_path="$path"
16782
16783  windows_path="$new_path"
16784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16785    unix_path=`$CYGPATH -u "$windows_path"`
16786    new_path="$unix_path"
16787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16789    new_path="$unix_path"
16790  fi
16791
16792    fi
16793
16794    if test "x$new_path" = x; then
16795      # It's still not found. Now this is an unrecoverable error.
16796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16797$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16798      has_space=`$ECHO "$complete" | $GREP " "`
16799      if test "x$has_space" != x; then
16800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16802      fi
16803      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16804    fi
16805  fi
16806
16807  # Now new_path has a complete unix path to the binary
16808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16809    # Keep paths in /bin as-is, but remove trailing .exe if any
16810    new_path="${new_path/%.exe/}"
16811    # Do not save /bin paths to all_fixpath_prefixes!
16812  else
16813    # Not in mixed or Windows style, start by that.
16814    new_path=`cmd //c echo $new_path`
16815
16816  input_path="$new_path"
16817  # Check if we need to convert this using DOS-style short mode. If the path
16818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16819  # take no chances and rewrite it.
16820  # Note: m4 eats our [], so we need to use [ and ] instead.
16821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16822  if test "x$has_forbidden_chars" != x; then
16823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16825  fi
16826
16827    # Output is in $new_path
16828
16829  windows_path="$new_path"
16830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16831    unix_path=`$CYGPATH -u "$windows_path"`
16832    new_path="$unix_path"
16833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16835    new_path="$unix_path"
16836  fi
16837
16838    # remove trailing .exe if any
16839    new_path="${new_path/%.exe/}"
16840
16841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16843  fi
16844
16845    else
16846      # We're on a unix platform. Hooray! :)
16847      # First separate the path from the arguments. This will split at the first
16848      # space.
16849      complete="$FOUND_MAKE"
16850      path="${complete%% *}"
16851      tmp="$complete EOL"
16852      arguments="${tmp#* }"
16853
16854      # Cannot rely on the command "which" here since it doesn't always work.
16855      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16856      if test -z "$is_absolute_path"; then
16857        # Path to executable is not absolute. Find it.
16858        IFS_save="$IFS"
16859        IFS=:
16860        for p in $PATH; do
16861          if test -f "$p/$path" && test -x "$p/$path"; then
16862            new_path="$p/$path"
16863            break
16864          fi
16865        done
16866        IFS="$IFS_save"
16867      else
16868        # This is an absolute path, we can use it without further modifications.
16869        new_path="$path"
16870      fi
16871
16872      if test "x$new_path" = x; then
16873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16875        has_space=`$ECHO "$complete" | $GREP " "`
16876        if test "x$has_space" != x; then
16877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16879        fi
16880        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16881      fi
16882    fi
16883
16884    # Now join together the path and the arguments once again
16885    if test "x$arguments" != xEOL; then
16886      new_complete="$new_path ${arguments% *}"
16887    else
16888      new_complete="$new_path"
16889    fi
16890
16891    if test "x$complete" != "x$new_complete"; then
16892      FOUND_MAKE="$new_complete"
16893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16894$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16895    fi
16896  fi
16897
16898        fi
16899      fi
16900    fi
16901  fi
16902
16903        if test "x$FOUND_MAKE" = x; then
16904          for ac_prog in make
16905do
16906  # Extract the first word of "$ac_prog", so it can be a program name with args.
16907set dummy $ac_prog; ac_word=$2
16908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16909$as_echo_n "checking for $ac_word... " >&6; }
16910if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16911  $as_echo_n "(cached) " >&6
16912else
16913  case $CHECK_TOOLSDIR_MAKE in
16914  [\\/]* | ?:[\\/]*)
16915  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16916  ;;
16917  *)
16918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16919for as_dir in $PATH
16920do
16921  IFS=$as_save_IFS
16922  test -z "$as_dir" && as_dir=.
16923    for ac_exec_ext in '' $ac_executable_extensions; do
16924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16925    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16927    break 2
16928  fi
16929done
16930  done
16931IFS=$as_save_IFS
16932
16933  ;;
16934esac
16935fi
16936CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16937if test -n "$CHECK_TOOLSDIR_MAKE"; then
16938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16939$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16940else
16941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16942$as_echo "no" >&6; }
16943fi
16944
16945
16946  test -n "$CHECK_TOOLSDIR_MAKE" && break
16947done
16948
16949
16950  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16951  DESCRIPTION="make in tools-dir"
16952
16953  # On Cygwin, we require a newer version of make than on other platforms
16954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16955    MAKE_VERSION_EXPR="-e 4\."
16956    MAKE_REQUIRED_VERSION="4.0"
16957   else
16958    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16959    MAKE_REQUIRED_VERSION="3.81"
16960  fi
16961
16962  if test "x$MAKE_CANDIDATE" != x; then
16963    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16964$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16965    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16966    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16967    if test "x$IS_GNU_MAKE" = x; then
16968      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16969$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16970    else
16971      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16972      if test "x$IS_MODERN_MAKE" = x; then
16973        { $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
16974$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;}
16975      else
16976        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16977          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16978            MAKE_EXPECTED_ENV='cygwin'
16979          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980            MAKE_EXPECTED_ENV='msys'
16981          else
16982            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16983          fi
16984          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16985          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16986        else
16987          # Not relevant for non-Windows
16988          IS_MAKE_CORRECT_ENV=true
16989        fi
16990        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16991          { $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
16992$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;}
16993        else
16994          FOUND_MAKE=$MAKE_CANDIDATE
16995
16996  # Only process if variable expands to non-empty
16997
16998  if test "x$FOUND_MAKE" != x; then
16999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17000
17001  # First separate the path from the arguments. This will split at the first
17002  # space.
17003  complete="$FOUND_MAKE"
17004  path="${complete%% *}"
17005  tmp="$complete EOL"
17006  arguments="${tmp#* }"
17007
17008  # Input might be given as Windows format, start by converting to
17009  # unix format.
17010  new_path=`$CYGPATH -u "$path"`
17011
17012  # Now try to locate executable using which
17013  new_path=`$WHICH "$new_path" 2> /dev/null`
17014  # bat and cmd files are not always considered executable in cygwin causing which
17015  # to not find them
17016  if test "x$new_path" = x \
17017      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17018      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17019    new_path=`$CYGPATH -u "$path"`
17020  fi
17021  if test "x$new_path" = x; then
17022    # Oops. Which didn't find the executable.
17023    # The splitting of arguments from the executable at a space might have been incorrect,
17024    # since paths with space are more likely in Windows. Give it another try with the whole
17025    # argument.
17026    path="$complete"
17027    arguments="EOL"
17028    new_path=`$CYGPATH -u "$path"`
17029    new_path=`$WHICH "$new_path" 2> /dev/null`
17030    # bat and cmd files are not always considered executable in cygwin causing which
17031    # to not find them
17032    if test "x$new_path" = x \
17033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17035      new_path=`$CYGPATH -u "$path"`
17036    fi
17037    if test "x$new_path" = x; then
17038      # It's still not found. Now this is an unrecoverable error.
17039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17041      has_space=`$ECHO "$complete" | $GREP " "`
17042      if test "x$has_space" != x; then
17043        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17044$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17045      fi
17046      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17047    fi
17048  fi
17049
17050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17053  # "foo.exe" is OK but "foo" is an error.
17054  #
17055  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17056  # It is also a way to make sure we got the proper file name for the real test later on.
17057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17058  if test "x$test_shortpath" = x; then
17059    # Short path failed, file does not exist as specified.
17060    # Try adding .exe or .cmd
17061    if test -f "${new_path}.exe"; then
17062      input_to_shortpath="${new_path}.exe"
17063    elif test -f "${new_path}.cmd"; then
17064      input_to_shortpath="${new_path}.cmd"
17065    else
17066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17068      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17069$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17070      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17071    fi
17072  else
17073    input_to_shortpath="$new_path"
17074  fi
17075
17076  # Call helper function which possibly converts this using DOS-style short mode.
17077  # If so, the updated path is stored in $new_path.
17078  new_path="$input_to_shortpath"
17079
17080  input_path="$input_to_shortpath"
17081  # Check if we need to convert this using DOS-style short mode. If the path
17082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17083  # take no chances and rewrite it.
17084  # Note: m4 eats our [], so we need to use [ and ] instead.
17085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17086  if test "x$has_forbidden_chars" != x; then
17087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17091      # Going to short mode and back again did indeed matter. Since short mode is
17092      # case insensitive, let's make it lowercase to improve readability.
17093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17094      # Now convert it back to Unix-style (cygpath)
17095      input_path=`$CYGPATH -u "$shortmode_path"`
17096      new_path="$input_path"
17097    fi
17098  fi
17099
17100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17101  if test "x$test_cygdrive_prefix" = x; then
17102    # As a simple fix, exclude /usr/bin since it's not a real path.
17103    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17105      # a path prefixed by /cygdrive for fixpath to work.
17106      new_path="$CYGWIN_ROOT_PATH$input_path"
17107    fi
17108  fi
17109
17110  # remove trailing .exe if any
17111  new_path="${new_path/%.exe/}"
17112
17113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17114
17115  # First separate the path from the arguments. This will split at the first
17116  # space.
17117  complete="$FOUND_MAKE"
17118  path="${complete%% *}"
17119  tmp="$complete EOL"
17120  arguments="${tmp#* }"
17121
17122  # Input might be given as Windows format, start by converting to
17123  # unix format.
17124  new_path="$path"
17125
17126  windows_path="$new_path"
17127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17128    unix_path=`$CYGPATH -u "$windows_path"`
17129    new_path="$unix_path"
17130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17132    new_path="$unix_path"
17133  fi
17134
17135
17136  # Now try to locate executable using which
17137  new_path=`$WHICH "$new_path" 2> /dev/null`
17138
17139  if test "x$new_path" = x; then
17140    # Oops. Which didn't find the executable.
17141    # The splitting of arguments from the executable at a space might have been incorrect,
17142    # since paths with space are more likely in Windows. Give it another try with the whole
17143    # argument.
17144    path="$complete"
17145    arguments="EOL"
17146    new_path="$path"
17147
17148  windows_path="$new_path"
17149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17150    unix_path=`$CYGPATH -u "$windows_path"`
17151    new_path="$unix_path"
17152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17154    new_path="$unix_path"
17155  fi
17156
17157
17158    new_path=`$WHICH "$new_path" 2> /dev/null`
17159    # bat and cmd files are not always considered executable in MSYS causing which
17160    # to not find them
17161    if test "x$new_path" = x \
17162        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17163        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17164      new_path="$path"
17165
17166  windows_path="$new_path"
17167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17168    unix_path=`$CYGPATH -u "$windows_path"`
17169    new_path="$unix_path"
17170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17172    new_path="$unix_path"
17173  fi
17174
17175    fi
17176
17177    if test "x$new_path" = x; then
17178      # It's still not found. Now this is an unrecoverable error.
17179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17180$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17181      has_space=`$ECHO "$complete" | $GREP " "`
17182      if test "x$has_space" != x; then
17183        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17184$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17185      fi
17186      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17187    fi
17188  fi
17189
17190  # Now new_path has a complete unix path to the binary
17191  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17192    # Keep paths in /bin as-is, but remove trailing .exe if any
17193    new_path="${new_path/%.exe/}"
17194    # Do not save /bin paths to all_fixpath_prefixes!
17195  else
17196    # Not in mixed or Windows style, start by that.
17197    new_path=`cmd //c echo $new_path`
17198
17199  input_path="$new_path"
17200  # Check if we need to convert this using DOS-style short mode. If the path
17201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17202  # take no chances and rewrite it.
17203  # Note: m4 eats our [], so we need to use [ and ] instead.
17204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17205  if test "x$has_forbidden_chars" != x; then
17206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17208  fi
17209
17210    # Output is in $new_path
17211
17212  windows_path="$new_path"
17213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17214    unix_path=`$CYGPATH -u "$windows_path"`
17215    new_path="$unix_path"
17216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17218    new_path="$unix_path"
17219  fi
17220
17221    # remove trailing .exe if any
17222    new_path="${new_path/%.exe/}"
17223
17224    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17225    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17226  fi
17227
17228    else
17229      # We're on a unix platform. Hooray! :)
17230      # First separate the path from the arguments. This will split at the first
17231      # space.
17232      complete="$FOUND_MAKE"
17233      path="${complete%% *}"
17234      tmp="$complete EOL"
17235      arguments="${tmp#* }"
17236
17237      # Cannot rely on the command "which" here since it doesn't always work.
17238      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17239      if test -z "$is_absolute_path"; then
17240        # Path to executable is not absolute. Find it.
17241        IFS_save="$IFS"
17242        IFS=:
17243        for p in $PATH; do
17244          if test -f "$p/$path" && test -x "$p/$path"; then
17245            new_path="$p/$path"
17246            break
17247          fi
17248        done
17249        IFS="$IFS_save"
17250      else
17251        # This is an absolute path, we can use it without further modifications.
17252        new_path="$path"
17253      fi
17254
17255      if test "x$new_path" = x; then
17256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17257$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17258        has_space=`$ECHO "$complete" | $GREP " "`
17259        if test "x$has_space" != x; then
17260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17262        fi
17263        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17264      fi
17265    fi
17266
17267    # Now join together the path and the arguments once again
17268    if test "x$arguments" != xEOL; then
17269      new_complete="$new_path ${arguments% *}"
17270    else
17271      new_complete="$new_path"
17272    fi
17273
17274    if test "x$complete" != "x$new_complete"; then
17275      FOUND_MAKE="$new_complete"
17276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17277$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17278    fi
17279  fi
17280
17281        fi
17282      fi
17283    fi
17284  fi
17285
17286        fi
17287        PATH=$OLD_PATH
17288      fi
17289    fi
17290
17291    if test "x$FOUND_MAKE" = x; then
17292      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
17293    fi
17294  fi
17295
17296  MAKE=$FOUND_MAKE
17297
17298  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17299$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17300
17301
17302  # Check if make supports the output sync option and if so, setup using it.
17303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17304$as_echo_n "checking if make --output-sync is supported... " >&6; }
17305  if $MAKE --version -O > /dev/null 2>&1; then
17306    OUTPUT_SYNC_SUPPORTED=true
17307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17308$as_echo "yes" >&6; }
17309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17310$as_echo_n "checking for output-sync value... " >&6; }
17311
17312# Check whether --with-output-sync was given.
17313if test "${with_output_sync+set}" = set; then :
17314  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17315fi
17316
17317    if test "x$OUTPUT_SYNC" = "x"; then
17318      OUTPUT_SYNC=none
17319    fi
17320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17321$as_echo "$OUTPUT_SYNC" >&6; }
17322    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17323      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17324    fi
17325  else
17326    OUTPUT_SYNC_SUPPORTED=false
17327    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17328$as_echo "no" >&6; }
17329  fi
17330
17331
17332
17333
17334
17335
17336  # Test if find supports -delete
17337  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17338$as_echo_n "checking if find supports -delete... " >&6; }
17339  FIND_DELETE="-delete"
17340
17341  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17342
17343  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17344
17345  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17346  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17347    # No, it does not.
17348    rm $DELETEDIR/TestIfFindSupportsDelete
17349    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17350      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17351      FIND_DELETE="-print | xargs rm"
17352    else
17353      FIND_DELETE="-exec rm \{\} \+"
17354    fi
17355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17356$as_echo "no" >&6; }
17357  else
17358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17359$as_echo "yes" >&6; }
17360  fi
17361  rmdir $DELETEDIR
17362
17363
17364
17365  # These tools might not be installed by default,
17366  # need hint on how to install them.
17367
17368
17369
17370  # Publish this variable in the help.
17371
17372
17373  if test "x$UNZIP" = x; then
17374    # The variable is not set by user, try to locate tool using the code snippet
17375    for ac_prog in unzip
17376do
17377  # Extract the first word of "$ac_prog", so it can be a program name with args.
17378set dummy $ac_prog; ac_word=$2
17379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17380$as_echo_n "checking for $ac_word... " >&6; }
17381if ${ac_cv_path_UNZIP+:} false; then :
17382  $as_echo_n "(cached) " >&6
17383else
17384  case $UNZIP in
17385  [\\/]* | ?:[\\/]*)
17386  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17387  ;;
17388  *)
17389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17390for as_dir in $PATH
17391do
17392  IFS=$as_save_IFS
17393  test -z "$as_dir" && as_dir=.
17394    for ac_exec_ext in '' $ac_executable_extensions; do
17395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17396    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17398    break 2
17399  fi
17400done
17401  done
17402IFS=$as_save_IFS
17403
17404  ;;
17405esac
17406fi
17407UNZIP=$ac_cv_path_UNZIP
17408if test -n "$UNZIP"; then
17409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17410$as_echo "$UNZIP" >&6; }
17411else
17412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17413$as_echo "no" >&6; }
17414fi
17415
17416
17417  test -n "$UNZIP" && break
17418done
17419
17420  else
17421    # The variable is set, but is it from the command line or the environment?
17422
17423    # Try to remove the string !UNZIP! from our list.
17424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17426      # If it failed, the variable was not from the command line. Ignore it,
17427      # but warn the user (except for BASH, which is always set by the calling BASH).
17428      if test "xUNZIP" != xBASH; then
17429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17430$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17431      fi
17432      # Try to locate tool using the code snippet
17433      for ac_prog in unzip
17434do
17435  # Extract the first word of "$ac_prog", so it can be a program name with args.
17436set dummy $ac_prog; ac_word=$2
17437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17438$as_echo_n "checking for $ac_word... " >&6; }
17439if ${ac_cv_path_UNZIP+:} false; then :
17440  $as_echo_n "(cached) " >&6
17441else
17442  case $UNZIP in
17443  [\\/]* | ?:[\\/]*)
17444  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17445  ;;
17446  *)
17447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17448for as_dir in $PATH
17449do
17450  IFS=$as_save_IFS
17451  test -z "$as_dir" && as_dir=.
17452    for ac_exec_ext in '' $ac_executable_extensions; do
17453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17454    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17456    break 2
17457  fi
17458done
17459  done
17460IFS=$as_save_IFS
17461
17462  ;;
17463esac
17464fi
17465UNZIP=$ac_cv_path_UNZIP
17466if test -n "$UNZIP"; then
17467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17468$as_echo "$UNZIP" >&6; }
17469else
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17471$as_echo "no" >&6; }
17472fi
17473
17474
17475  test -n "$UNZIP" && break
17476done
17477
17478    else
17479      # If it succeeded, then it was overridden by the user. We will use it
17480      # for the tool.
17481
17482      # First remove it from the list of overridden variables, so we can test
17483      # for unknown variables in the end.
17484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17485
17486      # Check if the provided tool contains a complete path.
17487      tool_specified="$UNZIP"
17488      tool_basename="${tool_specified##*/}"
17489      if test "x$tool_basename" = "x$tool_specified"; then
17490        # A command without a complete path is provided, search $PATH.
17491        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17492$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17493        # Extract the first word of "$tool_basename", so it can be a program name with args.
17494set dummy $tool_basename; ac_word=$2
17495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17496$as_echo_n "checking for $ac_word... " >&6; }
17497if ${ac_cv_path_UNZIP+:} false; then :
17498  $as_echo_n "(cached) " >&6
17499else
17500  case $UNZIP in
17501  [\\/]* | ?:[\\/]*)
17502  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17503  ;;
17504  *)
17505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17506for as_dir in $PATH
17507do
17508  IFS=$as_save_IFS
17509  test -z "$as_dir" && as_dir=.
17510    for ac_exec_ext in '' $ac_executable_extensions; do
17511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17512    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17514    break 2
17515  fi
17516done
17517  done
17518IFS=$as_save_IFS
17519
17520  ;;
17521esac
17522fi
17523UNZIP=$ac_cv_path_UNZIP
17524if test -n "$UNZIP"; then
17525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17526$as_echo "$UNZIP" >&6; }
17527else
17528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17529$as_echo "no" >&6; }
17530fi
17531
17532
17533        if test "x$UNZIP" = x; then
17534          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17535        fi
17536      else
17537        # Otherwise we believe it is a complete path. Use it as it is.
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17539$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17541$as_echo_n "checking for UNZIP... " >&6; }
17542        if test ! -x "$tool_specified"; then
17543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17544$as_echo "not found" >&6; }
17545          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17546        fi
17547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17548$as_echo "$tool_specified" >&6; }
17549      fi
17550    fi
17551  fi
17552
17553
17554
17555  if test "x$UNZIP" = x; then
17556    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17557  fi
17558
17559
17560
17561
17562
17563  # Publish this variable in the help.
17564
17565
17566  if test "x$ZIP" = x; then
17567    # The variable is not set by user, try to locate tool using the code snippet
17568    for ac_prog in zip
17569do
17570  # Extract the first word of "$ac_prog", so it can be a program name with args.
17571set dummy $ac_prog; ac_word=$2
17572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17573$as_echo_n "checking for $ac_word... " >&6; }
17574if ${ac_cv_path_ZIP+:} false; then :
17575  $as_echo_n "(cached) " >&6
17576else
17577  case $ZIP in
17578  [\\/]* | ?:[\\/]*)
17579  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17580  ;;
17581  *)
17582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17583for as_dir in $PATH
17584do
17585  IFS=$as_save_IFS
17586  test -z "$as_dir" && as_dir=.
17587    for ac_exec_ext in '' $ac_executable_extensions; do
17588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17589    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17591    break 2
17592  fi
17593done
17594  done
17595IFS=$as_save_IFS
17596
17597  ;;
17598esac
17599fi
17600ZIP=$ac_cv_path_ZIP
17601if test -n "$ZIP"; then
17602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17603$as_echo "$ZIP" >&6; }
17604else
17605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17606$as_echo "no" >&6; }
17607fi
17608
17609
17610  test -n "$ZIP" && break
17611done
17612
17613  else
17614    # The variable is set, but is it from the command line or the environment?
17615
17616    # Try to remove the string !ZIP! from our list.
17617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17619      # If it failed, the variable was not from the command line. Ignore it,
17620      # but warn the user (except for BASH, which is always set by the calling BASH).
17621      if test "xZIP" != xBASH; then
17622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17623$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17624      fi
17625      # Try to locate tool using the code snippet
17626      for ac_prog in zip
17627do
17628  # Extract the first word of "$ac_prog", so it can be a program name with args.
17629set dummy $ac_prog; ac_word=$2
17630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17631$as_echo_n "checking for $ac_word... " >&6; }
17632if ${ac_cv_path_ZIP+:} false; then :
17633  $as_echo_n "(cached) " >&6
17634else
17635  case $ZIP in
17636  [\\/]* | ?:[\\/]*)
17637  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17638  ;;
17639  *)
17640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17641for as_dir in $PATH
17642do
17643  IFS=$as_save_IFS
17644  test -z "$as_dir" && as_dir=.
17645    for ac_exec_ext in '' $ac_executable_extensions; do
17646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17647    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17649    break 2
17650  fi
17651done
17652  done
17653IFS=$as_save_IFS
17654
17655  ;;
17656esac
17657fi
17658ZIP=$ac_cv_path_ZIP
17659if test -n "$ZIP"; then
17660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17661$as_echo "$ZIP" >&6; }
17662else
17663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17664$as_echo "no" >&6; }
17665fi
17666
17667
17668  test -n "$ZIP" && break
17669done
17670
17671    else
17672      # If it succeeded, then it was overridden by the user. We will use it
17673      # for the tool.
17674
17675      # First remove it from the list of overridden variables, so we can test
17676      # for unknown variables in the end.
17677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17678
17679      # Check if the provided tool contains a complete path.
17680      tool_specified="$ZIP"
17681      tool_basename="${tool_specified##*/}"
17682      if test "x$tool_basename" = "x$tool_specified"; then
17683        # A command without a complete path is provided, search $PATH.
17684        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17685$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17686        # Extract the first word of "$tool_basename", so it can be a program name with args.
17687set dummy $tool_basename; ac_word=$2
17688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17689$as_echo_n "checking for $ac_word... " >&6; }
17690if ${ac_cv_path_ZIP+:} false; then :
17691  $as_echo_n "(cached) " >&6
17692else
17693  case $ZIP in
17694  [\\/]* | ?:[\\/]*)
17695  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17696  ;;
17697  *)
17698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17699for as_dir in $PATH
17700do
17701  IFS=$as_save_IFS
17702  test -z "$as_dir" && as_dir=.
17703    for ac_exec_ext in '' $ac_executable_extensions; do
17704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17705    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17707    break 2
17708  fi
17709done
17710  done
17711IFS=$as_save_IFS
17712
17713  ;;
17714esac
17715fi
17716ZIP=$ac_cv_path_ZIP
17717if test -n "$ZIP"; then
17718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17719$as_echo "$ZIP" >&6; }
17720else
17721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17722$as_echo "no" >&6; }
17723fi
17724
17725
17726        if test "x$ZIP" = x; then
17727          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17728        fi
17729      else
17730        # Otherwise we believe it is a complete path. Use it as it is.
17731        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17732$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17733        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17734$as_echo_n "checking for ZIP... " >&6; }
17735        if test ! -x "$tool_specified"; then
17736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17737$as_echo "not found" >&6; }
17738          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17739        fi
17740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17741$as_echo "$tool_specified" >&6; }
17742      fi
17743    fi
17744  fi
17745
17746
17747
17748  if test "x$ZIP" = x; then
17749    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17750  fi
17751
17752
17753
17754  # Non-required basic tools
17755
17756
17757
17758  # Publish this variable in the help.
17759
17760
17761  if test "x$LDD" = x; then
17762    # The variable is not set by user, try to locate tool using the code snippet
17763    for ac_prog in ldd
17764do
17765  # Extract the first word of "$ac_prog", so it can be a program name with args.
17766set dummy $ac_prog; ac_word=$2
17767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17768$as_echo_n "checking for $ac_word... " >&6; }
17769if ${ac_cv_path_LDD+:} false; then :
17770  $as_echo_n "(cached) " >&6
17771else
17772  case $LDD in
17773  [\\/]* | ?:[\\/]*)
17774  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17775  ;;
17776  *)
17777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17778for as_dir in $PATH
17779do
17780  IFS=$as_save_IFS
17781  test -z "$as_dir" && as_dir=.
17782    for ac_exec_ext in '' $ac_executable_extensions; do
17783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17784    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17786    break 2
17787  fi
17788done
17789  done
17790IFS=$as_save_IFS
17791
17792  ;;
17793esac
17794fi
17795LDD=$ac_cv_path_LDD
17796if test -n "$LDD"; then
17797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17798$as_echo "$LDD" >&6; }
17799else
17800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17801$as_echo "no" >&6; }
17802fi
17803
17804
17805  test -n "$LDD" && break
17806done
17807
17808  else
17809    # The variable is set, but is it from the command line or the environment?
17810
17811    # Try to remove the string !LDD! from our list.
17812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17814      # If it failed, the variable was not from the command line. Ignore it,
17815      # but warn the user (except for BASH, which is always set by the calling BASH).
17816      if test "xLDD" != xBASH; then
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17818$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17819      fi
17820      # Try to locate tool using the code snippet
17821      for ac_prog in ldd
17822do
17823  # Extract the first word of "$ac_prog", so it can be a program name with args.
17824set dummy $ac_prog; ac_word=$2
17825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17826$as_echo_n "checking for $ac_word... " >&6; }
17827if ${ac_cv_path_LDD+:} false; then :
17828  $as_echo_n "(cached) " >&6
17829else
17830  case $LDD in
17831  [\\/]* | ?:[\\/]*)
17832  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17833  ;;
17834  *)
17835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17836for as_dir in $PATH
17837do
17838  IFS=$as_save_IFS
17839  test -z "$as_dir" && as_dir=.
17840    for ac_exec_ext in '' $ac_executable_extensions; do
17841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17842    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17844    break 2
17845  fi
17846done
17847  done
17848IFS=$as_save_IFS
17849
17850  ;;
17851esac
17852fi
17853LDD=$ac_cv_path_LDD
17854if test -n "$LDD"; then
17855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17856$as_echo "$LDD" >&6; }
17857else
17858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17859$as_echo "no" >&6; }
17860fi
17861
17862
17863  test -n "$LDD" && break
17864done
17865
17866    else
17867      # If it succeeded, then it was overridden by the user. We will use it
17868      # for the tool.
17869
17870      # First remove it from the list of overridden variables, so we can test
17871      # for unknown variables in the end.
17872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17873
17874      # Check if the provided tool contains a complete path.
17875      tool_specified="$LDD"
17876      tool_basename="${tool_specified##*/}"
17877      if test "x$tool_basename" = "x$tool_specified"; then
17878        # A command without a complete path is provided, search $PATH.
17879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17880$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17881        # Extract the first word of "$tool_basename", so it can be a program name with args.
17882set dummy $tool_basename; ac_word=$2
17883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17884$as_echo_n "checking for $ac_word... " >&6; }
17885if ${ac_cv_path_LDD+:} false; then :
17886  $as_echo_n "(cached) " >&6
17887else
17888  case $LDD in
17889  [\\/]* | ?:[\\/]*)
17890  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17891  ;;
17892  *)
17893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17894for as_dir in $PATH
17895do
17896  IFS=$as_save_IFS
17897  test -z "$as_dir" && as_dir=.
17898    for ac_exec_ext in '' $ac_executable_extensions; do
17899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17900    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17902    break 2
17903  fi
17904done
17905  done
17906IFS=$as_save_IFS
17907
17908  ;;
17909esac
17910fi
17911LDD=$ac_cv_path_LDD
17912if test -n "$LDD"; then
17913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17914$as_echo "$LDD" >&6; }
17915else
17916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17917$as_echo "no" >&6; }
17918fi
17919
17920
17921        if test "x$LDD" = x; then
17922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17923        fi
17924      else
17925        # Otherwise we believe it is a complete path. Use it as it is.
17926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17927$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17929$as_echo_n "checking for LDD... " >&6; }
17930        if test ! -x "$tool_specified"; then
17931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17932$as_echo "not found" >&6; }
17933          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17934        fi
17935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17936$as_echo "$tool_specified" >&6; }
17937      fi
17938    fi
17939  fi
17940
17941
17942  if test "x$LDD" = "x"; then
17943    # List shared lib dependencies is used for
17944    # debug output and checking for forbidden dependencies.
17945    # We can build without it.
17946    LDD="true"
17947  fi
17948
17949
17950  # Publish this variable in the help.
17951
17952
17953  if test "x$OTOOL" = x; then
17954    # The variable is not set by user, try to locate tool using the code snippet
17955    for ac_prog in otool
17956do
17957  # Extract the first word of "$ac_prog", so it can be a program name with args.
17958set dummy $ac_prog; ac_word=$2
17959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17960$as_echo_n "checking for $ac_word... " >&6; }
17961if ${ac_cv_path_OTOOL+:} false; then :
17962  $as_echo_n "(cached) " >&6
17963else
17964  case $OTOOL in
17965  [\\/]* | ?:[\\/]*)
17966  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17967  ;;
17968  *)
17969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17970for as_dir in $PATH
17971do
17972  IFS=$as_save_IFS
17973  test -z "$as_dir" && as_dir=.
17974    for ac_exec_ext in '' $ac_executable_extensions; do
17975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17976    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17978    break 2
17979  fi
17980done
17981  done
17982IFS=$as_save_IFS
17983
17984  ;;
17985esac
17986fi
17987OTOOL=$ac_cv_path_OTOOL
17988if test -n "$OTOOL"; then
17989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17990$as_echo "$OTOOL" >&6; }
17991else
17992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17993$as_echo "no" >&6; }
17994fi
17995
17996
17997  test -n "$OTOOL" && break
17998done
17999
18000  else
18001    # The variable is set, but is it from the command line or the environment?
18002
18003    # Try to remove the string !OTOOL! from our list.
18004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18006      # If it failed, the variable was not from the command line. Ignore it,
18007      # but warn the user (except for BASH, which is always set by the calling BASH).
18008      if test "xOTOOL" != xBASH; then
18009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18010$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18011      fi
18012      # Try to locate tool using the code snippet
18013      for ac_prog in otool
18014do
18015  # Extract the first word of "$ac_prog", so it can be a program name with args.
18016set dummy $ac_prog; ac_word=$2
18017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18018$as_echo_n "checking for $ac_word... " >&6; }
18019if ${ac_cv_path_OTOOL+:} false; then :
18020  $as_echo_n "(cached) " >&6
18021else
18022  case $OTOOL in
18023  [\\/]* | ?:[\\/]*)
18024  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18025  ;;
18026  *)
18027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18028for as_dir in $PATH
18029do
18030  IFS=$as_save_IFS
18031  test -z "$as_dir" && as_dir=.
18032    for ac_exec_ext in '' $ac_executable_extensions; do
18033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18034    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18036    break 2
18037  fi
18038done
18039  done
18040IFS=$as_save_IFS
18041
18042  ;;
18043esac
18044fi
18045OTOOL=$ac_cv_path_OTOOL
18046if test -n "$OTOOL"; then
18047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18048$as_echo "$OTOOL" >&6; }
18049else
18050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18051$as_echo "no" >&6; }
18052fi
18053
18054
18055  test -n "$OTOOL" && break
18056done
18057
18058    else
18059      # If it succeeded, then it was overridden by the user. We will use it
18060      # for the tool.
18061
18062      # First remove it from the list of overridden variables, so we can test
18063      # for unknown variables in the end.
18064      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18065
18066      # Check if the provided tool contains a complete path.
18067      tool_specified="$OTOOL"
18068      tool_basename="${tool_specified##*/}"
18069      if test "x$tool_basename" = "x$tool_specified"; then
18070        # A command without a complete path is provided, search $PATH.
18071        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18072$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18073        # Extract the first word of "$tool_basename", so it can be a program name with args.
18074set dummy $tool_basename; ac_word=$2
18075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18076$as_echo_n "checking for $ac_word... " >&6; }
18077if ${ac_cv_path_OTOOL+:} false; then :
18078  $as_echo_n "(cached) " >&6
18079else
18080  case $OTOOL in
18081  [\\/]* | ?:[\\/]*)
18082  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18083  ;;
18084  *)
18085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18086for as_dir in $PATH
18087do
18088  IFS=$as_save_IFS
18089  test -z "$as_dir" && as_dir=.
18090    for ac_exec_ext in '' $ac_executable_extensions; do
18091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18092    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18094    break 2
18095  fi
18096done
18097  done
18098IFS=$as_save_IFS
18099
18100  ;;
18101esac
18102fi
18103OTOOL=$ac_cv_path_OTOOL
18104if test -n "$OTOOL"; then
18105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18106$as_echo "$OTOOL" >&6; }
18107else
18108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18109$as_echo "no" >&6; }
18110fi
18111
18112
18113        if test "x$OTOOL" = x; then
18114          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18115        fi
18116      else
18117        # Otherwise we believe it is a complete path. Use it as it is.
18118        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18119$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18121$as_echo_n "checking for OTOOL... " >&6; }
18122        if test ! -x "$tool_specified"; then
18123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18124$as_echo "not found" >&6; }
18125          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18126        fi
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18128$as_echo "$tool_specified" >&6; }
18129      fi
18130    fi
18131  fi
18132
18133
18134  if test "x$OTOOL" = "x"; then
18135    OTOOL="true"
18136  fi
18137
18138
18139  # Publish this variable in the help.
18140
18141
18142  if test "x$READELF" = x; then
18143    # The variable is not set by user, try to locate tool using the code snippet
18144    for ac_prog in greadelf readelf
18145do
18146  # Extract the first word of "$ac_prog", so it can be a program name with args.
18147set dummy $ac_prog; ac_word=$2
18148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18149$as_echo_n "checking for $ac_word... " >&6; }
18150if ${ac_cv_path_READELF+:} false; then :
18151  $as_echo_n "(cached) " >&6
18152else
18153  case $READELF in
18154  [\\/]* | ?:[\\/]*)
18155  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18156  ;;
18157  *)
18158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18159for as_dir in $PATH
18160do
18161  IFS=$as_save_IFS
18162  test -z "$as_dir" && as_dir=.
18163    for ac_exec_ext in '' $ac_executable_extensions; do
18164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18165    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18167    break 2
18168  fi
18169done
18170  done
18171IFS=$as_save_IFS
18172
18173  ;;
18174esac
18175fi
18176READELF=$ac_cv_path_READELF
18177if test -n "$READELF"; then
18178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18179$as_echo "$READELF" >&6; }
18180else
18181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18182$as_echo "no" >&6; }
18183fi
18184
18185
18186  test -n "$READELF" && break
18187done
18188
18189  else
18190    # The variable is set, but is it from the command line or the environment?
18191
18192    # Try to remove the string !READELF! from our list.
18193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18195      # If it failed, the variable was not from the command line. Ignore it,
18196      # but warn the user (except for BASH, which is always set by the calling BASH).
18197      if test "xREADELF" != xBASH; then
18198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18199$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18200      fi
18201      # Try to locate tool using the code snippet
18202      for ac_prog in greadelf readelf
18203do
18204  # Extract the first word of "$ac_prog", so it can be a program name with args.
18205set dummy $ac_prog; ac_word=$2
18206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18207$as_echo_n "checking for $ac_word... " >&6; }
18208if ${ac_cv_path_READELF+:} false; then :
18209  $as_echo_n "(cached) " >&6
18210else
18211  case $READELF in
18212  [\\/]* | ?:[\\/]*)
18213  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18214  ;;
18215  *)
18216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18217for as_dir in $PATH
18218do
18219  IFS=$as_save_IFS
18220  test -z "$as_dir" && as_dir=.
18221    for ac_exec_ext in '' $ac_executable_extensions; do
18222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18223    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18225    break 2
18226  fi
18227done
18228  done
18229IFS=$as_save_IFS
18230
18231  ;;
18232esac
18233fi
18234READELF=$ac_cv_path_READELF
18235if test -n "$READELF"; then
18236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18237$as_echo "$READELF" >&6; }
18238else
18239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18240$as_echo "no" >&6; }
18241fi
18242
18243
18244  test -n "$READELF" && break
18245done
18246
18247    else
18248      # If it succeeded, then it was overridden by the user. We will use it
18249      # for the tool.
18250
18251      # First remove it from the list of overridden variables, so we can test
18252      # for unknown variables in the end.
18253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18254
18255      # Check if the provided tool contains a complete path.
18256      tool_specified="$READELF"
18257      tool_basename="${tool_specified##*/}"
18258      if test "x$tool_basename" = "x$tool_specified"; then
18259        # A command without a complete path is provided, search $PATH.
18260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18261$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18262        # Extract the first word of "$tool_basename", so it can be a program name with args.
18263set dummy $tool_basename; ac_word=$2
18264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18265$as_echo_n "checking for $ac_word... " >&6; }
18266if ${ac_cv_path_READELF+:} false; then :
18267  $as_echo_n "(cached) " >&6
18268else
18269  case $READELF in
18270  [\\/]* | ?:[\\/]*)
18271  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18272  ;;
18273  *)
18274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18275for as_dir in $PATH
18276do
18277  IFS=$as_save_IFS
18278  test -z "$as_dir" && as_dir=.
18279    for ac_exec_ext in '' $ac_executable_extensions; do
18280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18281    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18283    break 2
18284  fi
18285done
18286  done
18287IFS=$as_save_IFS
18288
18289  ;;
18290esac
18291fi
18292READELF=$ac_cv_path_READELF
18293if test -n "$READELF"; then
18294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18295$as_echo "$READELF" >&6; }
18296else
18297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18298$as_echo "no" >&6; }
18299fi
18300
18301
18302        if test "x$READELF" = x; then
18303          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18304        fi
18305      else
18306        # Otherwise we believe it is a complete path. Use it as it is.
18307        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18308$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18310$as_echo_n "checking for READELF... " >&6; }
18311        if test ! -x "$tool_specified"; then
18312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18313$as_echo "not found" >&6; }
18314          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18315        fi
18316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18317$as_echo "$tool_specified" >&6; }
18318      fi
18319    fi
18320  fi
18321
18322
18323
18324
18325  # Publish this variable in the help.
18326
18327
18328  if test "x$HG" = x; then
18329    # The variable is not set by user, try to locate tool using the code snippet
18330    for ac_prog in hg
18331do
18332  # Extract the first word of "$ac_prog", so it can be a program name with args.
18333set dummy $ac_prog; ac_word=$2
18334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18335$as_echo_n "checking for $ac_word... " >&6; }
18336if ${ac_cv_path_HG+:} false; then :
18337  $as_echo_n "(cached) " >&6
18338else
18339  case $HG in
18340  [\\/]* | ?:[\\/]*)
18341  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18342  ;;
18343  *)
18344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18345for as_dir in $PATH
18346do
18347  IFS=$as_save_IFS
18348  test -z "$as_dir" && as_dir=.
18349    for ac_exec_ext in '' $ac_executable_extensions; do
18350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18351    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18353    break 2
18354  fi
18355done
18356  done
18357IFS=$as_save_IFS
18358
18359  ;;
18360esac
18361fi
18362HG=$ac_cv_path_HG
18363if test -n "$HG"; then
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18365$as_echo "$HG" >&6; }
18366else
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368$as_echo "no" >&6; }
18369fi
18370
18371
18372  test -n "$HG" && break
18373done
18374
18375  else
18376    # The variable is set, but is it from the command line or the environment?
18377
18378    # Try to remove the string !HG! from our list.
18379    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18380    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18381      # If it failed, the variable was not from the command line. Ignore it,
18382      # but warn the user (except for BASH, which is always set by the calling BASH).
18383      if test "xHG" != xBASH; then
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18385$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18386      fi
18387      # Try to locate tool using the code snippet
18388      for ac_prog in hg
18389do
18390  # Extract the first word of "$ac_prog", so it can be a program name with args.
18391set dummy $ac_prog; ac_word=$2
18392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18393$as_echo_n "checking for $ac_word... " >&6; }
18394if ${ac_cv_path_HG+:} false; then :
18395  $as_echo_n "(cached) " >&6
18396else
18397  case $HG in
18398  [\\/]* | ?:[\\/]*)
18399  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18400  ;;
18401  *)
18402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18403for as_dir in $PATH
18404do
18405  IFS=$as_save_IFS
18406  test -z "$as_dir" && as_dir=.
18407    for ac_exec_ext in '' $ac_executable_extensions; do
18408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18409    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18411    break 2
18412  fi
18413done
18414  done
18415IFS=$as_save_IFS
18416
18417  ;;
18418esac
18419fi
18420HG=$ac_cv_path_HG
18421if test -n "$HG"; then
18422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18423$as_echo "$HG" >&6; }
18424else
18425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18426$as_echo "no" >&6; }
18427fi
18428
18429
18430  test -n "$HG" && break
18431done
18432
18433    else
18434      # If it succeeded, then it was overridden by the user. We will use it
18435      # for the tool.
18436
18437      # First remove it from the list of overridden variables, so we can test
18438      # for unknown variables in the end.
18439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18440
18441      # Check if the provided tool contains a complete path.
18442      tool_specified="$HG"
18443      tool_basename="${tool_specified##*/}"
18444      if test "x$tool_basename" = "x$tool_specified"; then
18445        # A command without a complete path is provided, search $PATH.
18446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18447$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18448        # Extract the first word of "$tool_basename", so it can be a program name with args.
18449set dummy $tool_basename; ac_word=$2
18450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18451$as_echo_n "checking for $ac_word... " >&6; }
18452if ${ac_cv_path_HG+:} false; then :
18453  $as_echo_n "(cached) " >&6
18454else
18455  case $HG in
18456  [\\/]* | ?:[\\/]*)
18457  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18458  ;;
18459  *)
18460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18461for as_dir in $PATH
18462do
18463  IFS=$as_save_IFS
18464  test -z "$as_dir" && as_dir=.
18465    for ac_exec_ext in '' $ac_executable_extensions; do
18466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18467    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18469    break 2
18470  fi
18471done
18472  done
18473IFS=$as_save_IFS
18474
18475  ;;
18476esac
18477fi
18478HG=$ac_cv_path_HG
18479if test -n "$HG"; then
18480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18481$as_echo "$HG" >&6; }
18482else
18483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18484$as_echo "no" >&6; }
18485fi
18486
18487
18488        if test "x$HG" = x; then
18489          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18490        fi
18491      else
18492        # Otherwise we believe it is a complete path. Use it as it is.
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18494$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18495        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18496$as_echo_n "checking for HG... " >&6; }
18497        if test ! -x "$tool_specified"; then
18498          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18499$as_echo "not found" >&6; }
18500          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18501        fi
18502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18503$as_echo "$tool_specified" >&6; }
18504      fi
18505    fi
18506  fi
18507
18508
18509
18510
18511  # Publish this variable in the help.
18512
18513
18514  if test "x$STAT" = x; then
18515    # The variable is not set by user, try to locate tool using the code snippet
18516    for ac_prog in stat
18517do
18518  # Extract the first word of "$ac_prog", so it can be a program name with args.
18519set dummy $ac_prog; ac_word=$2
18520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18521$as_echo_n "checking for $ac_word... " >&6; }
18522if ${ac_cv_path_STAT+:} false; then :
18523  $as_echo_n "(cached) " >&6
18524else
18525  case $STAT in
18526  [\\/]* | ?:[\\/]*)
18527  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18528  ;;
18529  *)
18530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18531for as_dir in $PATH
18532do
18533  IFS=$as_save_IFS
18534  test -z "$as_dir" && as_dir=.
18535    for ac_exec_ext in '' $ac_executable_extensions; do
18536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18537    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18539    break 2
18540  fi
18541done
18542  done
18543IFS=$as_save_IFS
18544
18545  ;;
18546esac
18547fi
18548STAT=$ac_cv_path_STAT
18549if test -n "$STAT"; then
18550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18551$as_echo "$STAT" >&6; }
18552else
18553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18554$as_echo "no" >&6; }
18555fi
18556
18557
18558  test -n "$STAT" && break
18559done
18560
18561  else
18562    # The variable is set, but is it from the command line or the environment?
18563
18564    # Try to remove the string !STAT! from our list.
18565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18567      # If it failed, the variable was not from the command line. Ignore it,
18568      # but warn the user (except for BASH, which is always set by the calling BASH).
18569      if test "xSTAT" != xBASH; then
18570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18571$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18572      fi
18573      # Try to locate tool using the code snippet
18574      for ac_prog in stat
18575do
18576  # Extract the first word of "$ac_prog", so it can be a program name with args.
18577set dummy $ac_prog; ac_word=$2
18578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18579$as_echo_n "checking for $ac_word... " >&6; }
18580if ${ac_cv_path_STAT+:} false; then :
18581  $as_echo_n "(cached) " >&6
18582else
18583  case $STAT in
18584  [\\/]* | ?:[\\/]*)
18585  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18586  ;;
18587  *)
18588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18589for as_dir in $PATH
18590do
18591  IFS=$as_save_IFS
18592  test -z "$as_dir" && as_dir=.
18593    for ac_exec_ext in '' $ac_executable_extensions; do
18594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18595    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18597    break 2
18598  fi
18599done
18600  done
18601IFS=$as_save_IFS
18602
18603  ;;
18604esac
18605fi
18606STAT=$ac_cv_path_STAT
18607if test -n "$STAT"; then
18608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18609$as_echo "$STAT" >&6; }
18610else
18611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18612$as_echo "no" >&6; }
18613fi
18614
18615
18616  test -n "$STAT" && break
18617done
18618
18619    else
18620      # If it succeeded, then it was overridden by the user. We will use it
18621      # for the tool.
18622
18623      # First remove it from the list of overridden variables, so we can test
18624      # for unknown variables in the end.
18625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18626
18627      # Check if the provided tool contains a complete path.
18628      tool_specified="$STAT"
18629      tool_basename="${tool_specified##*/}"
18630      if test "x$tool_basename" = "x$tool_specified"; then
18631        # A command without a complete path is provided, search $PATH.
18632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18633$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18634        # Extract the first word of "$tool_basename", so it can be a program name with args.
18635set dummy $tool_basename; ac_word=$2
18636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18637$as_echo_n "checking for $ac_word... " >&6; }
18638if ${ac_cv_path_STAT+:} false; then :
18639  $as_echo_n "(cached) " >&6
18640else
18641  case $STAT in
18642  [\\/]* | ?:[\\/]*)
18643  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18644  ;;
18645  *)
18646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18647for as_dir in $PATH
18648do
18649  IFS=$as_save_IFS
18650  test -z "$as_dir" && as_dir=.
18651    for ac_exec_ext in '' $ac_executable_extensions; do
18652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18653    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18655    break 2
18656  fi
18657done
18658  done
18659IFS=$as_save_IFS
18660
18661  ;;
18662esac
18663fi
18664STAT=$ac_cv_path_STAT
18665if test -n "$STAT"; then
18666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18667$as_echo "$STAT" >&6; }
18668else
18669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18670$as_echo "no" >&6; }
18671fi
18672
18673
18674        if test "x$STAT" = x; then
18675          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18676        fi
18677      else
18678        # Otherwise we believe it is a complete path. Use it as it is.
18679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18680$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18682$as_echo_n "checking for STAT... " >&6; }
18683        if test ! -x "$tool_specified"; then
18684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18685$as_echo "not found" >&6; }
18686          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18687        fi
18688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18689$as_echo "$tool_specified" >&6; }
18690      fi
18691    fi
18692  fi
18693
18694
18695
18696
18697  # Publish this variable in the help.
18698
18699
18700  if test "x$TIME" = x; then
18701    # The variable is not set by user, try to locate tool using the code snippet
18702    for ac_prog in time
18703do
18704  # Extract the first word of "$ac_prog", so it can be a program name with args.
18705set dummy $ac_prog; ac_word=$2
18706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18707$as_echo_n "checking for $ac_word... " >&6; }
18708if ${ac_cv_path_TIME+:} false; then :
18709  $as_echo_n "(cached) " >&6
18710else
18711  case $TIME in
18712  [\\/]* | ?:[\\/]*)
18713  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18714  ;;
18715  *)
18716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18717for as_dir in $PATH
18718do
18719  IFS=$as_save_IFS
18720  test -z "$as_dir" && as_dir=.
18721    for ac_exec_ext in '' $ac_executable_extensions; do
18722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18723    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18725    break 2
18726  fi
18727done
18728  done
18729IFS=$as_save_IFS
18730
18731  ;;
18732esac
18733fi
18734TIME=$ac_cv_path_TIME
18735if test -n "$TIME"; then
18736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18737$as_echo "$TIME" >&6; }
18738else
18739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18740$as_echo "no" >&6; }
18741fi
18742
18743
18744  test -n "$TIME" && break
18745done
18746
18747  else
18748    # The variable is set, but is it from the command line or the environment?
18749
18750    # Try to remove the string !TIME! from our list.
18751    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18752    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18753      # If it failed, the variable was not from the command line. Ignore it,
18754      # but warn the user (except for BASH, which is always set by the calling BASH).
18755      if test "xTIME" != xBASH; then
18756        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18757$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18758      fi
18759      # Try to locate tool using the code snippet
18760      for ac_prog in time
18761do
18762  # Extract the first word of "$ac_prog", so it can be a program name with args.
18763set dummy $ac_prog; ac_word=$2
18764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18765$as_echo_n "checking for $ac_word... " >&6; }
18766if ${ac_cv_path_TIME+:} false; then :
18767  $as_echo_n "(cached) " >&6
18768else
18769  case $TIME in
18770  [\\/]* | ?:[\\/]*)
18771  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18772  ;;
18773  *)
18774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18775for as_dir in $PATH
18776do
18777  IFS=$as_save_IFS
18778  test -z "$as_dir" && as_dir=.
18779    for ac_exec_ext in '' $ac_executable_extensions; do
18780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18781    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18783    break 2
18784  fi
18785done
18786  done
18787IFS=$as_save_IFS
18788
18789  ;;
18790esac
18791fi
18792TIME=$ac_cv_path_TIME
18793if test -n "$TIME"; then
18794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18795$as_echo "$TIME" >&6; }
18796else
18797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18798$as_echo "no" >&6; }
18799fi
18800
18801
18802  test -n "$TIME" && break
18803done
18804
18805    else
18806      # If it succeeded, then it was overridden by the user. We will use it
18807      # for the tool.
18808
18809      # First remove it from the list of overridden variables, so we can test
18810      # for unknown variables in the end.
18811      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18812
18813      # Check if the provided tool contains a complete path.
18814      tool_specified="$TIME"
18815      tool_basename="${tool_specified##*/}"
18816      if test "x$tool_basename" = "x$tool_specified"; then
18817        # A command without a complete path is provided, search $PATH.
18818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18819$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18820        # Extract the first word of "$tool_basename", so it can be a program name with args.
18821set dummy $tool_basename; ac_word=$2
18822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18823$as_echo_n "checking for $ac_word... " >&6; }
18824if ${ac_cv_path_TIME+:} false; then :
18825  $as_echo_n "(cached) " >&6
18826else
18827  case $TIME in
18828  [\\/]* | ?:[\\/]*)
18829  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18830  ;;
18831  *)
18832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18833for as_dir in $PATH
18834do
18835  IFS=$as_save_IFS
18836  test -z "$as_dir" && as_dir=.
18837    for ac_exec_ext in '' $ac_executable_extensions; do
18838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18839    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18841    break 2
18842  fi
18843done
18844  done
18845IFS=$as_save_IFS
18846
18847  ;;
18848esac
18849fi
18850TIME=$ac_cv_path_TIME
18851if test -n "$TIME"; then
18852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18853$as_echo "$TIME" >&6; }
18854else
18855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18856$as_echo "no" >&6; }
18857fi
18858
18859
18860        if test "x$TIME" = x; then
18861          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18862        fi
18863      else
18864        # Otherwise we believe it is a complete path. Use it as it is.
18865        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18866$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18868$as_echo_n "checking for TIME... " >&6; }
18869        if test ! -x "$tool_specified"; then
18870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18871$as_echo "not found" >&6; }
18872          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18873        fi
18874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18875$as_echo "$tool_specified" >&6; }
18876      fi
18877    fi
18878  fi
18879
18880
18881
18882
18883  # Publish this variable in the help.
18884
18885
18886  if test "x$PATCH" = x; then
18887    # The variable is not set by user, try to locate tool using the code snippet
18888    for ac_prog in gpatch patch
18889do
18890  # Extract the first word of "$ac_prog", so it can be a program name with args.
18891set dummy $ac_prog; ac_word=$2
18892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18893$as_echo_n "checking for $ac_word... " >&6; }
18894if ${ac_cv_path_PATCH+:} false; then :
18895  $as_echo_n "(cached) " >&6
18896else
18897  case $PATCH in
18898  [\\/]* | ?:[\\/]*)
18899  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18900  ;;
18901  *)
18902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18903for as_dir in $PATH
18904do
18905  IFS=$as_save_IFS
18906  test -z "$as_dir" && as_dir=.
18907    for ac_exec_ext in '' $ac_executable_extensions; do
18908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18909    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18911    break 2
18912  fi
18913done
18914  done
18915IFS=$as_save_IFS
18916
18917  ;;
18918esac
18919fi
18920PATCH=$ac_cv_path_PATCH
18921if test -n "$PATCH"; then
18922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18923$as_echo "$PATCH" >&6; }
18924else
18925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18926$as_echo "no" >&6; }
18927fi
18928
18929
18930  test -n "$PATCH" && break
18931done
18932
18933  else
18934    # The variable is set, but is it from the command line or the environment?
18935
18936    # Try to remove the string !PATCH! from our list.
18937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
18938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18939      # If it failed, the variable was not from the command line. Ignore it,
18940      # but warn the user (except for BASH, which is always set by the calling BASH).
18941      if test "xPATCH" != xBASH; then
18942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
18943$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
18944      fi
18945      # Try to locate tool using the code snippet
18946      for ac_prog in gpatch patch
18947do
18948  # Extract the first word of "$ac_prog", so it can be a program name with args.
18949set dummy $ac_prog; ac_word=$2
18950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18951$as_echo_n "checking for $ac_word... " >&6; }
18952if ${ac_cv_path_PATCH+:} false; then :
18953  $as_echo_n "(cached) " >&6
18954else
18955  case $PATCH in
18956  [\\/]* | ?:[\\/]*)
18957  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18958  ;;
18959  *)
18960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18961for as_dir in $PATH
18962do
18963  IFS=$as_save_IFS
18964  test -z "$as_dir" && as_dir=.
18965    for ac_exec_ext in '' $ac_executable_extensions; do
18966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18967    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18969    break 2
18970  fi
18971done
18972  done
18973IFS=$as_save_IFS
18974
18975  ;;
18976esac
18977fi
18978PATCH=$ac_cv_path_PATCH
18979if test -n "$PATCH"; then
18980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18981$as_echo "$PATCH" >&6; }
18982else
18983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18984$as_echo "no" >&6; }
18985fi
18986
18987
18988  test -n "$PATCH" && break
18989done
18990
18991    else
18992      # If it succeeded, then it was overridden by the user. We will use it
18993      # for the tool.
18994
18995      # First remove it from the list of overridden variables, so we can test
18996      # for unknown variables in the end.
18997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18998
18999      # Check if the provided tool contains a complete path.
19000      tool_specified="$PATCH"
19001      tool_basename="${tool_specified##*/}"
19002      if test "x$tool_basename" = "x$tool_specified"; then
19003        # A command without a complete path is provided, search $PATH.
19004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
19005$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
19006        # Extract the first word of "$tool_basename", so it can be a program name with args.
19007set dummy $tool_basename; ac_word=$2
19008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19009$as_echo_n "checking for $ac_word... " >&6; }
19010if ${ac_cv_path_PATCH+:} false; then :
19011  $as_echo_n "(cached) " >&6
19012else
19013  case $PATCH in
19014  [\\/]* | ?:[\\/]*)
19015  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19016  ;;
19017  *)
19018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19019for as_dir in $PATH
19020do
19021  IFS=$as_save_IFS
19022  test -z "$as_dir" && as_dir=.
19023    for ac_exec_ext in '' $ac_executable_extensions; do
19024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19025    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19027    break 2
19028  fi
19029done
19030  done
19031IFS=$as_save_IFS
19032
19033  ;;
19034esac
19035fi
19036PATCH=$ac_cv_path_PATCH
19037if test -n "$PATCH"; then
19038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19039$as_echo "$PATCH" >&6; }
19040else
19041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19042$as_echo "no" >&6; }
19043fi
19044
19045
19046        if test "x$PATCH" = x; then
19047          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19048        fi
19049      else
19050        # Otherwise we believe it is a complete path. Use it as it is.
19051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
19052$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
19053        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
19054$as_echo_n "checking for PATCH... " >&6; }
19055        if test ! -x "$tool_specified"; then
19056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19057$as_echo "not found" >&6; }
19058          as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
19059        fi
19060        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19061$as_echo "$tool_specified" >&6; }
19062      fi
19063    fi
19064  fi
19065
19066
19067  # Check if it's GNU time
19068  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19069  if test "x$IS_GNU_TIME" != x; then
19070    IS_GNU_TIME=yes
19071  else
19072    IS_GNU_TIME=no
19073  fi
19074
19075
19076  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19077
19078
19079
19080  # Publish this variable in the help.
19081
19082
19083  if test "x$DSYMUTIL" = x; then
19084    # The variable is not set by user, try to locate tool using the code snippet
19085    for ac_prog in dsymutil
19086do
19087  # Extract the first word of "$ac_prog", so it can be a program name with args.
19088set dummy $ac_prog; ac_word=$2
19089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19090$as_echo_n "checking for $ac_word... " >&6; }
19091if ${ac_cv_path_DSYMUTIL+:} false; then :
19092  $as_echo_n "(cached) " >&6
19093else
19094  case $DSYMUTIL in
19095  [\\/]* | ?:[\\/]*)
19096  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19097  ;;
19098  *)
19099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19100for as_dir in $PATH
19101do
19102  IFS=$as_save_IFS
19103  test -z "$as_dir" && as_dir=.
19104    for ac_exec_ext in '' $ac_executable_extensions; do
19105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19106    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19108    break 2
19109  fi
19110done
19111  done
19112IFS=$as_save_IFS
19113
19114  ;;
19115esac
19116fi
19117DSYMUTIL=$ac_cv_path_DSYMUTIL
19118if test -n "$DSYMUTIL"; then
19119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19120$as_echo "$DSYMUTIL" >&6; }
19121else
19122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19123$as_echo "no" >&6; }
19124fi
19125
19126
19127  test -n "$DSYMUTIL" && break
19128done
19129
19130  else
19131    # The variable is set, but is it from the command line or the environment?
19132
19133    # Try to remove the string !DSYMUTIL! from our list.
19134    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19135    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19136      # If it failed, the variable was not from the command line. Ignore it,
19137      # but warn the user (except for BASH, which is always set by the calling BASH).
19138      if test "xDSYMUTIL" != xBASH; then
19139        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19140$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19141      fi
19142      # Try to locate tool using the code snippet
19143      for ac_prog in dsymutil
19144do
19145  # Extract the first word of "$ac_prog", so it can be a program name with args.
19146set dummy $ac_prog; ac_word=$2
19147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19148$as_echo_n "checking for $ac_word... " >&6; }
19149if ${ac_cv_path_DSYMUTIL+:} false; then :
19150  $as_echo_n "(cached) " >&6
19151else
19152  case $DSYMUTIL in
19153  [\\/]* | ?:[\\/]*)
19154  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19155  ;;
19156  *)
19157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19158for as_dir in $PATH
19159do
19160  IFS=$as_save_IFS
19161  test -z "$as_dir" && as_dir=.
19162    for ac_exec_ext in '' $ac_executable_extensions; do
19163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19164    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19166    break 2
19167  fi
19168done
19169  done
19170IFS=$as_save_IFS
19171
19172  ;;
19173esac
19174fi
19175DSYMUTIL=$ac_cv_path_DSYMUTIL
19176if test -n "$DSYMUTIL"; then
19177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19178$as_echo "$DSYMUTIL" >&6; }
19179else
19180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19181$as_echo "no" >&6; }
19182fi
19183
19184
19185  test -n "$DSYMUTIL" && break
19186done
19187
19188    else
19189      # If it succeeded, then it was overridden by the user. We will use it
19190      # for the tool.
19191
19192      # First remove it from the list of overridden variables, so we can test
19193      # for unknown variables in the end.
19194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19195
19196      # Check if the provided tool contains a complete path.
19197      tool_specified="$DSYMUTIL"
19198      tool_basename="${tool_specified##*/}"
19199      if test "x$tool_basename" = "x$tool_specified"; then
19200        # A command without a complete path is provided, search $PATH.
19201        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19202$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19203        # Extract the first word of "$tool_basename", so it can be a program name with args.
19204set dummy $tool_basename; ac_word=$2
19205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19206$as_echo_n "checking for $ac_word... " >&6; }
19207if ${ac_cv_path_DSYMUTIL+:} false; then :
19208  $as_echo_n "(cached) " >&6
19209else
19210  case $DSYMUTIL in
19211  [\\/]* | ?:[\\/]*)
19212  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19213  ;;
19214  *)
19215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19216for as_dir in $PATH
19217do
19218  IFS=$as_save_IFS
19219  test -z "$as_dir" && as_dir=.
19220    for ac_exec_ext in '' $ac_executable_extensions; do
19221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19222    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19224    break 2
19225  fi
19226done
19227  done
19228IFS=$as_save_IFS
19229
19230  ;;
19231esac
19232fi
19233DSYMUTIL=$ac_cv_path_DSYMUTIL
19234if test -n "$DSYMUTIL"; then
19235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19236$as_echo "$DSYMUTIL" >&6; }
19237else
19238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19239$as_echo "no" >&6; }
19240fi
19241
19242
19243        if test "x$DSYMUTIL" = x; then
19244          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19245        fi
19246      else
19247        # Otherwise we believe it is a complete path. Use it as it is.
19248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19249$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19251$as_echo_n "checking for DSYMUTIL... " >&6; }
19252        if test ! -x "$tool_specified"; then
19253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19254$as_echo "not found" >&6; }
19255          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19256        fi
19257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19258$as_echo "$tool_specified" >&6; }
19259      fi
19260    fi
19261  fi
19262
19263
19264
19265  if test "x$DSYMUTIL" = x; then
19266    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19267  fi
19268
19269
19270
19271
19272
19273  # Publish this variable in the help.
19274
19275
19276  if test "x$XATTR" = x; then
19277    # The variable is not set by user, try to locate tool using the code snippet
19278    for ac_prog in xattr
19279do
19280  # Extract the first word of "$ac_prog", so it can be a program name with args.
19281set dummy $ac_prog; ac_word=$2
19282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19283$as_echo_n "checking for $ac_word... " >&6; }
19284if ${ac_cv_path_XATTR+:} false; then :
19285  $as_echo_n "(cached) " >&6
19286else
19287  case $XATTR in
19288  [\\/]* | ?:[\\/]*)
19289  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19290  ;;
19291  *)
19292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19293for as_dir in $PATH
19294do
19295  IFS=$as_save_IFS
19296  test -z "$as_dir" && as_dir=.
19297    for ac_exec_ext in '' $ac_executable_extensions; do
19298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19299    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19301    break 2
19302  fi
19303done
19304  done
19305IFS=$as_save_IFS
19306
19307  ;;
19308esac
19309fi
19310XATTR=$ac_cv_path_XATTR
19311if test -n "$XATTR"; then
19312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19313$as_echo "$XATTR" >&6; }
19314else
19315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19316$as_echo "no" >&6; }
19317fi
19318
19319
19320  test -n "$XATTR" && break
19321done
19322
19323  else
19324    # The variable is set, but is it from the command line or the environment?
19325
19326    # Try to remove the string !XATTR! from our list.
19327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19329      # If it failed, the variable was not from the command line. Ignore it,
19330      # but warn the user (except for BASH, which is always set by the calling BASH).
19331      if test "xXATTR" != xBASH; then
19332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19333$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19334      fi
19335      # Try to locate tool using the code snippet
19336      for ac_prog in xattr
19337do
19338  # Extract the first word of "$ac_prog", so it can be a program name with args.
19339set dummy $ac_prog; ac_word=$2
19340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19341$as_echo_n "checking for $ac_word... " >&6; }
19342if ${ac_cv_path_XATTR+:} false; then :
19343  $as_echo_n "(cached) " >&6
19344else
19345  case $XATTR in
19346  [\\/]* | ?:[\\/]*)
19347  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19348  ;;
19349  *)
19350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19351for as_dir in $PATH
19352do
19353  IFS=$as_save_IFS
19354  test -z "$as_dir" && as_dir=.
19355    for ac_exec_ext in '' $ac_executable_extensions; do
19356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19357    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19359    break 2
19360  fi
19361done
19362  done
19363IFS=$as_save_IFS
19364
19365  ;;
19366esac
19367fi
19368XATTR=$ac_cv_path_XATTR
19369if test -n "$XATTR"; then
19370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19371$as_echo "$XATTR" >&6; }
19372else
19373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19374$as_echo "no" >&6; }
19375fi
19376
19377
19378  test -n "$XATTR" && break
19379done
19380
19381    else
19382      # If it succeeded, then it was overridden by the user. We will use it
19383      # for the tool.
19384
19385      # First remove it from the list of overridden variables, so we can test
19386      # for unknown variables in the end.
19387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19388
19389      # Check if the provided tool contains a complete path.
19390      tool_specified="$XATTR"
19391      tool_basename="${tool_specified##*/}"
19392      if test "x$tool_basename" = "x$tool_specified"; then
19393        # A command without a complete path is provided, search $PATH.
19394        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19395$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19396        # Extract the first word of "$tool_basename", so it can be a program name with args.
19397set dummy $tool_basename; ac_word=$2
19398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19399$as_echo_n "checking for $ac_word... " >&6; }
19400if ${ac_cv_path_XATTR+:} false; then :
19401  $as_echo_n "(cached) " >&6
19402else
19403  case $XATTR in
19404  [\\/]* | ?:[\\/]*)
19405  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19406  ;;
19407  *)
19408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19409for as_dir in $PATH
19410do
19411  IFS=$as_save_IFS
19412  test -z "$as_dir" && as_dir=.
19413    for ac_exec_ext in '' $ac_executable_extensions; do
19414  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19415    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19416    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19417    break 2
19418  fi
19419done
19420  done
19421IFS=$as_save_IFS
19422
19423  ;;
19424esac
19425fi
19426XATTR=$ac_cv_path_XATTR
19427if test -n "$XATTR"; then
19428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19429$as_echo "$XATTR" >&6; }
19430else
19431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19432$as_echo "no" >&6; }
19433fi
19434
19435
19436        if test "x$XATTR" = x; then
19437          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19438        fi
19439      else
19440        # Otherwise we believe it is a complete path. Use it as it is.
19441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19442$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19443        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19444$as_echo_n "checking for XATTR... " >&6; }
19445        if test ! -x "$tool_specified"; then
19446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19447$as_echo "not found" >&6; }
19448          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19449        fi
19450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19451$as_echo "$tool_specified" >&6; }
19452      fi
19453    fi
19454  fi
19455
19456
19457
19458  if test "x$XATTR" = x; then
19459    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19460  fi
19461
19462
19463
19464
19465  # Publish this variable in the help.
19466
19467
19468  if test "x$CODESIGN" = x; then
19469    # The variable is not set by user, try to locate tool using the code snippet
19470    for ac_prog in codesign
19471do
19472  # Extract the first word of "$ac_prog", so it can be a program name with args.
19473set dummy $ac_prog; ac_word=$2
19474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19475$as_echo_n "checking for $ac_word... " >&6; }
19476if ${ac_cv_path_CODESIGN+:} false; then :
19477  $as_echo_n "(cached) " >&6
19478else
19479  case $CODESIGN in
19480  [\\/]* | ?:[\\/]*)
19481  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19482  ;;
19483  *)
19484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19485for as_dir in $PATH
19486do
19487  IFS=$as_save_IFS
19488  test -z "$as_dir" && as_dir=.
19489    for ac_exec_ext in '' $ac_executable_extensions; do
19490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19491    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19493    break 2
19494  fi
19495done
19496  done
19497IFS=$as_save_IFS
19498
19499  ;;
19500esac
19501fi
19502CODESIGN=$ac_cv_path_CODESIGN
19503if test -n "$CODESIGN"; then
19504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19505$as_echo "$CODESIGN" >&6; }
19506else
19507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19508$as_echo "no" >&6; }
19509fi
19510
19511
19512  test -n "$CODESIGN" && break
19513done
19514
19515  else
19516    # The variable is set, but is it from the command line or the environment?
19517
19518    # Try to remove the string !CODESIGN! from our list.
19519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19521      # If it failed, the variable was not from the command line. Ignore it,
19522      # but warn the user (except for BASH, which is always set by the calling BASH).
19523      if test "xCODESIGN" != xBASH; then
19524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19525$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19526      fi
19527      # Try to locate tool using the code snippet
19528      for ac_prog in codesign
19529do
19530  # Extract the first word of "$ac_prog", so it can be a program name with args.
19531set dummy $ac_prog; ac_word=$2
19532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19533$as_echo_n "checking for $ac_word... " >&6; }
19534if ${ac_cv_path_CODESIGN+:} false; then :
19535  $as_echo_n "(cached) " >&6
19536else
19537  case $CODESIGN in
19538  [\\/]* | ?:[\\/]*)
19539  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19540  ;;
19541  *)
19542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19543for as_dir in $PATH
19544do
19545  IFS=$as_save_IFS
19546  test -z "$as_dir" && as_dir=.
19547    for ac_exec_ext in '' $ac_executable_extensions; do
19548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19549    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19551    break 2
19552  fi
19553done
19554  done
19555IFS=$as_save_IFS
19556
19557  ;;
19558esac
19559fi
19560CODESIGN=$ac_cv_path_CODESIGN
19561if test -n "$CODESIGN"; then
19562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19563$as_echo "$CODESIGN" >&6; }
19564else
19565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19566$as_echo "no" >&6; }
19567fi
19568
19569
19570  test -n "$CODESIGN" && break
19571done
19572
19573    else
19574      # If it succeeded, then it was overridden by the user. We will use it
19575      # for the tool.
19576
19577      # First remove it from the list of overridden variables, so we can test
19578      # for unknown variables in the end.
19579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19580
19581      # Check if the provided tool contains a complete path.
19582      tool_specified="$CODESIGN"
19583      tool_basename="${tool_specified##*/}"
19584      if test "x$tool_basename" = "x$tool_specified"; then
19585        # A command without a complete path is provided, search $PATH.
19586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19587$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19588        # Extract the first word of "$tool_basename", so it can be a program name with args.
19589set dummy $tool_basename; ac_word=$2
19590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19591$as_echo_n "checking for $ac_word... " >&6; }
19592if ${ac_cv_path_CODESIGN+:} false; then :
19593  $as_echo_n "(cached) " >&6
19594else
19595  case $CODESIGN in
19596  [\\/]* | ?:[\\/]*)
19597  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19598  ;;
19599  *)
19600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19601for as_dir in $PATH
19602do
19603  IFS=$as_save_IFS
19604  test -z "$as_dir" && as_dir=.
19605    for ac_exec_ext in '' $ac_executable_extensions; do
19606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19607    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19609    break 2
19610  fi
19611done
19612  done
19613IFS=$as_save_IFS
19614
19615  ;;
19616esac
19617fi
19618CODESIGN=$ac_cv_path_CODESIGN
19619if test -n "$CODESIGN"; then
19620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19621$as_echo "$CODESIGN" >&6; }
19622else
19623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19624$as_echo "no" >&6; }
19625fi
19626
19627
19628        if test "x$CODESIGN" = x; then
19629          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19630        fi
19631      else
19632        # Otherwise we believe it is a complete path. Use it as it is.
19633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19634$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19636$as_echo_n "checking for CODESIGN... " >&6; }
19637        if test ! -x "$tool_specified"; then
19638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19639$as_echo "not found" >&6; }
19640          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19641        fi
19642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19643$as_echo "$tool_specified" >&6; }
19644      fi
19645    fi
19646  fi
19647
19648
19649    if test "x$CODESIGN" != "x"; then
19650      # Verify that the openjdk_codesign certificate is present
19651      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19652$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19653      rm -f codesign-testfile
19654      touch codesign-testfile
19655      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19656      rm -f codesign-testfile
19657      if test "x$CODESIGN" = x; then
19658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19659$as_echo "no" >&6; }
19660      else
19661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19662$as_echo "yes" >&6; }
19663      fi
19664    fi
19665
19666
19667
19668  # Publish this variable in the help.
19669
19670
19671  if test "x$SETFILE" = x; then
19672    # The variable is not set by user, try to locate tool using the code snippet
19673    for ac_prog in SetFile
19674do
19675  # Extract the first word of "$ac_prog", so it can be a program name with args.
19676set dummy $ac_prog; ac_word=$2
19677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19678$as_echo_n "checking for $ac_word... " >&6; }
19679if ${ac_cv_path_SETFILE+:} false; then :
19680  $as_echo_n "(cached) " >&6
19681else
19682  case $SETFILE in
19683  [\\/]* | ?:[\\/]*)
19684  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19685  ;;
19686  *)
19687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19688for as_dir in $PATH
19689do
19690  IFS=$as_save_IFS
19691  test -z "$as_dir" && as_dir=.
19692    for ac_exec_ext in '' $ac_executable_extensions; do
19693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19694    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19696    break 2
19697  fi
19698done
19699  done
19700IFS=$as_save_IFS
19701
19702  ;;
19703esac
19704fi
19705SETFILE=$ac_cv_path_SETFILE
19706if test -n "$SETFILE"; then
19707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19708$as_echo "$SETFILE" >&6; }
19709else
19710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19711$as_echo "no" >&6; }
19712fi
19713
19714
19715  test -n "$SETFILE" && break
19716done
19717
19718  else
19719    # The variable is set, but is it from the command line or the environment?
19720
19721    # Try to remove the string !SETFILE! from our list.
19722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19724      # If it failed, the variable was not from the command line. Ignore it,
19725      # but warn the user (except for BASH, which is always set by the calling BASH).
19726      if test "xSETFILE" != xBASH; then
19727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19728$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19729      fi
19730      # Try to locate tool using the code snippet
19731      for ac_prog in SetFile
19732do
19733  # Extract the first word of "$ac_prog", so it can be a program name with args.
19734set dummy $ac_prog; ac_word=$2
19735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19736$as_echo_n "checking for $ac_word... " >&6; }
19737if ${ac_cv_path_SETFILE+:} false; then :
19738  $as_echo_n "(cached) " >&6
19739else
19740  case $SETFILE in
19741  [\\/]* | ?:[\\/]*)
19742  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19743  ;;
19744  *)
19745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19746for as_dir in $PATH
19747do
19748  IFS=$as_save_IFS
19749  test -z "$as_dir" && as_dir=.
19750    for ac_exec_ext in '' $ac_executable_extensions; do
19751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19752    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19754    break 2
19755  fi
19756done
19757  done
19758IFS=$as_save_IFS
19759
19760  ;;
19761esac
19762fi
19763SETFILE=$ac_cv_path_SETFILE
19764if test -n "$SETFILE"; then
19765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19766$as_echo "$SETFILE" >&6; }
19767else
19768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19769$as_echo "no" >&6; }
19770fi
19771
19772
19773  test -n "$SETFILE" && break
19774done
19775
19776    else
19777      # If it succeeded, then it was overridden by the user. We will use it
19778      # for the tool.
19779
19780      # First remove it from the list of overridden variables, so we can test
19781      # for unknown variables in the end.
19782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19783
19784      # Check if the provided tool contains a complete path.
19785      tool_specified="$SETFILE"
19786      tool_basename="${tool_specified##*/}"
19787      if test "x$tool_basename" = "x$tool_specified"; then
19788        # A command without a complete path is provided, search $PATH.
19789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19790$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19791        # Extract the first word of "$tool_basename", so it can be a program name with args.
19792set dummy $tool_basename; ac_word=$2
19793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19794$as_echo_n "checking for $ac_word... " >&6; }
19795if ${ac_cv_path_SETFILE+:} false; then :
19796  $as_echo_n "(cached) " >&6
19797else
19798  case $SETFILE in
19799  [\\/]* | ?:[\\/]*)
19800  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19801  ;;
19802  *)
19803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19804for as_dir in $PATH
19805do
19806  IFS=$as_save_IFS
19807  test -z "$as_dir" && as_dir=.
19808    for ac_exec_ext in '' $ac_executable_extensions; do
19809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19810    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19812    break 2
19813  fi
19814done
19815  done
19816IFS=$as_save_IFS
19817
19818  ;;
19819esac
19820fi
19821SETFILE=$ac_cv_path_SETFILE
19822if test -n "$SETFILE"; then
19823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19824$as_echo "$SETFILE" >&6; }
19825else
19826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19827$as_echo "no" >&6; }
19828fi
19829
19830
19831        if test "x$SETFILE" = x; then
19832          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19833        fi
19834      else
19835        # Otherwise we believe it is a complete path. Use it as it is.
19836        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19837$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19839$as_echo_n "checking for SETFILE... " >&6; }
19840        if test ! -x "$tool_specified"; then
19841          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19842$as_echo "not found" >&6; }
19843          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19844        fi
19845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19846$as_echo "$tool_specified" >&6; }
19847      fi
19848    fi
19849  fi
19850
19851
19852
19853  if test "x$SETFILE" = x; then
19854    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19855  fi
19856
19857
19858  fi
19859
19860
19861  # Test if bash supports pipefail.
19862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19863$as_echo_n "checking if bash supports pipefail... " >&6; }
19864  if ${BASH} -c 'set -o pipefail'; then
19865    BASH_ARGS="$BASH_ARGS -o pipefail"
19866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19867$as_echo "yes" >&6; }
19868  else
19869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19870$as_echo "no" >&6; }
19871  fi
19872
19873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19874$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19875  if ${BASH} -e -c 'true'; then
19876    BASH_ARGS="$BASH_ARGS -e"
19877    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19878$as_echo "yes" >&6; }
19879  else
19880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19881$as_echo "no" >&6; }
19882  fi
19883
19884
19885
19886
19887# Check if pkg-config is available.
19888
19889
19890if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19891	if test -n "$ac_tool_prefix"; then
19892  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19893set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19895$as_echo_n "checking for $ac_word... " >&6; }
19896if ${ac_cv_path_PKG_CONFIG+:} false; then :
19897  $as_echo_n "(cached) " >&6
19898else
19899  case $PKG_CONFIG in
19900  [\\/]* | ?:[\\/]*)
19901  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19902  ;;
19903  *)
19904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19905for as_dir in $PATH
19906do
19907  IFS=$as_save_IFS
19908  test -z "$as_dir" && as_dir=.
19909    for ac_exec_ext in '' $ac_executable_extensions; do
19910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19911    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19913    break 2
19914  fi
19915done
19916  done
19917IFS=$as_save_IFS
19918
19919  ;;
19920esac
19921fi
19922PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19923if test -n "$PKG_CONFIG"; then
19924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19925$as_echo "$PKG_CONFIG" >&6; }
19926else
19927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19928$as_echo "no" >&6; }
19929fi
19930
19931
19932fi
19933if test -z "$ac_cv_path_PKG_CONFIG"; then
19934  ac_pt_PKG_CONFIG=$PKG_CONFIG
19935  # Extract the first word of "pkg-config", so it can be a program name with args.
19936set dummy pkg-config; ac_word=$2
19937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19938$as_echo_n "checking for $ac_word... " >&6; }
19939if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19940  $as_echo_n "(cached) " >&6
19941else
19942  case $ac_pt_PKG_CONFIG in
19943  [\\/]* | ?:[\\/]*)
19944  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19945  ;;
19946  *)
19947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19948for as_dir in $PATH
19949do
19950  IFS=$as_save_IFS
19951  test -z "$as_dir" && as_dir=.
19952    for ac_exec_ext in '' $ac_executable_extensions; do
19953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19954    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19956    break 2
19957  fi
19958done
19959  done
19960IFS=$as_save_IFS
19961
19962  ;;
19963esac
19964fi
19965ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19966if test -n "$ac_pt_PKG_CONFIG"; then
19967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19968$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19969else
19970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19971$as_echo "no" >&6; }
19972fi
19973
19974  if test "x$ac_pt_PKG_CONFIG" = x; then
19975    PKG_CONFIG=""
19976  else
19977    case $cross_compiling:$ac_tool_warned in
19978yes:)
19979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19981ac_tool_warned=yes ;;
19982esac
19983    PKG_CONFIG=$ac_pt_PKG_CONFIG
19984  fi
19985else
19986  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19987fi
19988
19989fi
19990if test -n "$PKG_CONFIG"; then
19991	_pkg_min_version=0.9.0
19992	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19993$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19994	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19995		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19996$as_echo "yes" >&6; }
19997	else
19998		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19999$as_echo "no" >&6; }
20000		PKG_CONFIG=""
20001	fi
20002
20003fi
20004
20005# After basic tools have been setup, we can check build os specific details.
20006
20007  ###############################################################################
20008
20009  # Note that this is the build platform OS version!
20010
20011  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
20012  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
20013  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
20014  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
20015
20016
20017
20018
20019
20020# Setup builddeps, for automatic downloading of tools we need.
20021# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
20022# boot-jdk setup, but we need to have basic tools setup first.
20023
20024
20025# Check whether --with-builddeps-conf was given.
20026if test "${with_builddeps_conf+set}" = set; then :
20027  withval=$with_builddeps_conf;
20028fi
20029
20030
20031
20032# Check whether --with-builddeps-server was given.
20033if test "${with_builddeps_server+set}" = set; then :
20034  withval=$with_builddeps_server;
20035fi
20036
20037
20038
20039# Check whether --with-builddeps-dir was given.
20040if test "${with_builddeps_dir+set}" = set; then :
20041  withval=$with_builddeps_dir;
20042else
20043  with_builddeps_dir=/localhome/builddeps
20044fi
20045
20046
20047
20048# Check whether --with-builddeps-group was given.
20049if test "${with_builddeps_group+set}" = set; then :
20050  withval=$with_builddeps_group;
20051fi
20052
20053
20054
20055
20056  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20057    if test "x$with_builddeps_conf" != x; then
20058      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
20059$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
20060      builddepsfile=$with_builddeps_conf
20061      if test -s $builddepsfile; then
20062        . $builddepsfile
20063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
20064$as_echo "loaded!" >&6; }
20065      else
20066        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
20067      fi
20068    else
20069      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
20070$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
20071      builddepsfile=`mktemp`
20072      touch $builddepsfile
20073      # Put all found confs into a single file.
20074      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
20075      # Source the file to acquire the variables
20076      if test -s $builddepsfile; then
20077        . $builddepsfile
20078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
20079$as_echo "found at least one!" >&6; }
20080      else
20081        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
20082      fi
20083    fi
20084    # Create build and target names that use _ instead of "-" and ".".
20085    # This is necessary to use them in variable names.
20086    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20087    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20088    # Extract rewrite information for build and target
20089    eval rewritten_build=\${REWRITE_${build_var}}
20090    if test "x$rewritten_build" = x; then
20091      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
20092      echo Build stays the same $rewritten_build
20093    else
20094      echo Rewriting build for builddeps into $rewritten_build
20095    fi
20096    eval rewritten_target=\${REWRITE_${target_var}}
20097    if test "x$rewritten_target" = x; then
20098      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
20099      echo Target stays the same $rewritten_target
20100    else
20101      echo Rewriting target for builddeps into $rewritten_target
20102    fi
20103    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
20104    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
20105  fi
20106  for ac_prog in 7z unzip
20107do
20108  # Extract the first word of "$ac_prog", so it can be a program name with args.
20109set dummy $ac_prog; ac_word=$2
20110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20111$as_echo_n "checking for $ac_word... " >&6; }
20112if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
20113  $as_echo_n "(cached) " >&6
20114else
20115  if test -n "$BDEPS_UNZIP"; then
20116  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
20117else
20118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20119for as_dir in $PATH
20120do
20121  IFS=$as_save_IFS
20122  test -z "$as_dir" && as_dir=.
20123    for ac_exec_ext in '' $ac_executable_extensions; do
20124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20125    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20127    break 2
20128  fi
20129done
20130  done
20131IFS=$as_save_IFS
20132
20133fi
20134fi
20135BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20136if test -n "$BDEPS_UNZIP"; then
20137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20138$as_echo "$BDEPS_UNZIP" >&6; }
20139else
20140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20141$as_echo "no" >&6; }
20142fi
20143
20144
20145  test -n "$BDEPS_UNZIP" && break
20146done
20147
20148  if test "x$BDEPS_UNZIP" = x7z; then
20149    BDEPS_UNZIP="7z x"
20150  fi
20151
20152  for ac_prog in wget lftp ftp
20153do
20154  # Extract the first word of "$ac_prog", so it can be a program name with args.
20155set dummy $ac_prog; ac_word=$2
20156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20157$as_echo_n "checking for $ac_word... " >&6; }
20158if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20159  $as_echo_n "(cached) " >&6
20160else
20161  if test -n "$BDEPS_FTP"; then
20162  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20163else
20164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20165for as_dir in $PATH
20166do
20167  IFS=$as_save_IFS
20168  test -z "$as_dir" && as_dir=.
20169    for ac_exec_ext in '' $ac_executable_extensions; do
20170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20171    ac_cv_prog_BDEPS_FTP="$ac_prog"
20172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20173    break 2
20174  fi
20175done
20176  done
20177IFS=$as_save_IFS
20178
20179fi
20180fi
20181BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20182if test -n "$BDEPS_FTP"; then
20183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20184$as_echo "$BDEPS_FTP" >&6; }
20185else
20186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20187$as_echo "no" >&6; }
20188fi
20189
20190
20191  test -n "$BDEPS_FTP" && break
20192done
20193
20194
20195
20196###############################################################################
20197#
20198# Determine OpenJDK variants, options and version numbers.
20199#
20200###############################################################################
20201
20202# We need build & target for this.
20203
20204
20205  ###############################################################################
20206  #
20207  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20208  # We always build headless support.
20209  #
20210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20211$as_echo_n "checking headful support... " >&6; }
20212  # Check whether --enable-headful was given.
20213if test "${enable_headful+set}" = set; then :
20214  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20215else
20216  SUPPORT_HEADFUL=yes
20217fi
20218
20219
20220  SUPPORT_HEADLESS=yes
20221  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20222
20223  if test "x$SUPPORT_HEADFUL" = xyes; then
20224    # We are building both headful and headless.
20225    headful_msg="include support for both headful and headless"
20226  fi
20227
20228  if test "x$SUPPORT_HEADFUL" = xno; then
20229    # Thus we are building headless only.
20230    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20231    headful_msg="headless only"
20232  fi
20233
20234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20235$as_echo "$headful_msg" >&6; }
20236
20237
20238
20239
20240
20241  # Control wether Hotspot runs Queens test after build.
20242  # Check whether --enable-hotspot-test-in-build was given.
20243if test "${enable_hotspot_test_in_build+set}" = set; then :
20244  enableval=$enable_hotspot_test_in_build;
20245else
20246  enable_hotspot_test_in_build=no
20247fi
20248
20249  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20250    TEST_IN_BUILD=true
20251  else
20252    TEST_IN_BUILD=false
20253  fi
20254
20255
20256  ###############################################################################
20257  #
20258  # Choose cacerts source file
20259  #
20260
20261# Check whether --with-cacerts-file was given.
20262if test "${with_cacerts_file+set}" = set; then :
20263  withval=$with_cacerts_file;
20264fi
20265
20266  if test "x$with_cacerts_file" != x; then
20267    CACERTS_FILE=$with_cacerts_file
20268  fi
20269
20270
20271  ###############################################################################
20272  #
20273  # Enable or disable unlimited crypto
20274  #
20275  # Check whether --enable-unlimited-crypto was given.
20276if test "${enable_unlimited_crypto+set}" = set; then :
20277  enableval=$enable_unlimited_crypto;
20278else
20279  enable_unlimited_crypto=no
20280fi
20281
20282  if test "x$enable_unlimited_crypto" = "xyes"; then
20283    UNLIMITED_CRYPTO=true
20284  else
20285    UNLIMITED_CRYPTO=false
20286  fi
20287
20288
20289  ###############################################################################
20290  #
20291  # Enable or disable the elliptic curve crypto implementation
20292  #
20293
20294
20295  ###############################################################################
20296  #
20297  # Compress jars
20298  #
20299  COMPRESS_JARS=false
20300
20301
20302
20303
20304  # Source the version numbers
20305  . $AUTOCONF_DIR/version-numbers
20306
20307  # Get the settings from parameters
20308
20309# Check whether --with-milestone was given.
20310if test "${with_milestone+set}" = set; then :
20311  withval=$with_milestone;
20312fi
20313
20314  if test "x$with_milestone" = xyes; then
20315    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20316  elif test "x$with_milestone" != x; then
20317    MILESTONE="$with_milestone"
20318  fi
20319  if test "x$MILESTONE" = x; then
20320    MILESTONE=internal
20321  fi
20322
20323
20324# Check whether --with-update-version was given.
20325if test "${with_update_version+set}" = set; then :
20326  withval=$with_update_version;
20327fi
20328
20329  if test "x$with_update_version" = xyes; then
20330    as_fn_error $? "Update version must have a value" "$LINENO" 5
20331  elif test "x$with_update_version" != x; then
20332    JDK_UPDATE_VERSION="$with_update_version"
20333    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20334    # to a bug in expr (which reduces it to just X). To work around this, we
20335    # always add a 0 to one digit update versions.
20336    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20337      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20338    fi
20339  fi
20340
20341
20342# Check whether --with-user-release-suffix was given.
20343if test "${with_user_release_suffix+set}" = set; then :
20344  withval=$with_user_release_suffix;
20345fi
20346
20347  if test "x$with_user_release_suffix" = xyes; then
20348    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20349  elif test "x$with_user_release_suffix" != x; then
20350    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20351  fi
20352
20353
20354# Check whether --with-build-number was given.
20355if test "${with_build_number+set}" = set; then :
20356  withval=$with_build_number;
20357fi
20358
20359  if test "x$with_build_number" = xyes; then
20360    as_fn_error $? "Build number must have a value" "$LINENO" 5
20361  elif test "x$with_build_number" != x; then
20362    JDK_BUILD_NUMBER="$with_build_number"
20363  fi
20364  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20365  if test "x$JDK_BUILD_NUMBER" = x; then
20366    JDK_BUILD_NUMBER=b00
20367    if test "x$USER_RELEASE_SUFFIX" = x; then
20368      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20369      # Avoid [:alnum:] since it depends on the locale.
20370      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20371      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20372    fi
20373  fi
20374
20375  # Now set the JDK version, milestone, build number etc.
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392# Check whether --with-copyright-year was given.
20393if test "${with_copyright_year+set}" = set; then :
20394  withval=$with_copyright_year;
20395fi
20396
20397  if test "x$with_copyright_year" = xyes; then
20398    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20399  elif test "x$with_copyright_year" != x; then
20400    COPYRIGHT_YEAR="$with_copyright_year"
20401  else
20402    COPYRIGHT_YEAR=`date +'%Y'`
20403  fi
20404
20405
20406  if test "x$JDK_UPDATE_VERSION" != x; then
20407    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20408  else
20409    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20410  fi
20411
20412
20413  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20414
20415
20416
20417###############################################################################
20418#
20419# Setup BootJDK, used to bootstrap the build.
20420#
20421###############################################################################
20422
20423
20424  BOOT_JDK_FOUND=no
20425
20426# Check whether --with-boot-jdk was given.
20427if test "${with_boot_jdk+set}" = set; then :
20428  withval=$with_boot_jdk;
20429fi
20430
20431
20432  # We look for the Boot JDK through various means, going from more certain to
20433  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20434  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20435  # must check if this is indeed valid; otherwise we'll continue looking.
20436
20437  # Test: Is bootjdk explicitely set by command line arguments?
20438
20439  if test "x$BOOT_JDK_FOUND" = xno; then
20440    # Now execute the test
20441
20442  if test "x$with_boot_jdk" != x; then
20443    BOOT_JDK=$with_boot_jdk
20444    BOOT_JDK_FOUND=maybe
20445    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20446$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20447  fi
20448
20449
20450    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20451    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20452      # Do we have a bin/java?
20453      if test ! -x "$BOOT_JDK/bin/java"; then
20454        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20456        BOOT_JDK_FOUND=no
20457      else
20458        # Do we have a bin/javac?
20459        if test ! -x "$BOOT_JDK/bin/javac"; then
20460          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20462          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20463$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20464          BOOT_JDK_FOUND=no
20465        else
20466          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20467          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20468
20469          # Extra M4 quote needed to protect [] in grep expression.
20470          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20471          if test "x$FOUND_CORRECT_VERSION" = x; then
20472            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20474            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20475$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20476            BOOT_JDK_FOUND=no
20477          else
20478            # We're done! :-)
20479            BOOT_JDK_FOUND=yes
20480
20481  # Only process if variable expands to non-empty
20482
20483  if test "x$BOOT_JDK" != x; then
20484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20485
20486  # Input might be given as Windows format, start by converting to
20487  # unix format.
20488  path="$BOOT_JDK"
20489  new_path=`$CYGPATH -u "$path"`
20490
20491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20494  # "foo.exe" is OK but "foo" is an error.
20495  #
20496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20497  # It is also a way to make sure we got the proper file name for the real test later on.
20498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20499  if test "x$test_shortpath" = x; then
20500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20502    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20503  fi
20504
20505  # Call helper function which possibly converts this using DOS-style short mode.
20506  # If so, the updated path is stored in $new_path.
20507
20508  input_path="$new_path"
20509  # Check if we need to convert this using DOS-style short mode. If the path
20510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20511  # take no chances and rewrite it.
20512  # Note: m4 eats our [], so we need to use [ and ] instead.
20513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20514  if test "x$has_forbidden_chars" != x; then
20515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20519      # Going to short mode and back again did indeed matter. Since short mode is
20520      # case insensitive, let's make it lowercase to improve readability.
20521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20522      # Now convert it back to Unix-style (cygpath)
20523      input_path=`$CYGPATH -u "$shortmode_path"`
20524      new_path="$input_path"
20525    fi
20526  fi
20527
20528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20529  if test "x$test_cygdrive_prefix" = x; then
20530    # As a simple fix, exclude /usr/bin since it's not a real path.
20531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20533      # a path prefixed by /cygdrive for fixpath to work.
20534      new_path="$CYGWIN_ROOT_PATH$input_path"
20535    fi
20536  fi
20537
20538
20539  if test "x$path" != "x$new_path"; then
20540    BOOT_JDK="$new_path"
20541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20542$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20543  fi
20544
20545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20546
20547  path="$BOOT_JDK"
20548  has_colon=`$ECHO $path | $GREP ^.:`
20549  new_path="$path"
20550  if test "x$has_colon" = x; then
20551    # Not in mixed or Windows style, start by that.
20552    new_path=`cmd //c echo $path`
20553  fi
20554
20555
20556  input_path="$new_path"
20557  # Check if we need to convert this using DOS-style short mode. If the path
20558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20559  # take no chances and rewrite it.
20560  # Note: m4 eats our [], so we need to use [ and ] instead.
20561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20562  if test "x$has_forbidden_chars" != x; then
20563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20565  fi
20566
20567
20568  windows_path="$new_path"
20569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20570    unix_path=`$CYGPATH -u "$windows_path"`
20571    new_path="$unix_path"
20572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20574    new_path="$unix_path"
20575  fi
20576
20577  if test "x$path" != "x$new_path"; then
20578    BOOT_JDK="$new_path"
20579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20581  fi
20582
20583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20585
20586    else
20587      # We're on a unix platform. Hooray! :)
20588      path="$BOOT_JDK"
20589      has_space=`$ECHO "$path" | $GREP " "`
20590      if test "x$has_space" != x; then
20591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20593        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20594      fi
20595
20596      # Use eval to expand a potential ~
20597      eval path="$path"
20598      if test ! -f "$path" && test ! -d "$path"; then
20599        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20600      fi
20601
20602      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20603    fi
20604  fi
20605
20606            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20607$as_echo_n "checking for Boot JDK... " >&6; }
20608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20609$as_echo "$BOOT_JDK" >&6; }
20610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20611$as_echo_n "checking Boot JDK version... " >&6; }
20612            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20614$as_echo "$BOOT_JDK_VERSION" >&6; }
20615          fi # end check jdk version
20616        fi # end check javac
20617      fi # end check java
20618    fi # end check boot jdk found
20619  fi
20620
20621  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20622    # Having specified an argument which is incorrect will produce an instant failure;
20623    # we should not go on looking
20624    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20625  fi
20626
20627  # Test: Is bootjdk available from builddeps?
20628
20629  if test "x$BOOT_JDK_FOUND" = xno; then
20630    # Now execute the test
20631
20632
20633
20634  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20635    # Source the builddeps file again, to make sure it uses the latest variables!
20636    . $builddepsfile
20637    # Look for a target and build machine specific resource!
20638    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20639    if test "x$resource" = x; then
20640      # Ok, lets instead look for a target specific resource
20641      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20642    fi
20643    if test "x$resource" = x; then
20644      # Ok, lets instead look for a build specific resource
20645      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20646    fi
20647    if test "x$resource" = x; then
20648      # Ok, lets instead look for a generic resource
20649      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20650      resource=${builddep_bootjdk}
20651    fi
20652    if test "x$resource" != x; then
20653      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20654$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20655      # If the resource in the builddeps.conf file is an existing directory,
20656      # for example /java/linux/cups
20657      if test -d ${resource}; then
20658        depdir=${resource}
20659      else
20660
20661  # bootjdk is for example mymodule
20662  # $resource is for example libs/general/libmymod_1_2_3.zip
20663  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20664  # $with_builddeps_dir is for example /localhome/builddeps
20665  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20666  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20667  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20668  filename=`basename $resource`
20669  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20670  filebase=${filename%%.*}
20671  extension=${filename#*.}
20672  installdir=$with_builddeps_dir/$filebase
20673  if test ! -f $installdir/$filename.unpacked; then
20674    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20675$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20676    if test ! -d $installdir; then
20677      mkdir -p $installdir
20678    fi
20679    if test ! -d $installdir; then
20680      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20681    fi
20682    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20683    touch $tmpfile
20684    if test ! -f $tmpfile; then
20685      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20686    fi
20687
20688  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20689  # $tmpfile is the local file name for the downloaded file.
20690  VALID_TOOL=no
20691  if test "x$BDEPS_FTP" = xwget; then
20692    VALID_TOOL=yes
20693    wget -O $tmpfile $with_builddeps_server/$resource
20694  fi
20695  if test "x$BDEPS_FTP" = xlftp; then
20696    VALID_TOOL=yes
20697    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20698  fi
20699  if test "x$BDEPS_FTP" = xftp; then
20700    VALID_TOOL=yes
20701    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20702    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20703    FTPUSERPWD=${FTPSERVER%%@*}
20704    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20705      FTPUSER=${userpwd%%:*}
20706      FTPPWD=${userpwd#*@}
20707      FTPSERVER=${FTPSERVER#*@}
20708    else
20709      FTPUSER=ftp
20710      FTPPWD=ftp
20711    fi
20712    # the "pass" command does not work on some
20713    # ftp clients (read ftp.exe) but if it works,
20714    # passive mode is better!
20715    ( \
20716        echo "user $FTPUSER $FTPPWD"        ; \
20717        echo "pass"                         ; \
20718        echo "bin"                          ; \
20719        echo "get $FTPPATH $tmpfile"              ; \
20720    ) | ftp -in $FTPSERVER
20721  fi
20722  if test "x$VALID_TOOL" != xyes; then
20723    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20724  fi
20725
20726    mv $tmpfile $installdir/$filename
20727    if test ! -s $installdir/$filename; then
20728      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20729    fi
20730    case "$extension" in
20731      zip)  echo "Unzipping $installdir/$filename..."
20732        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20733        ;;
20734      tar.gz) echo "Untaring $installdir/$filename..."
20735        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20736        ;;
20737      tgz) echo "Untaring $installdir/$filename..."
20738        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20739        ;;
20740      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20741        ;;
20742    esac
20743  fi
20744  if test -f $installdir/$filename.unpacked; then
20745    depdir=$installdir
20746  fi
20747
20748      fi
20749      # Source the builddeps file again, because in the previous command, the depdir
20750      # was updated to point at the current build dependency install directory.
20751      . $builddepsfile
20752      # Now extract variables from the builddeps.conf files.
20753      theroot=${builddep_bootjdk_ROOT}
20754      thecflags=${builddep_bootjdk_CFLAGS}
20755      thelibs=${builddep_bootjdk_LIBS}
20756      if test "x$depdir" = x; then
20757        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20758      fi
20759      BOOT_JDK=$depdir
20760      if test "x$theroot" != x; then
20761        BOOT_JDK="$theroot"
20762      fi
20763      if test "x$thecflags" != x; then
20764        BOOT_JDK_CFLAGS="$thecflags"
20765      fi
20766      if test "x$thelibs" != x; then
20767        BOOT_JDK_LIBS="$thelibs"
20768      fi
20769      BOOT_JDK_FOUND=maybe
20770      else BOOT_JDK_FOUND=no
20771
20772    fi
20773    else BOOT_JDK_FOUND=no
20774
20775  fi
20776
20777
20778
20779    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20780    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20781      # Do we have a bin/java?
20782      if test ! -x "$BOOT_JDK/bin/java"; then
20783        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20785        BOOT_JDK_FOUND=no
20786      else
20787        # Do we have a bin/javac?
20788        if test ! -x "$BOOT_JDK/bin/javac"; then
20789          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20791          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20792$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20793          BOOT_JDK_FOUND=no
20794        else
20795          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20796          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20797
20798          # Extra M4 quote needed to protect [] in grep expression.
20799          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20800          if test "x$FOUND_CORRECT_VERSION" = x; then
20801            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20803            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20804$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20805            BOOT_JDK_FOUND=no
20806          else
20807            # We're done! :-)
20808            BOOT_JDK_FOUND=yes
20809
20810  # Only process if variable expands to non-empty
20811
20812  if test "x$BOOT_JDK" != x; then
20813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20814
20815  # Input might be given as Windows format, start by converting to
20816  # unix format.
20817  path="$BOOT_JDK"
20818  new_path=`$CYGPATH -u "$path"`
20819
20820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20823  # "foo.exe" is OK but "foo" is an error.
20824  #
20825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20826  # It is also a way to make sure we got the proper file name for the real test later on.
20827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20828  if test "x$test_shortpath" = x; then
20829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20832  fi
20833
20834  # Call helper function which possibly converts this using DOS-style short mode.
20835  # If so, the updated path is stored in $new_path.
20836
20837  input_path="$new_path"
20838  # Check if we need to convert this using DOS-style short mode. If the path
20839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20840  # take no chances and rewrite it.
20841  # Note: m4 eats our [], so we need to use [ and ] instead.
20842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20843  if test "x$has_forbidden_chars" != x; then
20844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20848      # Going to short mode and back again did indeed matter. Since short mode is
20849      # case insensitive, let's make it lowercase to improve readability.
20850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20851      # Now convert it back to Unix-style (cygpath)
20852      input_path=`$CYGPATH -u "$shortmode_path"`
20853      new_path="$input_path"
20854    fi
20855  fi
20856
20857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20858  if test "x$test_cygdrive_prefix" = x; then
20859    # As a simple fix, exclude /usr/bin since it's not a real path.
20860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20862      # a path prefixed by /cygdrive for fixpath to work.
20863      new_path="$CYGWIN_ROOT_PATH$input_path"
20864    fi
20865  fi
20866
20867
20868  if test "x$path" != "x$new_path"; then
20869    BOOT_JDK="$new_path"
20870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20872  fi
20873
20874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20875
20876  path="$BOOT_JDK"
20877  has_colon=`$ECHO $path | $GREP ^.:`
20878  new_path="$path"
20879  if test "x$has_colon" = x; then
20880    # Not in mixed or Windows style, start by that.
20881    new_path=`cmd //c echo $path`
20882  fi
20883
20884
20885  input_path="$new_path"
20886  # Check if we need to convert this using DOS-style short mode. If the path
20887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20888  # take no chances and rewrite it.
20889  # Note: m4 eats our [], so we need to use [ and ] instead.
20890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20891  if test "x$has_forbidden_chars" != x; then
20892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20894  fi
20895
20896
20897  windows_path="$new_path"
20898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20899    unix_path=`$CYGPATH -u "$windows_path"`
20900    new_path="$unix_path"
20901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20903    new_path="$unix_path"
20904  fi
20905
20906  if test "x$path" != "x$new_path"; then
20907    BOOT_JDK="$new_path"
20908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20910  fi
20911
20912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20914
20915    else
20916      # We're on a unix platform. Hooray! :)
20917      path="$BOOT_JDK"
20918      has_space=`$ECHO "$path" | $GREP " "`
20919      if test "x$has_space" != x; then
20920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20921$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20923      fi
20924
20925      # Use eval to expand a potential ~
20926      eval path="$path"
20927      if test ! -f "$path" && test ! -d "$path"; then
20928        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20929      fi
20930
20931      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20932    fi
20933  fi
20934
20935            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20936$as_echo_n "checking for Boot JDK... " >&6; }
20937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20938$as_echo "$BOOT_JDK" >&6; }
20939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20940$as_echo_n "checking Boot JDK version... " >&6; }
20941            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20943$as_echo "$BOOT_JDK_VERSION" >&6; }
20944          fi # end check jdk version
20945        fi # end check javac
20946      fi # end check java
20947    fi # end check boot jdk found
20948  fi
20949
20950
20951  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20952
20953  if test "x$BOOT_JDK_FOUND" = xno; then
20954    # Now execute the test
20955
20956  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20957    # First check at user selected default
20958
20959  if test "x$BOOT_JDK_FOUND" = xno; then
20960    # Now execute the test
20961
20962  if test -x /usr/libexec/java_home; then
20963    BOOT_JDK=`/usr/libexec/java_home `
20964    BOOT_JDK_FOUND=maybe
20965    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20966$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20967  fi
20968
20969
20970    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20971    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20972      # Do we have a bin/java?
20973      if test ! -x "$BOOT_JDK/bin/java"; then
20974        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20976        BOOT_JDK_FOUND=no
20977      else
20978        # Do we have a bin/javac?
20979        if test ! -x "$BOOT_JDK/bin/javac"; then
20980          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20982          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20983$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20984          BOOT_JDK_FOUND=no
20985        else
20986          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20987          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20988
20989          # Extra M4 quote needed to protect [] in grep expression.
20990          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20991          if test "x$FOUND_CORRECT_VERSION" = x; then
20992            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20994            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20995$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20996            BOOT_JDK_FOUND=no
20997          else
20998            # We're done! :-)
20999            BOOT_JDK_FOUND=yes
21000
21001  # Only process if variable expands to non-empty
21002
21003  if test "x$BOOT_JDK" != x; then
21004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21005
21006  # Input might be given as Windows format, start by converting to
21007  # unix format.
21008  path="$BOOT_JDK"
21009  new_path=`$CYGPATH -u "$path"`
21010
21011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21014  # "foo.exe" is OK but "foo" is an error.
21015  #
21016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21017  # It is also a way to make sure we got the proper file name for the real test later on.
21018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21019  if test "x$test_shortpath" = x; then
21020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21021$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21022    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21023  fi
21024
21025  # Call helper function which possibly converts this using DOS-style short mode.
21026  # If so, the updated path is stored in $new_path.
21027
21028  input_path="$new_path"
21029  # Check if we need to convert this using DOS-style short mode. If the path
21030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21031  # take no chances and rewrite it.
21032  # Note: m4 eats our [], so we need to use [ and ] instead.
21033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21034  if test "x$has_forbidden_chars" != x; then
21035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21039      # Going to short mode and back again did indeed matter. Since short mode is
21040      # case insensitive, let's make it lowercase to improve readability.
21041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21042      # Now convert it back to Unix-style (cygpath)
21043      input_path=`$CYGPATH -u "$shortmode_path"`
21044      new_path="$input_path"
21045    fi
21046  fi
21047
21048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21049  if test "x$test_cygdrive_prefix" = x; then
21050    # As a simple fix, exclude /usr/bin since it's not a real path.
21051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21053      # a path prefixed by /cygdrive for fixpath to work.
21054      new_path="$CYGWIN_ROOT_PATH$input_path"
21055    fi
21056  fi
21057
21058
21059  if test "x$path" != "x$new_path"; then
21060    BOOT_JDK="$new_path"
21061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21063  fi
21064
21065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21066
21067  path="$BOOT_JDK"
21068  has_colon=`$ECHO $path | $GREP ^.:`
21069  new_path="$path"
21070  if test "x$has_colon" = x; then
21071    # Not in mixed or Windows style, start by that.
21072    new_path=`cmd //c echo $path`
21073  fi
21074
21075
21076  input_path="$new_path"
21077  # Check if we need to convert this using DOS-style short mode. If the path
21078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21079  # take no chances and rewrite it.
21080  # Note: m4 eats our [], so we need to use [ and ] instead.
21081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21082  if test "x$has_forbidden_chars" != x; then
21083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21085  fi
21086
21087
21088  windows_path="$new_path"
21089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21090    unix_path=`$CYGPATH -u "$windows_path"`
21091    new_path="$unix_path"
21092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21094    new_path="$unix_path"
21095  fi
21096
21097  if test "x$path" != "x$new_path"; then
21098    BOOT_JDK="$new_path"
21099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21100$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21101  fi
21102
21103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21105
21106    else
21107      # We're on a unix platform. Hooray! :)
21108      path="$BOOT_JDK"
21109      has_space=`$ECHO "$path" | $GREP " "`
21110      if test "x$has_space" != x; then
21111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21114      fi
21115
21116      # Use eval to expand a potential ~
21117      eval path="$path"
21118      if test ! -f "$path" && test ! -d "$path"; then
21119        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21120      fi
21121
21122      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21123    fi
21124  fi
21125
21126            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21127$as_echo_n "checking for Boot JDK... " >&6; }
21128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21129$as_echo "$BOOT_JDK" >&6; }
21130            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21131$as_echo_n "checking Boot JDK version... " >&6; }
21132            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21134$as_echo "$BOOT_JDK_VERSION" >&6; }
21135          fi # end check jdk version
21136        fi # end check javac
21137      fi # end check java
21138    fi # end check boot jdk found
21139  fi
21140
21141    # If that did not work out (e.g. too old), try explicit versions instead
21142
21143  if test "x$BOOT_JDK_FOUND" = xno; then
21144    # Now execute the test
21145
21146  if test -x /usr/libexec/java_home; then
21147    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21148    BOOT_JDK_FOUND=maybe
21149    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21150$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21151  fi
21152
21153
21154    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21155    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21156      # Do we have a bin/java?
21157      if test ! -x "$BOOT_JDK/bin/java"; then
21158        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21160        BOOT_JDK_FOUND=no
21161      else
21162        # Do we have a bin/javac?
21163        if test ! -x "$BOOT_JDK/bin/javac"; then
21164          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21166          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21167$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21168          BOOT_JDK_FOUND=no
21169        else
21170          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21171          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21172
21173          # Extra M4 quote needed to protect [] in grep expression.
21174          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21175          if test "x$FOUND_CORRECT_VERSION" = x; then
21176            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21178            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21179$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21180            BOOT_JDK_FOUND=no
21181          else
21182            # We're done! :-)
21183            BOOT_JDK_FOUND=yes
21184
21185  # Only process if variable expands to non-empty
21186
21187  if test "x$BOOT_JDK" != x; then
21188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21189
21190  # Input might be given as Windows format, start by converting to
21191  # unix format.
21192  path="$BOOT_JDK"
21193  new_path=`$CYGPATH -u "$path"`
21194
21195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21198  # "foo.exe" is OK but "foo" is an error.
21199  #
21200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21201  # It is also a way to make sure we got the proper file name for the real test later on.
21202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21203  if test "x$test_shortpath" = x; then
21204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21205$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21206    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21207  fi
21208
21209  # Call helper function which possibly converts this using DOS-style short mode.
21210  # If so, the updated path is stored in $new_path.
21211
21212  input_path="$new_path"
21213  # Check if we need to convert this using DOS-style short mode. If the path
21214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21215  # take no chances and rewrite it.
21216  # Note: m4 eats our [], so we need to use [ and ] instead.
21217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21218  if test "x$has_forbidden_chars" != x; then
21219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21223      # Going to short mode and back again did indeed matter. Since short mode is
21224      # case insensitive, let's make it lowercase to improve readability.
21225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21226      # Now convert it back to Unix-style (cygpath)
21227      input_path=`$CYGPATH -u "$shortmode_path"`
21228      new_path="$input_path"
21229    fi
21230  fi
21231
21232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21233  if test "x$test_cygdrive_prefix" = x; then
21234    # As a simple fix, exclude /usr/bin since it's not a real path.
21235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21237      # a path prefixed by /cygdrive for fixpath to work.
21238      new_path="$CYGWIN_ROOT_PATH$input_path"
21239    fi
21240  fi
21241
21242
21243  if test "x$path" != "x$new_path"; then
21244    BOOT_JDK="$new_path"
21245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21247  fi
21248
21249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21250
21251  path="$BOOT_JDK"
21252  has_colon=`$ECHO $path | $GREP ^.:`
21253  new_path="$path"
21254  if test "x$has_colon" = x; then
21255    # Not in mixed or Windows style, start by that.
21256    new_path=`cmd //c echo $path`
21257  fi
21258
21259
21260  input_path="$new_path"
21261  # Check if we need to convert this using DOS-style short mode. If the path
21262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21263  # take no chances and rewrite it.
21264  # Note: m4 eats our [], so we need to use [ and ] instead.
21265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21266  if test "x$has_forbidden_chars" != x; then
21267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21269  fi
21270
21271
21272  windows_path="$new_path"
21273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21274    unix_path=`$CYGPATH -u "$windows_path"`
21275    new_path="$unix_path"
21276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21278    new_path="$unix_path"
21279  fi
21280
21281  if test "x$path" != "x$new_path"; then
21282    BOOT_JDK="$new_path"
21283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21285  fi
21286
21287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21289
21290    else
21291      # We're on a unix platform. Hooray! :)
21292      path="$BOOT_JDK"
21293      has_space=`$ECHO "$path" | $GREP " "`
21294      if test "x$has_space" != x; then
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21298      fi
21299
21300      # Use eval to expand a potential ~
21301      eval path="$path"
21302      if test ! -f "$path" && test ! -d "$path"; then
21303        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21304      fi
21305
21306      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21307    fi
21308  fi
21309
21310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21311$as_echo_n "checking for Boot JDK... " >&6; }
21312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21313$as_echo "$BOOT_JDK" >&6; }
21314            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21315$as_echo_n "checking Boot JDK version... " >&6; }
21316            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21318$as_echo "$BOOT_JDK_VERSION" >&6; }
21319          fi # end check jdk version
21320        fi # end check javac
21321      fi # end check java
21322    fi # end check boot jdk found
21323  fi
21324
21325
21326  if test "x$BOOT_JDK_FOUND" = xno; then
21327    # Now execute the test
21328
21329  if test -x /usr/libexec/java_home; then
21330    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21331    BOOT_JDK_FOUND=maybe
21332    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21333$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21334  fi
21335
21336
21337    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21338    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21339      # Do we have a bin/java?
21340      if test ! -x "$BOOT_JDK/bin/java"; then
21341        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21343        BOOT_JDK_FOUND=no
21344      else
21345        # Do we have a bin/javac?
21346        if test ! -x "$BOOT_JDK/bin/javac"; then
21347          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21349          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21350$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21351          BOOT_JDK_FOUND=no
21352        else
21353          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21354          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21355
21356          # Extra M4 quote needed to protect [] in grep expression.
21357          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21358          if test "x$FOUND_CORRECT_VERSION" = x; then
21359            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21360$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21361            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21362$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21363            BOOT_JDK_FOUND=no
21364          else
21365            # We're done! :-)
21366            BOOT_JDK_FOUND=yes
21367
21368  # Only process if variable expands to non-empty
21369
21370  if test "x$BOOT_JDK" != x; then
21371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21372
21373  # Input might be given as Windows format, start by converting to
21374  # unix format.
21375  path="$BOOT_JDK"
21376  new_path=`$CYGPATH -u "$path"`
21377
21378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21381  # "foo.exe" is OK but "foo" is an error.
21382  #
21383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21384  # It is also a way to make sure we got the proper file name for the real test later on.
21385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21386  if test "x$test_shortpath" = x; then
21387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21389    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21390  fi
21391
21392  # Call helper function which possibly converts this using DOS-style short mode.
21393  # If so, the updated path is stored in $new_path.
21394
21395  input_path="$new_path"
21396  # Check if we need to convert this using DOS-style short mode. If the path
21397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21398  # take no chances and rewrite it.
21399  # Note: m4 eats our [], so we need to use [ and ] instead.
21400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21401  if test "x$has_forbidden_chars" != x; then
21402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21406      # Going to short mode and back again did indeed matter. Since short mode is
21407      # case insensitive, let's make it lowercase to improve readability.
21408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21409      # Now convert it back to Unix-style (cygpath)
21410      input_path=`$CYGPATH -u "$shortmode_path"`
21411      new_path="$input_path"
21412    fi
21413  fi
21414
21415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21416  if test "x$test_cygdrive_prefix" = x; then
21417    # As a simple fix, exclude /usr/bin since it's not a real path.
21418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21420      # a path prefixed by /cygdrive for fixpath to work.
21421      new_path="$CYGWIN_ROOT_PATH$input_path"
21422    fi
21423  fi
21424
21425
21426  if test "x$path" != "x$new_path"; then
21427    BOOT_JDK="$new_path"
21428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21429$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21430  fi
21431
21432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21433
21434  path="$BOOT_JDK"
21435  has_colon=`$ECHO $path | $GREP ^.:`
21436  new_path="$path"
21437  if test "x$has_colon" = x; then
21438    # Not in mixed or Windows style, start by that.
21439    new_path=`cmd //c echo $path`
21440  fi
21441
21442
21443  input_path="$new_path"
21444  # Check if we need to convert this using DOS-style short mode. If the path
21445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21446  # take no chances and rewrite it.
21447  # Note: m4 eats our [], so we need to use [ and ] instead.
21448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21449  if test "x$has_forbidden_chars" != x; then
21450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21452  fi
21453
21454
21455  windows_path="$new_path"
21456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21457    unix_path=`$CYGPATH -u "$windows_path"`
21458    new_path="$unix_path"
21459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21461    new_path="$unix_path"
21462  fi
21463
21464  if test "x$path" != "x$new_path"; then
21465    BOOT_JDK="$new_path"
21466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21468  fi
21469
21470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21472
21473    else
21474      # We're on a unix platform. Hooray! :)
21475      path="$BOOT_JDK"
21476      has_space=`$ECHO "$path" | $GREP " "`
21477      if test "x$has_space" != x; then
21478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21479$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21480        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21481      fi
21482
21483      # Use eval to expand a potential ~
21484      eval path="$path"
21485      if test ! -f "$path" && test ! -d "$path"; then
21486        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21487      fi
21488
21489      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21490    fi
21491  fi
21492
21493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21494$as_echo_n "checking for Boot JDK... " >&6; }
21495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21496$as_echo "$BOOT_JDK" >&6; }
21497            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21498$as_echo_n "checking Boot JDK version... " >&6; }
21499            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21501$as_echo "$BOOT_JDK_VERSION" >&6; }
21502          fi # end check jdk version
21503        fi # end check javac
21504      fi # end check java
21505    fi # end check boot jdk found
21506  fi
21507
21508
21509  if test "x$BOOT_JDK_FOUND" = xno; then
21510    # Now execute the test
21511
21512  if test -x /usr/libexec/java_home; then
21513    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21514    BOOT_JDK_FOUND=maybe
21515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21516$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21517  fi
21518
21519
21520    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21521    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21522      # Do we have a bin/java?
21523      if test ! -x "$BOOT_JDK/bin/java"; then
21524        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21526        BOOT_JDK_FOUND=no
21527      else
21528        # Do we have a bin/javac?
21529        if test ! -x "$BOOT_JDK/bin/javac"; then
21530          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21531$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21532          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21533$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21534          BOOT_JDK_FOUND=no
21535        else
21536          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21537          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21538
21539          # Extra M4 quote needed to protect [] in grep expression.
21540          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21541          if test "x$FOUND_CORRECT_VERSION" = x; then
21542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21544            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21545$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21546            BOOT_JDK_FOUND=no
21547          else
21548            # We're done! :-)
21549            BOOT_JDK_FOUND=yes
21550
21551  # Only process if variable expands to non-empty
21552
21553  if test "x$BOOT_JDK" != x; then
21554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21555
21556  # Input might be given as Windows format, start by converting to
21557  # unix format.
21558  path="$BOOT_JDK"
21559  new_path=`$CYGPATH -u "$path"`
21560
21561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21564  # "foo.exe" is OK but "foo" is an error.
21565  #
21566  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21567  # It is also a way to make sure we got the proper file name for the real test later on.
21568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21569  if test "x$test_shortpath" = x; then
21570    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21572    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21573  fi
21574
21575  # Call helper function which possibly converts this using DOS-style short mode.
21576  # If so, the updated path is stored in $new_path.
21577
21578  input_path="$new_path"
21579  # Check if we need to convert this using DOS-style short mode. If the path
21580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21581  # take no chances and rewrite it.
21582  # Note: m4 eats our [], so we need to use [ and ] instead.
21583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21584  if test "x$has_forbidden_chars" != x; then
21585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21586    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21587    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21588    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21589      # Going to short mode and back again did indeed matter. Since short mode is
21590      # case insensitive, let's make it lowercase to improve readability.
21591      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21592      # Now convert it back to Unix-style (cygpath)
21593      input_path=`$CYGPATH -u "$shortmode_path"`
21594      new_path="$input_path"
21595    fi
21596  fi
21597
21598  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21599  if test "x$test_cygdrive_prefix" = x; then
21600    # As a simple fix, exclude /usr/bin since it's not a real path.
21601    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21602      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21603      # a path prefixed by /cygdrive for fixpath to work.
21604      new_path="$CYGWIN_ROOT_PATH$input_path"
21605    fi
21606  fi
21607
21608
21609  if test "x$path" != "x$new_path"; then
21610    BOOT_JDK="$new_path"
21611    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21612$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21613  fi
21614
21615    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21616
21617  path="$BOOT_JDK"
21618  has_colon=`$ECHO $path | $GREP ^.:`
21619  new_path="$path"
21620  if test "x$has_colon" = x; then
21621    # Not in mixed or Windows style, start by that.
21622    new_path=`cmd //c echo $path`
21623  fi
21624
21625
21626  input_path="$new_path"
21627  # Check if we need to convert this using DOS-style short mode. If the path
21628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21629  # take no chances and rewrite it.
21630  # Note: m4 eats our [], so we need to use [ and ] instead.
21631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21632  if test "x$has_forbidden_chars" != x; then
21633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21634    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21635  fi
21636
21637
21638  windows_path="$new_path"
21639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21640    unix_path=`$CYGPATH -u "$windows_path"`
21641    new_path="$unix_path"
21642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21644    new_path="$unix_path"
21645  fi
21646
21647  if test "x$path" != "x$new_path"; then
21648    BOOT_JDK="$new_path"
21649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21651  fi
21652
21653  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21654  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21655
21656    else
21657      # We're on a unix platform. Hooray! :)
21658      path="$BOOT_JDK"
21659      has_space=`$ECHO "$path" | $GREP " "`
21660      if test "x$has_space" != x; then
21661        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21662$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21663        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21664      fi
21665
21666      # Use eval to expand a potential ~
21667      eval path="$path"
21668      if test ! -f "$path" && test ! -d "$path"; then
21669        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21670      fi
21671
21672      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21673    fi
21674  fi
21675
21676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21677$as_echo_n "checking for Boot JDK... " >&6; }
21678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21679$as_echo "$BOOT_JDK" >&6; }
21680            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21681$as_echo_n "checking Boot JDK version... " >&6; }
21682            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21684$as_echo "$BOOT_JDK_VERSION" >&6; }
21685          fi # end check jdk version
21686        fi # end check javac
21687      fi # end check java
21688    fi # end check boot jdk found
21689  fi
21690
21691  fi
21692
21693
21694    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21695    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21696      # Do we have a bin/java?
21697      if test ! -x "$BOOT_JDK/bin/java"; then
21698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21700        BOOT_JDK_FOUND=no
21701      else
21702        # Do we have a bin/javac?
21703        if test ! -x "$BOOT_JDK/bin/javac"; then
21704          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21706          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21707$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21708          BOOT_JDK_FOUND=no
21709        else
21710          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21711          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21712
21713          # Extra M4 quote needed to protect [] in grep expression.
21714          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21715          if test "x$FOUND_CORRECT_VERSION" = x; then
21716            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21718            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21719$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21720            BOOT_JDK_FOUND=no
21721          else
21722            # We're done! :-)
21723            BOOT_JDK_FOUND=yes
21724
21725  # Only process if variable expands to non-empty
21726
21727  if test "x$BOOT_JDK" != x; then
21728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21729
21730  # Input might be given as Windows format, start by converting to
21731  # unix format.
21732  path="$BOOT_JDK"
21733  new_path=`$CYGPATH -u "$path"`
21734
21735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21738  # "foo.exe" is OK but "foo" is an error.
21739  #
21740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21741  # It is also a way to make sure we got the proper file name for the real test later on.
21742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21743  if test "x$test_shortpath" = x; then
21744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21746    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21747  fi
21748
21749  # Call helper function which possibly converts this using DOS-style short mode.
21750  # If so, the updated path is stored in $new_path.
21751
21752  input_path="$new_path"
21753  # Check if we need to convert this using DOS-style short mode. If the path
21754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21755  # take no chances and rewrite it.
21756  # Note: m4 eats our [], so we need to use [ and ] instead.
21757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21758  if test "x$has_forbidden_chars" != x; then
21759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21763      # Going to short mode and back again did indeed matter. Since short mode is
21764      # case insensitive, let's make it lowercase to improve readability.
21765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21766      # Now convert it back to Unix-style (cygpath)
21767      input_path=`$CYGPATH -u "$shortmode_path"`
21768      new_path="$input_path"
21769    fi
21770  fi
21771
21772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21773  if test "x$test_cygdrive_prefix" = x; then
21774    # As a simple fix, exclude /usr/bin since it's not a real path.
21775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21777      # a path prefixed by /cygdrive for fixpath to work.
21778      new_path="$CYGWIN_ROOT_PATH$input_path"
21779    fi
21780  fi
21781
21782
21783  if test "x$path" != "x$new_path"; then
21784    BOOT_JDK="$new_path"
21785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21786$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21787  fi
21788
21789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21790
21791  path="$BOOT_JDK"
21792  has_colon=`$ECHO $path | $GREP ^.:`
21793  new_path="$path"
21794  if test "x$has_colon" = x; then
21795    # Not in mixed or Windows style, start by that.
21796    new_path=`cmd //c echo $path`
21797  fi
21798
21799
21800  input_path="$new_path"
21801  # Check if we need to convert this using DOS-style short mode. If the path
21802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21803  # take no chances and rewrite it.
21804  # Note: m4 eats our [], so we need to use [ and ] instead.
21805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21806  if test "x$has_forbidden_chars" != x; then
21807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21809  fi
21810
21811
21812  windows_path="$new_path"
21813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21814    unix_path=`$CYGPATH -u "$windows_path"`
21815    new_path="$unix_path"
21816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21818    new_path="$unix_path"
21819  fi
21820
21821  if test "x$path" != "x$new_path"; then
21822    BOOT_JDK="$new_path"
21823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21825  fi
21826
21827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21829
21830    else
21831      # We're on a unix platform. Hooray! :)
21832      path="$BOOT_JDK"
21833      has_space=`$ECHO "$path" | $GREP " "`
21834      if test "x$has_space" != x; then
21835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21838      fi
21839
21840      # Use eval to expand a potential ~
21841      eval path="$path"
21842      if test ! -f "$path" && test ! -d "$path"; then
21843        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21844      fi
21845
21846      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21847    fi
21848  fi
21849
21850            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21851$as_echo_n "checking for Boot JDK... " >&6; }
21852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21853$as_echo "$BOOT_JDK" >&6; }
21854            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21855$as_echo_n "checking Boot JDK version... " >&6; }
21856            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21858$as_echo "$BOOT_JDK_VERSION" >&6; }
21859          fi # end check jdk version
21860        fi # end check javac
21861      fi # end check java
21862    fi # end check boot jdk found
21863  fi
21864
21865
21866  # Test: Is $JAVA_HOME set?
21867
21868  if test "x$BOOT_JDK_FOUND" = xno; then
21869    # Now execute the test
21870
21871  if test "x$JAVA_HOME" != x; then
21872    JAVA_HOME_PROCESSED="$JAVA_HOME"
21873
21874  # Only process if variable expands to non-empty
21875
21876  if test "x$JAVA_HOME_PROCESSED" != x; then
21877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21878
21879  # Input might be given as Windows format, start by converting to
21880  # unix format.
21881  path="$JAVA_HOME_PROCESSED"
21882  new_path=`$CYGPATH -u "$path"`
21883
21884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21887  # "foo.exe" is OK but "foo" is an error.
21888  #
21889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21890  # It is also a way to make sure we got the proper file name for the real test later on.
21891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21892  if test "x$test_shortpath" = x; then
21893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21894$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21895    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21896  fi
21897
21898  # Call helper function which possibly converts this using DOS-style short mode.
21899  # If so, the updated path is stored in $new_path.
21900
21901  input_path="$new_path"
21902  # Check if we need to convert this using DOS-style short mode. If the path
21903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21904  # take no chances and rewrite it.
21905  # Note: m4 eats our [], so we need to use [ and ] instead.
21906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21907  if test "x$has_forbidden_chars" != x; then
21908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21912      # Going to short mode and back again did indeed matter. Since short mode is
21913      # case insensitive, let's make it lowercase to improve readability.
21914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21915      # Now convert it back to Unix-style (cygpath)
21916      input_path=`$CYGPATH -u "$shortmode_path"`
21917      new_path="$input_path"
21918    fi
21919  fi
21920
21921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21922  if test "x$test_cygdrive_prefix" = x; then
21923    # As a simple fix, exclude /usr/bin since it's not a real path.
21924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21926      # a path prefixed by /cygdrive for fixpath to work.
21927      new_path="$CYGWIN_ROOT_PATH$input_path"
21928    fi
21929  fi
21930
21931
21932  if test "x$path" != "x$new_path"; then
21933    JAVA_HOME_PROCESSED="$new_path"
21934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21935$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21936  fi
21937
21938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21939
21940  path="$JAVA_HOME_PROCESSED"
21941  has_colon=`$ECHO $path | $GREP ^.:`
21942  new_path="$path"
21943  if test "x$has_colon" = x; then
21944    # Not in mixed or Windows style, start by that.
21945    new_path=`cmd //c echo $path`
21946  fi
21947
21948
21949  input_path="$new_path"
21950  # Check if we need to convert this using DOS-style short mode. If the path
21951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21952  # take no chances and rewrite it.
21953  # Note: m4 eats our [], so we need to use [ and ] instead.
21954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21955  if test "x$has_forbidden_chars" != x; then
21956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21958  fi
21959
21960
21961  windows_path="$new_path"
21962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21963    unix_path=`$CYGPATH -u "$windows_path"`
21964    new_path="$unix_path"
21965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21967    new_path="$unix_path"
21968  fi
21969
21970  if test "x$path" != "x$new_path"; then
21971    JAVA_HOME_PROCESSED="$new_path"
21972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21973$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21974  fi
21975
21976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21978
21979    else
21980      # We're on a unix platform. Hooray! :)
21981      path="$JAVA_HOME_PROCESSED"
21982      has_space=`$ECHO "$path" | $GREP " "`
21983      if test "x$has_space" != x; then
21984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21985$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21987      fi
21988
21989      # Use eval to expand a potential ~
21990      eval path="$path"
21991      if test ! -f "$path" && test ! -d "$path"; then
21992        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21993      fi
21994
21995      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21996    fi
21997  fi
21998
21999    if test ! -d "$JAVA_HOME_PROCESSED"; then
22000      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
22001$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
22002    else
22003      # Aha, the user has set a JAVA_HOME
22004      # let us use that as the Boot JDK.
22005      BOOT_JDK="$JAVA_HOME_PROCESSED"
22006      BOOT_JDK_FOUND=maybe
22007      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
22008$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
22009    fi
22010  fi
22011
22012
22013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22015      # Do we have a bin/java?
22016      if test ! -x "$BOOT_JDK/bin/java"; then
22017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22019        BOOT_JDK_FOUND=no
22020      else
22021        # Do we have a bin/javac?
22022        if test ! -x "$BOOT_JDK/bin/javac"; then
22023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22027          BOOT_JDK_FOUND=no
22028        else
22029          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22030          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22031
22032          # Extra M4 quote needed to protect [] in grep expression.
22033          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22034          if test "x$FOUND_CORRECT_VERSION" = x; then
22035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22037            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22038$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22039            BOOT_JDK_FOUND=no
22040          else
22041            # We're done! :-)
22042            BOOT_JDK_FOUND=yes
22043
22044  # Only process if variable expands to non-empty
22045
22046  if test "x$BOOT_JDK" != x; then
22047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22048
22049  # Input might be given as Windows format, start by converting to
22050  # unix format.
22051  path="$BOOT_JDK"
22052  new_path=`$CYGPATH -u "$path"`
22053
22054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22057  # "foo.exe" is OK but "foo" is an error.
22058  #
22059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22060  # It is also a way to make sure we got the proper file name for the real test later on.
22061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22062  if test "x$test_shortpath" = x; then
22063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22066  fi
22067
22068  # Call helper function which possibly converts this using DOS-style short mode.
22069  # If so, the updated path is stored in $new_path.
22070
22071  input_path="$new_path"
22072  # Check if we need to convert this using DOS-style short mode. If the path
22073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22074  # take no chances and rewrite it.
22075  # Note: m4 eats our [], so we need to use [ and ] instead.
22076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22077  if test "x$has_forbidden_chars" != x; then
22078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22082      # Going to short mode and back again did indeed matter. Since short mode is
22083      # case insensitive, let's make it lowercase to improve readability.
22084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22085      # Now convert it back to Unix-style (cygpath)
22086      input_path=`$CYGPATH -u "$shortmode_path"`
22087      new_path="$input_path"
22088    fi
22089  fi
22090
22091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22092  if test "x$test_cygdrive_prefix" = x; then
22093    # As a simple fix, exclude /usr/bin since it's not a real path.
22094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22096      # a path prefixed by /cygdrive for fixpath to work.
22097      new_path="$CYGWIN_ROOT_PATH$input_path"
22098    fi
22099  fi
22100
22101
22102  if test "x$path" != "x$new_path"; then
22103    BOOT_JDK="$new_path"
22104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22106  fi
22107
22108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22109
22110  path="$BOOT_JDK"
22111  has_colon=`$ECHO $path | $GREP ^.:`
22112  new_path="$path"
22113  if test "x$has_colon" = x; then
22114    # Not in mixed or Windows style, start by that.
22115    new_path=`cmd //c echo $path`
22116  fi
22117
22118
22119  input_path="$new_path"
22120  # Check if we need to convert this using DOS-style short mode. If the path
22121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22122  # take no chances and rewrite it.
22123  # Note: m4 eats our [], so we need to use [ and ] instead.
22124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22125  if test "x$has_forbidden_chars" != x; then
22126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22128  fi
22129
22130
22131  windows_path="$new_path"
22132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22133    unix_path=`$CYGPATH -u "$windows_path"`
22134    new_path="$unix_path"
22135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22137    new_path="$unix_path"
22138  fi
22139
22140  if test "x$path" != "x$new_path"; then
22141    BOOT_JDK="$new_path"
22142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22144  fi
22145
22146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22148
22149    else
22150      # We're on a unix platform. Hooray! :)
22151      path="$BOOT_JDK"
22152      has_space=`$ECHO "$path" | $GREP " "`
22153      if test "x$has_space" != x; then
22154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22157      fi
22158
22159      # Use eval to expand a potential ~
22160      eval path="$path"
22161      if test ! -f "$path" && test ! -d "$path"; then
22162        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22163      fi
22164
22165      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22166    fi
22167  fi
22168
22169            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22170$as_echo_n "checking for Boot JDK... " >&6; }
22171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22172$as_echo "$BOOT_JDK" >&6; }
22173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22174$as_echo_n "checking Boot JDK version... " >&6; }
22175            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22177$as_echo "$BOOT_JDK_VERSION" >&6; }
22178          fi # end check jdk version
22179        fi # end check javac
22180      fi # end check java
22181    fi # end check boot jdk found
22182  fi
22183
22184
22185  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22186
22187  if test "x$BOOT_JDK_FOUND" = xno; then
22188    # Now execute the test
22189
22190  # Extract the first word of "javac", so it can be a program name with args.
22191set dummy javac; ac_word=$2
22192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22193$as_echo_n "checking for $ac_word... " >&6; }
22194if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22195  $as_echo_n "(cached) " >&6
22196else
22197  case $JAVAC_CHECK in
22198  [\\/]* | ?:[\\/]*)
22199  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22200  ;;
22201  *)
22202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22203for as_dir in $PATH
22204do
22205  IFS=$as_save_IFS
22206  test -z "$as_dir" && as_dir=.
22207    for ac_exec_ext in '' $ac_executable_extensions; do
22208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22209    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22211    break 2
22212  fi
22213done
22214  done
22215IFS=$as_save_IFS
22216
22217  ;;
22218esac
22219fi
22220JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22221if test -n "$JAVAC_CHECK"; then
22222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22223$as_echo "$JAVAC_CHECK" >&6; }
22224else
22225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22226$as_echo "no" >&6; }
22227fi
22228
22229
22230  # Extract the first word of "java", so it can be a program name with args.
22231set dummy java; ac_word=$2
22232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22233$as_echo_n "checking for $ac_word... " >&6; }
22234if ${ac_cv_path_JAVA_CHECK+:} false; then :
22235  $as_echo_n "(cached) " >&6
22236else
22237  case $JAVA_CHECK in
22238  [\\/]* | ?:[\\/]*)
22239  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22240  ;;
22241  *)
22242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22243for as_dir in $PATH
22244do
22245  IFS=$as_save_IFS
22246  test -z "$as_dir" && as_dir=.
22247    for ac_exec_ext in '' $ac_executable_extensions; do
22248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22249    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22251    break 2
22252  fi
22253done
22254  done
22255IFS=$as_save_IFS
22256
22257  ;;
22258esac
22259fi
22260JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22261if test -n "$JAVA_CHECK"; then
22262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22263$as_echo "$JAVA_CHECK" >&6; }
22264else
22265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22266$as_echo "no" >&6; }
22267fi
22268
22269
22270  BINARY="$JAVAC_CHECK"
22271  if test "x$JAVAC_CHECK" = x; then
22272    BINARY="$JAVA_CHECK"
22273  fi
22274  if test "x$BINARY" != x; then
22275    # So there is a java(c) binary, it might be part of a JDK.
22276    # Lets find the JDK/JRE directory by following symbolic links.
22277    # Linux/GNU systems often have links from /usr/bin/java to
22278    # /etc/alternatives/java to the real JDK binary.
22279
22280  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22281    # Follow a chain of symbolic links. Use readlink
22282    # where it exists, else fall back to horribly
22283    # complicated shell code.
22284    if test "x$READLINK_TESTED" != yes; then
22285      # On MacOSX there is a readlink tool with a different
22286      # purpose than the GNU readlink tool. Check the found readlink.
22287      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22288      if test "x$ISGNU" = x; then
22289        # A readlink that we do not know how to use.
22290        # Are there other non-GNU readlinks out there?
22291        READLINK_TESTED=yes
22292        READLINK=
22293      fi
22294    fi
22295
22296    if test "x$READLINK" != x; then
22297      BINARY=`$READLINK -f $BINARY`
22298    else
22299      # Save the current directory for restoring afterwards
22300      STARTDIR=$PWD
22301      COUNTER=0
22302      sym_link_dir=`$DIRNAME $BINARY`
22303      sym_link_file=`$BASENAME $BINARY`
22304      cd $sym_link_dir
22305      # Use -P flag to resolve symlinks in directories.
22306      cd `$THEPWDCMD -P`
22307      sym_link_dir=`$THEPWDCMD -P`
22308      # Resolve file symlinks
22309      while test $COUNTER -lt 20; do
22310        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22311        if test "x$ISLINK" == x; then
22312          # This is not a symbolic link! We are done!
22313          break
22314        fi
22315        # Again resolve directory symlinks since the target of the just found
22316        # link could be in a different directory
22317        cd `$DIRNAME $ISLINK`
22318        sym_link_dir=`$THEPWDCMD -P`
22319        sym_link_file=`$BASENAME $ISLINK`
22320        let COUNTER=COUNTER+1
22321      done
22322      cd $STARTDIR
22323      BINARY=$sym_link_dir/$sym_link_file
22324    fi
22325  fi
22326
22327    BOOT_JDK=`dirname "$BINARY"`
22328    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22329    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22330      # Looks like we found ourselves an JDK
22331      BOOT_JDK_FOUND=maybe
22332      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22333$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22334    fi
22335  fi
22336
22337
22338    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22339    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22340      # Do we have a bin/java?
22341      if test ! -x "$BOOT_JDK/bin/java"; then
22342        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22344        BOOT_JDK_FOUND=no
22345      else
22346        # Do we have a bin/javac?
22347        if test ! -x "$BOOT_JDK/bin/javac"; then
22348          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22350          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22351$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22352          BOOT_JDK_FOUND=no
22353        else
22354          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22355          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22356
22357          # Extra M4 quote needed to protect [] in grep expression.
22358          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22359          if test "x$FOUND_CORRECT_VERSION" = x; then
22360            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22361$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22362            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22363$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22364            BOOT_JDK_FOUND=no
22365          else
22366            # We're done! :-)
22367            BOOT_JDK_FOUND=yes
22368
22369  # Only process if variable expands to non-empty
22370
22371  if test "x$BOOT_JDK" != x; then
22372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22373
22374  # Input might be given as Windows format, start by converting to
22375  # unix format.
22376  path="$BOOT_JDK"
22377  new_path=`$CYGPATH -u "$path"`
22378
22379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22382  # "foo.exe" is OK but "foo" is an error.
22383  #
22384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22385  # It is also a way to make sure we got the proper file name for the real test later on.
22386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22387  if test "x$test_shortpath" = x; then
22388    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22389$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22390    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22391  fi
22392
22393  # Call helper function which possibly converts this using DOS-style short mode.
22394  # If so, the updated path is stored in $new_path.
22395
22396  input_path="$new_path"
22397  # Check if we need to convert this using DOS-style short mode. If the path
22398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22399  # take no chances and rewrite it.
22400  # Note: m4 eats our [], so we need to use [ and ] instead.
22401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22402  if test "x$has_forbidden_chars" != x; then
22403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22404    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22405    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22406    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22407      # Going to short mode and back again did indeed matter. Since short mode is
22408      # case insensitive, let's make it lowercase to improve readability.
22409      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22410      # Now convert it back to Unix-style (cygpath)
22411      input_path=`$CYGPATH -u "$shortmode_path"`
22412      new_path="$input_path"
22413    fi
22414  fi
22415
22416  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22417  if test "x$test_cygdrive_prefix" = x; then
22418    # As a simple fix, exclude /usr/bin since it's not a real path.
22419    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22420      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22421      # a path prefixed by /cygdrive for fixpath to work.
22422      new_path="$CYGWIN_ROOT_PATH$input_path"
22423    fi
22424  fi
22425
22426
22427  if test "x$path" != "x$new_path"; then
22428    BOOT_JDK="$new_path"
22429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22431  fi
22432
22433    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22434
22435  path="$BOOT_JDK"
22436  has_colon=`$ECHO $path | $GREP ^.:`
22437  new_path="$path"
22438  if test "x$has_colon" = x; then
22439    # Not in mixed or Windows style, start by that.
22440    new_path=`cmd //c echo $path`
22441  fi
22442
22443
22444  input_path="$new_path"
22445  # Check if we need to convert this using DOS-style short mode. If the path
22446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22447  # take no chances and rewrite it.
22448  # Note: m4 eats our [], so we need to use [ and ] instead.
22449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22450  if test "x$has_forbidden_chars" != x; then
22451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22453  fi
22454
22455
22456  windows_path="$new_path"
22457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22458    unix_path=`$CYGPATH -u "$windows_path"`
22459    new_path="$unix_path"
22460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22462    new_path="$unix_path"
22463  fi
22464
22465  if test "x$path" != "x$new_path"; then
22466    BOOT_JDK="$new_path"
22467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22469  fi
22470
22471  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22472  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22473
22474    else
22475      # We're on a unix platform. Hooray! :)
22476      path="$BOOT_JDK"
22477      has_space=`$ECHO "$path" | $GREP " "`
22478      if test "x$has_space" != x; then
22479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22481        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22482      fi
22483
22484      # Use eval to expand a potential ~
22485      eval path="$path"
22486      if test ! -f "$path" && test ! -d "$path"; then
22487        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22488      fi
22489
22490      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22491    fi
22492  fi
22493
22494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22495$as_echo_n "checking for Boot JDK... " >&6; }
22496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22497$as_echo "$BOOT_JDK" >&6; }
22498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22499$as_echo_n "checking Boot JDK version... " >&6; }
22500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22502$as_echo "$BOOT_JDK_VERSION" >&6; }
22503          fi # end check jdk version
22504        fi # end check javac
22505      fi # end check java
22506    fi # end check boot jdk found
22507  fi
22508
22509
22510  # Test: Is there a JDK installed in default, well-known locations?
22511
22512  if test "x$BOOT_JDK_FOUND" = xno; then
22513    # Now execute the test
22514
22515  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22516
22517  if test "x$BOOT_JDK_FOUND" = xno; then
22518    # Now execute the test
22519
22520  if test "x$ProgramW6432" != x; then
22521    VIRTUAL_DIR="$ProgramW6432/Java"
22522
22523  windows_path="$VIRTUAL_DIR"
22524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22525    unix_path=`$CYGPATH -u "$windows_path"`
22526    VIRTUAL_DIR="$unix_path"
22527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22529    VIRTUAL_DIR="$unix_path"
22530  fi
22531
22532
22533  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22534  BOOT_JDK_SUFFIX=""
22535  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22536  if test "x$ALL_JDKS_FOUND" != x; then
22537    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22538
22539  if test "x$BOOT_JDK_FOUND" = xno; then
22540    # Now execute the test
22541
22542        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22543        if test -d "$BOOT_JDK"; then
22544          BOOT_JDK_FOUND=maybe
22545          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22546$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22547        fi
22548
22549
22550    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22551    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22552      # Do we have a bin/java?
22553      if test ! -x "$BOOT_JDK/bin/java"; then
22554        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22556        BOOT_JDK_FOUND=no
22557      else
22558        # Do we have a bin/javac?
22559        if test ! -x "$BOOT_JDK/bin/javac"; then
22560          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22562          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22563$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22564          BOOT_JDK_FOUND=no
22565        else
22566          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22567          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22568
22569          # Extra M4 quote needed to protect [] in grep expression.
22570          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22571          if test "x$FOUND_CORRECT_VERSION" = x; then
22572            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22574            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22575$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22576            BOOT_JDK_FOUND=no
22577          else
22578            # We're done! :-)
22579            BOOT_JDK_FOUND=yes
22580
22581  # Only process if variable expands to non-empty
22582
22583  if test "x$BOOT_JDK" != x; then
22584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22585
22586  # Input might be given as Windows format, start by converting to
22587  # unix format.
22588  path="$BOOT_JDK"
22589  new_path=`$CYGPATH -u "$path"`
22590
22591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22594  # "foo.exe" is OK but "foo" is an error.
22595  #
22596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22597  # It is also a way to make sure we got the proper file name for the real test later on.
22598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22599  if test "x$test_shortpath" = x; then
22600    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22601$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22602    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22603  fi
22604
22605  # Call helper function which possibly converts this using DOS-style short mode.
22606  # If so, the updated path is stored in $new_path.
22607
22608  input_path="$new_path"
22609  # Check if we need to convert this using DOS-style short mode. If the path
22610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22611  # take no chances and rewrite it.
22612  # Note: m4 eats our [], so we need to use [ and ] instead.
22613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22614  if test "x$has_forbidden_chars" != x; then
22615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22619      # Going to short mode and back again did indeed matter. Since short mode is
22620      # case insensitive, let's make it lowercase to improve readability.
22621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22622      # Now convert it back to Unix-style (cygpath)
22623      input_path=`$CYGPATH -u "$shortmode_path"`
22624      new_path="$input_path"
22625    fi
22626  fi
22627
22628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22629  if test "x$test_cygdrive_prefix" = x; then
22630    # As a simple fix, exclude /usr/bin since it's not a real path.
22631    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22633      # a path prefixed by /cygdrive for fixpath to work.
22634      new_path="$CYGWIN_ROOT_PATH$input_path"
22635    fi
22636  fi
22637
22638
22639  if test "x$path" != "x$new_path"; then
22640    BOOT_JDK="$new_path"
22641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22643  fi
22644
22645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22646
22647  path="$BOOT_JDK"
22648  has_colon=`$ECHO $path | $GREP ^.:`
22649  new_path="$path"
22650  if test "x$has_colon" = x; then
22651    # Not in mixed or Windows style, start by that.
22652    new_path=`cmd //c echo $path`
22653  fi
22654
22655
22656  input_path="$new_path"
22657  # Check if we need to convert this using DOS-style short mode. If the path
22658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22659  # take no chances and rewrite it.
22660  # Note: m4 eats our [], so we need to use [ and ] instead.
22661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22662  if test "x$has_forbidden_chars" != x; then
22663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22665  fi
22666
22667
22668  windows_path="$new_path"
22669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22670    unix_path=`$CYGPATH -u "$windows_path"`
22671    new_path="$unix_path"
22672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22674    new_path="$unix_path"
22675  fi
22676
22677  if test "x$path" != "x$new_path"; then
22678    BOOT_JDK="$new_path"
22679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22681  fi
22682
22683  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22684  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22685
22686    else
22687      # We're on a unix platform. Hooray! :)
22688      path="$BOOT_JDK"
22689      has_space=`$ECHO "$path" | $GREP " "`
22690      if test "x$has_space" != x; then
22691        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22693        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22694      fi
22695
22696      # Use eval to expand a potential ~
22697      eval path="$path"
22698      if test ! -f "$path" && test ! -d "$path"; then
22699        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22700      fi
22701
22702      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22703    fi
22704  fi
22705
22706            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22707$as_echo_n "checking for Boot JDK... " >&6; }
22708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22709$as_echo "$BOOT_JDK" >&6; }
22710            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22711$as_echo_n "checking Boot JDK version... " >&6; }
22712            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22714$as_echo "$BOOT_JDK_VERSION" >&6; }
22715          fi # end check jdk version
22716        fi # end check javac
22717      fi # end check java
22718    fi # end check boot jdk found
22719  fi
22720
22721    done
22722  fi
22723
22724  fi
22725
22726
22727    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22728    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22729      # Do we have a bin/java?
22730      if test ! -x "$BOOT_JDK/bin/java"; then
22731        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22733        BOOT_JDK_FOUND=no
22734      else
22735        # Do we have a bin/javac?
22736        if test ! -x "$BOOT_JDK/bin/javac"; then
22737          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22739          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22740$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22741          BOOT_JDK_FOUND=no
22742        else
22743          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22744          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22745
22746          # Extra M4 quote needed to protect [] in grep expression.
22747          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22748          if test "x$FOUND_CORRECT_VERSION" = x; then
22749            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22751            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22752$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22753            BOOT_JDK_FOUND=no
22754          else
22755            # We're done! :-)
22756            BOOT_JDK_FOUND=yes
22757
22758  # Only process if variable expands to non-empty
22759
22760  if test "x$BOOT_JDK" != x; then
22761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22762
22763  # Input might be given as Windows format, start by converting to
22764  # unix format.
22765  path="$BOOT_JDK"
22766  new_path=`$CYGPATH -u "$path"`
22767
22768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22771  # "foo.exe" is OK but "foo" is an error.
22772  #
22773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22774  # It is also a way to make sure we got the proper file name for the real test later on.
22775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22776  if test "x$test_shortpath" = x; then
22777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22779    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22780  fi
22781
22782  # Call helper function which possibly converts this using DOS-style short mode.
22783  # If so, the updated path is stored in $new_path.
22784
22785  input_path="$new_path"
22786  # Check if we need to convert this using DOS-style short mode. If the path
22787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22788  # take no chances and rewrite it.
22789  # Note: m4 eats our [], so we need to use [ and ] instead.
22790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22791  if test "x$has_forbidden_chars" != x; then
22792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22796      # Going to short mode and back again did indeed matter. Since short mode is
22797      # case insensitive, let's make it lowercase to improve readability.
22798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22799      # Now convert it back to Unix-style (cygpath)
22800      input_path=`$CYGPATH -u "$shortmode_path"`
22801      new_path="$input_path"
22802    fi
22803  fi
22804
22805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22806  if test "x$test_cygdrive_prefix" = x; then
22807    # As a simple fix, exclude /usr/bin since it's not a real path.
22808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22810      # a path prefixed by /cygdrive for fixpath to work.
22811      new_path="$CYGWIN_ROOT_PATH$input_path"
22812    fi
22813  fi
22814
22815
22816  if test "x$path" != "x$new_path"; then
22817    BOOT_JDK="$new_path"
22818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22820  fi
22821
22822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22823
22824  path="$BOOT_JDK"
22825  has_colon=`$ECHO $path | $GREP ^.:`
22826  new_path="$path"
22827  if test "x$has_colon" = x; then
22828    # Not in mixed or Windows style, start by that.
22829    new_path=`cmd //c echo $path`
22830  fi
22831
22832
22833  input_path="$new_path"
22834  # Check if we need to convert this using DOS-style short mode. If the path
22835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22836  # take no chances and rewrite it.
22837  # Note: m4 eats our [], so we need to use [ and ] instead.
22838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22839  if test "x$has_forbidden_chars" != x; then
22840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22842  fi
22843
22844
22845  windows_path="$new_path"
22846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22847    unix_path=`$CYGPATH -u "$windows_path"`
22848    new_path="$unix_path"
22849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22851    new_path="$unix_path"
22852  fi
22853
22854  if test "x$path" != "x$new_path"; then
22855    BOOT_JDK="$new_path"
22856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22858  fi
22859
22860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22862
22863    else
22864      # We're on a unix platform. Hooray! :)
22865      path="$BOOT_JDK"
22866      has_space=`$ECHO "$path" | $GREP " "`
22867      if test "x$has_space" != x; then
22868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22871      fi
22872
22873      # Use eval to expand a potential ~
22874      eval path="$path"
22875      if test ! -f "$path" && test ! -d "$path"; then
22876        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22877      fi
22878
22879      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22880    fi
22881  fi
22882
22883            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22884$as_echo_n "checking for Boot JDK... " >&6; }
22885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22886$as_echo "$BOOT_JDK" >&6; }
22887            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22888$as_echo_n "checking Boot JDK version... " >&6; }
22889            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22891$as_echo "$BOOT_JDK_VERSION" >&6; }
22892          fi # end check jdk version
22893        fi # end check javac
22894      fi # end check java
22895    fi # end check boot jdk found
22896  fi
22897
22898
22899  if test "x$BOOT_JDK_FOUND" = xno; then
22900    # Now execute the test
22901
22902  if test "x$PROGRAMW6432" != x; then
22903    VIRTUAL_DIR="$PROGRAMW6432/Java"
22904
22905  windows_path="$VIRTUAL_DIR"
22906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22907    unix_path=`$CYGPATH -u "$windows_path"`
22908    VIRTUAL_DIR="$unix_path"
22909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22911    VIRTUAL_DIR="$unix_path"
22912  fi
22913
22914
22915  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22916  BOOT_JDK_SUFFIX=""
22917  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22918  if test "x$ALL_JDKS_FOUND" != x; then
22919    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22920
22921  if test "x$BOOT_JDK_FOUND" = xno; then
22922    # Now execute the test
22923
22924        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22925        if test -d "$BOOT_JDK"; then
22926          BOOT_JDK_FOUND=maybe
22927          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22928$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22929        fi
22930
22931
22932    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22933    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22934      # Do we have a bin/java?
22935      if test ! -x "$BOOT_JDK/bin/java"; then
22936        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22938        BOOT_JDK_FOUND=no
22939      else
22940        # Do we have a bin/javac?
22941        if test ! -x "$BOOT_JDK/bin/javac"; then
22942          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22944          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22945$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22946          BOOT_JDK_FOUND=no
22947        else
22948          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22949          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22950
22951          # Extra M4 quote needed to protect [] in grep expression.
22952          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22953          if test "x$FOUND_CORRECT_VERSION" = x; then
22954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22956            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22957$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22958            BOOT_JDK_FOUND=no
22959          else
22960            # We're done! :-)
22961            BOOT_JDK_FOUND=yes
22962
22963  # Only process if variable expands to non-empty
22964
22965  if test "x$BOOT_JDK" != x; then
22966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22967
22968  # Input might be given as Windows format, start by converting to
22969  # unix format.
22970  path="$BOOT_JDK"
22971  new_path=`$CYGPATH -u "$path"`
22972
22973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22976  # "foo.exe" is OK but "foo" is an error.
22977  #
22978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22979  # It is also a way to make sure we got the proper file name for the real test later on.
22980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22981  if test "x$test_shortpath" = x; then
22982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22984    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22985  fi
22986
22987  # Call helper function which possibly converts this using DOS-style short mode.
22988  # If so, the updated path is stored in $new_path.
22989
22990  input_path="$new_path"
22991  # Check if we need to convert this using DOS-style short mode. If the path
22992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22993  # take no chances and rewrite it.
22994  # Note: m4 eats our [], so we need to use [ and ] instead.
22995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22996  if test "x$has_forbidden_chars" != x; then
22997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23001      # Going to short mode and back again did indeed matter. Since short mode is
23002      # case insensitive, let's make it lowercase to improve readability.
23003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23004      # Now convert it back to Unix-style (cygpath)
23005      input_path=`$CYGPATH -u "$shortmode_path"`
23006      new_path="$input_path"
23007    fi
23008  fi
23009
23010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23011  if test "x$test_cygdrive_prefix" = x; then
23012    # As a simple fix, exclude /usr/bin since it's not a real path.
23013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23015      # a path prefixed by /cygdrive for fixpath to work.
23016      new_path="$CYGWIN_ROOT_PATH$input_path"
23017    fi
23018  fi
23019
23020
23021  if test "x$path" != "x$new_path"; then
23022    BOOT_JDK="$new_path"
23023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23025  fi
23026
23027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23028
23029  path="$BOOT_JDK"
23030  has_colon=`$ECHO $path | $GREP ^.:`
23031  new_path="$path"
23032  if test "x$has_colon" = x; then
23033    # Not in mixed or Windows style, start by that.
23034    new_path=`cmd //c echo $path`
23035  fi
23036
23037
23038  input_path="$new_path"
23039  # Check if we need to convert this using DOS-style short mode. If the path
23040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23041  # take no chances and rewrite it.
23042  # Note: m4 eats our [], so we need to use [ and ] instead.
23043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23044  if test "x$has_forbidden_chars" != x; then
23045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23047  fi
23048
23049
23050  windows_path="$new_path"
23051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23052    unix_path=`$CYGPATH -u "$windows_path"`
23053    new_path="$unix_path"
23054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23056    new_path="$unix_path"
23057  fi
23058
23059  if test "x$path" != "x$new_path"; then
23060    BOOT_JDK="$new_path"
23061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23063  fi
23064
23065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23067
23068    else
23069      # We're on a unix platform. Hooray! :)
23070      path="$BOOT_JDK"
23071      has_space=`$ECHO "$path" | $GREP " "`
23072      if test "x$has_space" != x; then
23073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23075        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23076      fi
23077
23078      # Use eval to expand a potential ~
23079      eval path="$path"
23080      if test ! -f "$path" && test ! -d "$path"; then
23081        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23082      fi
23083
23084      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23085    fi
23086  fi
23087
23088            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23089$as_echo_n "checking for Boot JDK... " >&6; }
23090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23091$as_echo "$BOOT_JDK" >&6; }
23092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23093$as_echo_n "checking Boot JDK version... " >&6; }
23094            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23096$as_echo "$BOOT_JDK_VERSION" >&6; }
23097          fi # end check jdk version
23098        fi # end check javac
23099      fi # end check java
23100    fi # end check boot jdk found
23101  fi
23102
23103    done
23104  fi
23105
23106  fi
23107
23108
23109    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23110    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23111      # Do we have a bin/java?
23112      if test ! -x "$BOOT_JDK/bin/java"; then
23113        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23115        BOOT_JDK_FOUND=no
23116      else
23117        # Do we have a bin/javac?
23118        if test ! -x "$BOOT_JDK/bin/javac"; then
23119          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23121          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23122$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23123          BOOT_JDK_FOUND=no
23124        else
23125          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23126          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23127
23128          # Extra M4 quote needed to protect [] in grep expression.
23129          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23130          if test "x$FOUND_CORRECT_VERSION" = x; then
23131            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23133            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23134$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23135            BOOT_JDK_FOUND=no
23136          else
23137            # We're done! :-)
23138            BOOT_JDK_FOUND=yes
23139
23140  # Only process if variable expands to non-empty
23141
23142  if test "x$BOOT_JDK" != x; then
23143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23144
23145  # Input might be given as Windows format, start by converting to
23146  # unix format.
23147  path="$BOOT_JDK"
23148  new_path=`$CYGPATH -u "$path"`
23149
23150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23153  # "foo.exe" is OK but "foo" is an error.
23154  #
23155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23156  # It is also a way to make sure we got the proper file name for the real test later on.
23157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23158  if test "x$test_shortpath" = x; then
23159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23161    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23162  fi
23163
23164  # Call helper function which possibly converts this using DOS-style short mode.
23165  # If so, the updated path is stored in $new_path.
23166
23167  input_path="$new_path"
23168  # Check if we need to convert this using DOS-style short mode. If the path
23169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23170  # take no chances and rewrite it.
23171  # Note: m4 eats our [], so we need to use [ and ] instead.
23172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23173  if test "x$has_forbidden_chars" != x; then
23174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23178      # Going to short mode and back again did indeed matter. Since short mode is
23179      # case insensitive, let's make it lowercase to improve readability.
23180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23181      # Now convert it back to Unix-style (cygpath)
23182      input_path=`$CYGPATH -u "$shortmode_path"`
23183      new_path="$input_path"
23184    fi
23185  fi
23186
23187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23188  if test "x$test_cygdrive_prefix" = x; then
23189    # As a simple fix, exclude /usr/bin since it's not a real path.
23190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23192      # a path prefixed by /cygdrive for fixpath to work.
23193      new_path="$CYGWIN_ROOT_PATH$input_path"
23194    fi
23195  fi
23196
23197
23198  if test "x$path" != "x$new_path"; then
23199    BOOT_JDK="$new_path"
23200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23201$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23202  fi
23203
23204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23205
23206  path="$BOOT_JDK"
23207  has_colon=`$ECHO $path | $GREP ^.:`
23208  new_path="$path"
23209  if test "x$has_colon" = x; then
23210    # Not in mixed or Windows style, start by that.
23211    new_path=`cmd //c echo $path`
23212  fi
23213
23214
23215  input_path="$new_path"
23216  # Check if we need to convert this using DOS-style short mode. If the path
23217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23218  # take no chances and rewrite it.
23219  # Note: m4 eats our [], so we need to use [ and ] instead.
23220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23221  if test "x$has_forbidden_chars" != x; then
23222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23224  fi
23225
23226
23227  windows_path="$new_path"
23228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23229    unix_path=`$CYGPATH -u "$windows_path"`
23230    new_path="$unix_path"
23231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23233    new_path="$unix_path"
23234  fi
23235
23236  if test "x$path" != "x$new_path"; then
23237    BOOT_JDK="$new_path"
23238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23239$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23240  fi
23241
23242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23244
23245    else
23246      # We're on a unix platform. Hooray! :)
23247      path="$BOOT_JDK"
23248      has_space=`$ECHO "$path" | $GREP " "`
23249      if test "x$has_space" != x; then
23250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23253      fi
23254
23255      # Use eval to expand a potential ~
23256      eval path="$path"
23257      if test ! -f "$path" && test ! -d "$path"; then
23258        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23259      fi
23260
23261      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23262    fi
23263  fi
23264
23265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23266$as_echo_n "checking for Boot JDK... " >&6; }
23267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23268$as_echo "$BOOT_JDK" >&6; }
23269            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23270$as_echo_n "checking Boot JDK version... " >&6; }
23271            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23273$as_echo "$BOOT_JDK_VERSION" >&6; }
23274          fi # end check jdk version
23275        fi # end check javac
23276      fi # end check java
23277    fi # end check boot jdk found
23278  fi
23279
23280
23281  if test "x$BOOT_JDK_FOUND" = xno; then
23282    # Now execute the test
23283
23284  if test "x$PROGRAMFILES" != x; then
23285    VIRTUAL_DIR="$PROGRAMFILES/Java"
23286
23287  windows_path="$VIRTUAL_DIR"
23288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23289    unix_path=`$CYGPATH -u "$windows_path"`
23290    VIRTUAL_DIR="$unix_path"
23291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23293    VIRTUAL_DIR="$unix_path"
23294  fi
23295
23296
23297  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23298  BOOT_JDK_SUFFIX=""
23299  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23300  if test "x$ALL_JDKS_FOUND" != x; then
23301    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23302
23303  if test "x$BOOT_JDK_FOUND" = xno; then
23304    # Now execute the test
23305
23306        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23307        if test -d "$BOOT_JDK"; then
23308          BOOT_JDK_FOUND=maybe
23309          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23310$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23311        fi
23312
23313
23314    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23315    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23316      # Do we have a bin/java?
23317      if test ! -x "$BOOT_JDK/bin/java"; then
23318        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23320        BOOT_JDK_FOUND=no
23321      else
23322        # Do we have a bin/javac?
23323        if test ! -x "$BOOT_JDK/bin/javac"; then
23324          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23326          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23327$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23328          BOOT_JDK_FOUND=no
23329        else
23330          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23331          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23332
23333          # Extra M4 quote needed to protect [] in grep expression.
23334          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23335          if test "x$FOUND_CORRECT_VERSION" = x; then
23336            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23338            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23339$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23340            BOOT_JDK_FOUND=no
23341          else
23342            # We're done! :-)
23343            BOOT_JDK_FOUND=yes
23344
23345  # Only process if variable expands to non-empty
23346
23347  if test "x$BOOT_JDK" != x; then
23348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23349
23350  # Input might be given as Windows format, start by converting to
23351  # unix format.
23352  path="$BOOT_JDK"
23353  new_path=`$CYGPATH -u "$path"`
23354
23355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23358  # "foo.exe" is OK but "foo" is an error.
23359  #
23360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23361  # It is also a way to make sure we got the proper file name for the real test later on.
23362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23363  if test "x$test_shortpath" = x; then
23364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23367  fi
23368
23369  # Call helper function which possibly converts this using DOS-style short mode.
23370  # If so, the updated path is stored in $new_path.
23371
23372  input_path="$new_path"
23373  # Check if we need to convert this using DOS-style short mode. If the path
23374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23375  # take no chances and rewrite it.
23376  # Note: m4 eats our [], so we need to use [ and ] instead.
23377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23378  if test "x$has_forbidden_chars" != x; then
23379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23383      # Going to short mode and back again did indeed matter. Since short mode is
23384      # case insensitive, let's make it lowercase to improve readability.
23385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23386      # Now convert it back to Unix-style (cygpath)
23387      input_path=`$CYGPATH -u "$shortmode_path"`
23388      new_path="$input_path"
23389    fi
23390  fi
23391
23392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23393  if test "x$test_cygdrive_prefix" = x; then
23394    # As a simple fix, exclude /usr/bin since it's not a real path.
23395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23397      # a path prefixed by /cygdrive for fixpath to work.
23398      new_path="$CYGWIN_ROOT_PATH$input_path"
23399    fi
23400  fi
23401
23402
23403  if test "x$path" != "x$new_path"; then
23404    BOOT_JDK="$new_path"
23405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23407  fi
23408
23409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23410
23411  path="$BOOT_JDK"
23412  has_colon=`$ECHO $path | $GREP ^.:`
23413  new_path="$path"
23414  if test "x$has_colon" = x; then
23415    # Not in mixed or Windows style, start by that.
23416    new_path=`cmd //c echo $path`
23417  fi
23418
23419
23420  input_path="$new_path"
23421  # Check if we need to convert this using DOS-style short mode. If the path
23422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23423  # take no chances and rewrite it.
23424  # Note: m4 eats our [], so we need to use [ and ] instead.
23425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23426  if test "x$has_forbidden_chars" != x; then
23427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23429  fi
23430
23431
23432  windows_path="$new_path"
23433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23434    unix_path=`$CYGPATH -u "$windows_path"`
23435    new_path="$unix_path"
23436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23438    new_path="$unix_path"
23439  fi
23440
23441  if test "x$path" != "x$new_path"; then
23442    BOOT_JDK="$new_path"
23443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23445  fi
23446
23447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23449
23450    else
23451      # We're on a unix platform. Hooray! :)
23452      path="$BOOT_JDK"
23453      has_space=`$ECHO "$path" | $GREP " "`
23454      if test "x$has_space" != x; then
23455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23457        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23458      fi
23459
23460      # Use eval to expand a potential ~
23461      eval path="$path"
23462      if test ! -f "$path" && test ! -d "$path"; then
23463        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23464      fi
23465
23466      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23467    fi
23468  fi
23469
23470            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23471$as_echo_n "checking for Boot JDK... " >&6; }
23472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23473$as_echo "$BOOT_JDK" >&6; }
23474            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23475$as_echo_n "checking Boot JDK version... " >&6; }
23476            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23478$as_echo "$BOOT_JDK_VERSION" >&6; }
23479          fi # end check jdk version
23480        fi # end check javac
23481      fi # end check java
23482    fi # end check boot jdk found
23483  fi
23484
23485    done
23486  fi
23487
23488  fi
23489
23490
23491    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23492    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23493      # Do we have a bin/java?
23494      if test ! -x "$BOOT_JDK/bin/java"; then
23495        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23497        BOOT_JDK_FOUND=no
23498      else
23499        # Do we have a bin/javac?
23500        if test ! -x "$BOOT_JDK/bin/javac"; then
23501          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23503          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23504$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23505          BOOT_JDK_FOUND=no
23506        else
23507          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23508          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23509
23510          # Extra M4 quote needed to protect [] in grep expression.
23511          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23512          if test "x$FOUND_CORRECT_VERSION" = x; then
23513            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23515            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23516$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23517            BOOT_JDK_FOUND=no
23518          else
23519            # We're done! :-)
23520            BOOT_JDK_FOUND=yes
23521
23522  # Only process if variable expands to non-empty
23523
23524  if test "x$BOOT_JDK" != x; then
23525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23526
23527  # Input might be given as Windows format, start by converting to
23528  # unix format.
23529  path="$BOOT_JDK"
23530  new_path=`$CYGPATH -u "$path"`
23531
23532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23535  # "foo.exe" is OK but "foo" is an error.
23536  #
23537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23538  # It is also a way to make sure we got the proper file name for the real test later on.
23539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23540  if test "x$test_shortpath" = x; then
23541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23543    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23544  fi
23545
23546  # Call helper function which possibly converts this using DOS-style short mode.
23547  # If so, the updated path is stored in $new_path.
23548
23549  input_path="$new_path"
23550  # Check if we need to convert this using DOS-style short mode. If the path
23551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23552  # take no chances and rewrite it.
23553  # Note: m4 eats our [], so we need to use [ and ] instead.
23554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23555  if test "x$has_forbidden_chars" != x; then
23556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23560      # Going to short mode and back again did indeed matter. Since short mode is
23561      # case insensitive, let's make it lowercase to improve readability.
23562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23563      # Now convert it back to Unix-style (cygpath)
23564      input_path=`$CYGPATH -u "$shortmode_path"`
23565      new_path="$input_path"
23566    fi
23567  fi
23568
23569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23570  if test "x$test_cygdrive_prefix" = x; then
23571    # As a simple fix, exclude /usr/bin since it's not a real path.
23572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23574      # a path prefixed by /cygdrive for fixpath to work.
23575      new_path="$CYGWIN_ROOT_PATH$input_path"
23576    fi
23577  fi
23578
23579
23580  if test "x$path" != "x$new_path"; then
23581    BOOT_JDK="$new_path"
23582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23584  fi
23585
23586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23587
23588  path="$BOOT_JDK"
23589  has_colon=`$ECHO $path | $GREP ^.:`
23590  new_path="$path"
23591  if test "x$has_colon" = x; then
23592    # Not in mixed or Windows style, start by that.
23593    new_path=`cmd //c echo $path`
23594  fi
23595
23596
23597  input_path="$new_path"
23598  # Check if we need to convert this using DOS-style short mode. If the path
23599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23600  # take no chances and rewrite it.
23601  # Note: m4 eats our [], so we need to use [ and ] instead.
23602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23603  if test "x$has_forbidden_chars" != x; then
23604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23606  fi
23607
23608
23609  windows_path="$new_path"
23610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23611    unix_path=`$CYGPATH -u "$windows_path"`
23612    new_path="$unix_path"
23613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23615    new_path="$unix_path"
23616  fi
23617
23618  if test "x$path" != "x$new_path"; then
23619    BOOT_JDK="$new_path"
23620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23621$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23622  fi
23623
23624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23626
23627    else
23628      # We're on a unix platform. Hooray! :)
23629      path="$BOOT_JDK"
23630      has_space=`$ECHO "$path" | $GREP " "`
23631      if test "x$has_space" != x; then
23632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23633$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23635      fi
23636
23637      # Use eval to expand a potential ~
23638      eval path="$path"
23639      if test ! -f "$path" && test ! -d "$path"; then
23640        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23641      fi
23642
23643      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23644    fi
23645  fi
23646
23647            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23648$as_echo_n "checking for Boot JDK... " >&6; }
23649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23650$as_echo "$BOOT_JDK" >&6; }
23651            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23652$as_echo_n "checking Boot JDK version... " >&6; }
23653            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23655$as_echo "$BOOT_JDK_VERSION" >&6; }
23656          fi # end check jdk version
23657        fi # end check javac
23658      fi # end check java
23659    fi # end check boot jdk found
23660  fi
23661
23662
23663  if test "x$BOOT_JDK_FOUND" = xno; then
23664    # Now execute the test
23665
23666  if test "x$ProgramFiles" != x; then
23667    VIRTUAL_DIR="$ProgramFiles/Java"
23668
23669  windows_path="$VIRTUAL_DIR"
23670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23671    unix_path=`$CYGPATH -u "$windows_path"`
23672    VIRTUAL_DIR="$unix_path"
23673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23675    VIRTUAL_DIR="$unix_path"
23676  fi
23677
23678
23679  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23680  BOOT_JDK_SUFFIX=""
23681  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23682  if test "x$ALL_JDKS_FOUND" != x; then
23683    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23684
23685  if test "x$BOOT_JDK_FOUND" = xno; then
23686    # Now execute the test
23687
23688        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23689        if test -d "$BOOT_JDK"; then
23690          BOOT_JDK_FOUND=maybe
23691          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23692$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23693        fi
23694
23695
23696    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23697    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23698      # Do we have a bin/java?
23699      if test ! -x "$BOOT_JDK/bin/java"; then
23700        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23702        BOOT_JDK_FOUND=no
23703      else
23704        # Do we have a bin/javac?
23705        if test ! -x "$BOOT_JDK/bin/javac"; then
23706          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23708          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23709$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23710          BOOT_JDK_FOUND=no
23711        else
23712          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23713          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23714
23715          # Extra M4 quote needed to protect [] in grep expression.
23716          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23717          if test "x$FOUND_CORRECT_VERSION" = x; then
23718            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23720            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23721$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23722            BOOT_JDK_FOUND=no
23723          else
23724            # We're done! :-)
23725            BOOT_JDK_FOUND=yes
23726
23727  # Only process if variable expands to non-empty
23728
23729  if test "x$BOOT_JDK" != x; then
23730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23731
23732  # Input might be given as Windows format, start by converting to
23733  # unix format.
23734  path="$BOOT_JDK"
23735  new_path=`$CYGPATH -u "$path"`
23736
23737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23740  # "foo.exe" is OK but "foo" is an error.
23741  #
23742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23743  # It is also a way to make sure we got the proper file name for the real test later on.
23744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23745  if test "x$test_shortpath" = x; then
23746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23748    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23749  fi
23750
23751  # Call helper function which possibly converts this using DOS-style short mode.
23752  # If so, the updated path is stored in $new_path.
23753
23754  input_path="$new_path"
23755  # Check if we need to convert this using DOS-style short mode. If the path
23756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23757  # take no chances and rewrite it.
23758  # Note: m4 eats our [], so we need to use [ and ] instead.
23759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23760  if test "x$has_forbidden_chars" != x; then
23761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23765      # Going to short mode and back again did indeed matter. Since short mode is
23766      # case insensitive, let's make it lowercase to improve readability.
23767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23768      # Now convert it back to Unix-style (cygpath)
23769      input_path=`$CYGPATH -u "$shortmode_path"`
23770      new_path="$input_path"
23771    fi
23772  fi
23773
23774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23775  if test "x$test_cygdrive_prefix" = x; then
23776    # As a simple fix, exclude /usr/bin since it's not a real path.
23777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23779      # a path prefixed by /cygdrive for fixpath to work.
23780      new_path="$CYGWIN_ROOT_PATH$input_path"
23781    fi
23782  fi
23783
23784
23785  if test "x$path" != "x$new_path"; then
23786    BOOT_JDK="$new_path"
23787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23788$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23789  fi
23790
23791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23792
23793  path="$BOOT_JDK"
23794  has_colon=`$ECHO $path | $GREP ^.:`
23795  new_path="$path"
23796  if test "x$has_colon" = x; then
23797    # Not in mixed or Windows style, start by that.
23798    new_path=`cmd //c echo $path`
23799  fi
23800
23801
23802  input_path="$new_path"
23803  # Check if we need to convert this using DOS-style short mode. If the path
23804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23805  # take no chances and rewrite it.
23806  # Note: m4 eats our [], so we need to use [ and ] instead.
23807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23808  if test "x$has_forbidden_chars" != x; then
23809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23811  fi
23812
23813
23814  windows_path="$new_path"
23815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23816    unix_path=`$CYGPATH -u "$windows_path"`
23817    new_path="$unix_path"
23818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23820    new_path="$unix_path"
23821  fi
23822
23823  if test "x$path" != "x$new_path"; then
23824    BOOT_JDK="$new_path"
23825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23826$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23827  fi
23828
23829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23831
23832    else
23833      # We're on a unix platform. Hooray! :)
23834      path="$BOOT_JDK"
23835      has_space=`$ECHO "$path" | $GREP " "`
23836      if test "x$has_space" != x; then
23837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23839        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23840      fi
23841
23842      # Use eval to expand a potential ~
23843      eval path="$path"
23844      if test ! -f "$path" && test ! -d "$path"; then
23845        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23846      fi
23847
23848      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23849    fi
23850  fi
23851
23852            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23853$as_echo_n "checking for Boot JDK... " >&6; }
23854            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23855$as_echo "$BOOT_JDK" >&6; }
23856            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23857$as_echo_n "checking Boot JDK version... " >&6; }
23858            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23860$as_echo "$BOOT_JDK_VERSION" >&6; }
23861          fi # end check jdk version
23862        fi # end check javac
23863      fi # end check java
23864    fi # end check boot jdk found
23865  fi
23866
23867    done
23868  fi
23869
23870  fi
23871
23872
23873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23875      # Do we have a bin/java?
23876      if test ! -x "$BOOT_JDK/bin/java"; then
23877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23879        BOOT_JDK_FOUND=no
23880      else
23881        # Do we have a bin/javac?
23882        if test ! -x "$BOOT_JDK/bin/javac"; then
23883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23887          BOOT_JDK_FOUND=no
23888        else
23889          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23890          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23891
23892          # Extra M4 quote needed to protect [] in grep expression.
23893          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23894          if test "x$FOUND_CORRECT_VERSION" = x; then
23895            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23897            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23898$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23899            BOOT_JDK_FOUND=no
23900          else
23901            # We're done! :-)
23902            BOOT_JDK_FOUND=yes
23903
23904  # Only process if variable expands to non-empty
23905
23906  if test "x$BOOT_JDK" != x; then
23907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23908
23909  # Input might be given as Windows format, start by converting to
23910  # unix format.
23911  path="$BOOT_JDK"
23912  new_path=`$CYGPATH -u "$path"`
23913
23914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23917  # "foo.exe" is OK but "foo" is an error.
23918  #
23919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23920  # It is also a way to make sure we got the proper file name for the real test later on.
23921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23922  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23926  fi
23927
23928  # Call helper function which possibly converts this using DOS-style short mode.
23929  # If so, the updated path is stored in $new_path.
23930
23931  input_path="$new_path"
23932  # Check if we need to convert this using DOS-style short mode. If the path
23933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23934  # take no chances and rewrite it.
23935  # Note: m4 eats our [], so we need to use [ and ] instead.
23936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23937  if test "x$has_forbidden_chars" != x; then
23938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23942      # Going to short mode and back again did indeed matter. Since short mode is
23943      # case insensitive, let's make it lowercase to improve readability.
23944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23945      # Now convert it back to Unix-style (cygpath)
23946      input_path=`$CYGPATH -u "$shortmode_path"`
23947      new_path="$input_path"
23948    fi
23949  fi
23950
23951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23952  if test "x$test_cygdrive_prefix" = x; then
23953    # As a simple fix, exclude /usr/bin since it's not a real path.
23954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23956      # a path prefixed by /cygdrive for fixpath to work.
23957      new_path="$CYGWIN_ROOT_PATH$input_path"
23958    fi
23959  fi
23960
23961
23962  if test "x$path" != "x$new_path"; then
23963    BOOT_JDK="$new_path"
23964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23966  fi
23967
23968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23969
23970  path="$BOOT_JDK"
23971  has_colon=`$ECHO $path | $GREP ^.:`
23972  new_path="$path"
23973  if test "x$has_colon" = x; then
23974    # Not in mixed or Windows style, start by that.
23975    new_path=`cmd //c echo $path`
23976  fi
23977
23978
23979  input_path="$new_path"
23980  # Check if we need to convert this using DOS-style short mode. If the path
23981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23982  # take no chances and rewrite it.
23983  # Note: m4 eats our [], so we need to use [ and ] instead.
23984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23985  if test "x$has_forbidden_chars" != x; then
23986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23988  fi
23989
23990
23991  windows_path="$new_path"
23992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23993    unix_path=`$CYGPATH -u "$windows_path"`
23994    new_path="$unix_path"
23995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23997    new_path="$unix_path"
23998  fi
23999
24000  if test "x$path" != "x$new_path"; then
24001    BOOT_JDK="$new_path"
24002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24004  fi
24005
24006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24008
24009    else
24010      # We're on a unix platform. Hooray! :)
24011      path="$BOOT_JDK"
24012      has_space=`$ECHO "$path" | $GREP " "`
24013      if test "x$has_space" != x; then
24014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24016        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24017      fi
24018
24019      # Use eval to expand a potential ~
24020      eval path="$path"
24021      if test ! -f "$path" && test ! -d "$path"; then
24022        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24023      fi
24024
24025      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24026    fi
24027  fi
24028
24029            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24030$as_echo_n "checking for Boot JDK... " >&6; }
24031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24032$as_echo "$BOOT_JDK" >&6; }
24033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24034$as_echo_n "checking Boot JDK version... " >&6; }
24035            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24037$as_echo "$BOOT_JDK_VERSION" >&6; }
24038          fi # end check jdk version
24039        fi # end check javac
24040      fi # end check java
24041    fi # end check boot jdk found
24042  fi
24043
24044
24045  if test "x$BOOT_JDK_FOUND" = xno; then
24046    # Now execute the test
24047
24048  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24049  BOOT_JDK_SUFFIX=""
24050  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24051  if test "x$ALL_JDKS_FOUND" != x; then
24052    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24053
24054  if test "x$BOOT_JDK_FOUND" = xno; then
24055    # Now execute the test
24056
24057        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24058        if test -d "$BOOT_JDK"; then
24059          BOOT_JDK_FOUND=maybe
24060          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24061$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24062        fi
24063
24064
24065    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24066    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24067      # Do we have a bin/java?
24068      if test ! -x "$BOOT_JDK/bin/java"; then
24069        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24071        BOOT_JDK_FOUND=no
24072      else
24073        # Do we have a bin/javac?
24074        if test ! -x "$BOOT_JDK/bin/javac"; then
24075          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24077          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24078$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24079          BOOT_JDK_FOUND=no
24080        else
24081          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24082          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24083
24084          # Extra M4 quote needed to protect [] in grep expression.
24085          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24086          if test "x$FOUND_CORRECT_VERSION" = x; then
24087            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24089            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24090$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24091            BOOT_JDK_FOUND=no
24092          else
24093            # We're done! :-)
24094            BOOT_JDK_FOUND=yes
24095
24096  # Only process if variable expands to non-empty
24097
24098  if test "x$BOOT_JDK" != x; then
24099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24100
24101  # Input might be given as Windows format, start by converting to
24102  # unix format.
24103  path="$BOOT_JDK"
24104  new_path=`$CYGPATH -u "$path"`
24105
24106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24109  # "foo.exe" is OK but "foo" is an error.
24110  #
24111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24112  # It is also a way to make sure we got the proper file name for the real test later on.
24113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24114  if test "x$test_shortpath" = x; then
24115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24116$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24117    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24118  fi
24119
24120  # Call helper function which possibly converts this using DOS-style short mode.
24121  # If so, the updated path is stored in $new_path.
24122
24123  input_path="$new_path"
24124  # Check if we need to convert this using DOS-style short mode. If the path
24125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24126  # take no chances and rewrite it.
24127  # Note: m4 eats our [], so we need to use [ and ] instead.
24128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24129  if test "x$has_forbidden_chars" != x; then
24130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24134      # Going to short mode and back again did indeed matter. Since short mode is
24135      # case insensitive, let's make it lowercase to improve readability.
24136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24137      # Now convert it back to Unix-style (cygpath)
24138      input_path=`$CYGPATH -u "$shortmode_path"`
24139      new_path="$input_path"
24140    fi
24141  fi
24142
24143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24144  if test "x$test_cygdrive_prefix" = x; then
24145    # As a simple fix, exclude /usr/bin since it's not a real path.
24146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24148      # a path prefixed by /cygdrive for fixpath to work.
24149      new_path="$CYGWIN_ROOT_PATH$input_path"
24150    fi
24151  fi
24152
24153
24154  if test "x$path" != "x$new_path"; then
24155    BOOT_JDK="$new_path"
24156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24158  fi
24159
24160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24161
24162  path="$BOOT_JDK"
24163  has_colon=`$ECHO $path | $GREP ^.:`
24164  new_path="$path"
24165  if test "x$has_colon" = x; then
24166    # Not in mixed or Windows style, start by that.
24167    new_path=`cmd //c echo $path`
24168  fi
24169
24170
24171  input_path="$new_path"
24172  # Check if we need to convert this using DOS-style short mode. If the path
24173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24174  # take no chances and rewrite it.
24175  # Note: m4 eats our [], so we need to use [ and ] instead.
24176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24177  if test "x$has_forbidden_chars" != x; then
24178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24180  fi
24181
24182
24183  windows_path="$new_path"
24184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24185    unix_path=`$CYGPATH -u "$windows_path"`
24186    new_path="$unix_path"
24187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24189    new_path="$unix_path"
24190  fi
24191
24192  if test "x$path" != "x$new_path"; then
24193    BOOT_JDK="$new_path"
24194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24195$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24196  fi
24197
24198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24200
24201    else
24202      # We're on a unix platform. Hooray! :)
24203      path="$BOOT_JDK"
24204      has_space=`$ECHO "$path" | $GREP " "`
24205      if test "x$has_space" != x; then
24206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24209      fi
24210
24211      # Use eval to expand a potential ~
24212      eval path="$path"
24213      if test ! -f "$path" && test ! -d "$path"; then
24214        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24215      fi
24216
24217      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24218    fi
24219  fi
24220
24221            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24222$as_echo_n "checking for Boot JDK... " >&6; }
24223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24224$as_echo "$BOOT_JDK" >&6; }
24225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24226$as_echo_n "checking Boot JDK version... " >&6; }
24227            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24229$as_echo "$BOOT_JDK_VERSION" >&6; }
24230          fi # end check jdk version
24231        fi # end check javac
24232      fi # end check java
24233    fi # end check boot jdk found
24234  fi
24235
24236    done
24237  fi
24238
24239
24240    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24241    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24242      # Do we have a bin/java?
24243      if test ! -x "$BOOT_JDK/bin/java"; then
24244        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24246        BOOT_JDK_FOUND=no
24247      else
24248        # Do we have a bin/javac?
24249        if test ! -x "$BOOT_JDK/bin/javac"; then
24250          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24252          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24253$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24254          BOOT_JDK_FOUND=no
24255        else
24256          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24257          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24258
24259          # Extra M4 quote needed to protect [] in grep expression.
24260          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24261          if test "x$FOUND_CORRECT_VERSION" = x; then
24262            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24264            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24265$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24266            BOOT_JDK_FOUND=no
24267          else
24268            # We're done! :-)
24269            BOOT_JDK_FOUND=yes
24270
24271  # Only process if variable expands to non-empty
24272
24273  if test "x$BOOT_JDK" != x; then
24274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24275
24276  # Input might be given as Windows format, start by converting to
24277  # unix format.
24278  path="$BOOT_JDK"
24279  new_path=`$CYGPATH -u "$path"`
24280
24281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24284  # "foo.exe" is OK but "foo" is an error.
24285  #
24286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24287  # It is also a way to make sure we got the proper file name for the real test later on.
24288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24289  if test "x$test_shortpath" = x; then
24290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24292    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24293  fi
24294
24295  # Call helper function which possibly converts this using DOS-style short mode.
24296  # If so, the updated path is stored in $new_path.
24297
24298  input_path="$new_path"
24299  # Check if we need to convert this using DOS-style short mode. If the path
24300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24301  # take no chances and rewrite it.
24302  # Note: m4 eats our [], so we need to use [ and ] instead.
24303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24304  if test "x$has_forbidden_chars" != x; then
24305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24309      # Going to short mode and back again did indeed matter. Since short mode is
24310      # case insensitive, let's make it lowercase to improve readability.
24311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24312      # Now convert it back to Unix-style (cygpath)
24313      input_path=`$CYGPATH -u "$shortmode_path"`
24314      new_path="$input_path"
24315    fi
24316  fi
24317
24318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24319  if test "x$test_cygdrive_prefix" = x; then
24320    # As a simple fix, exclude /usr/bin since it's not a real path.
24321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24323      # a path prefixed by /cygdrive for fixpath to work.
24324      new_path="$CYGWIN_ROOT_PATH$input_path"
24325    fi
24326  fi
24327
24328
24329  if test "x$path" != "x$new_path"; then
24330    BOOT_JDK="$new_path"
24331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24333  fi
24334
24335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24336
24337  path="$BOOT_JDK"
24338  has_colon=`$ECHO $path | $GREP ^.:`
24339  new_path="$path"
24340  if test "x$has_colon" = x; then
24341    # Not in mixed or Windows style, start by that.
24342    new_path=`cmd //c echo $path`
24343  fi
24344
24345
24346  input_path="$new_path"
24347  # Check if we need to convert this using DOS-style short mode. If the path
24348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24349  # take no chances and rewrite it.
24350  # Note: m4 eats our [], so we need to use [ and ] instead.
24351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24352  if test "x$has_forbidden_chars" != x; then
24353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24355  fi
24356
24357
24358  windows_path="$new_path"
24359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24360    unix_path=`$CYGPATH -u "$windows_path"`
24361    new_path="$unix_path"
24362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24364    new_path="$unix_path"
24365  fi
24366
24367  if test "x$path" != "x$new_path"; then
24368    BOOT_JDK="$new_path"
24369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24371  fi
24372
24373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24375
24376    else
24377      # We're on a unix platform. Hooray! :)
24378      path="$BOOT_JDK"
24379      has_space=`$ECHO "$path" | $GREP " "`
24380      if test "x$has_space" != x; then
24381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24384      fi
24385
24386      # Use eval to expand a potential ~
24387      eval path="$path"
24388      if test ! -f "$path" && test ! -d "$path"; then
24389        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24390      fi
24391
24392      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24393    fi
24394  fi
24395
24396            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24397$as_echo_n "checking for Boot JDK... " >&6; }
24398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24399$as_echo "$BOOT_JDK" >&6; }
24400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24401$as_echo_n "checking Boot JDK version... " >&6; }
24402            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24403            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24404$as_echo "$BOOT_JDK_VERSION" >&6; }
24405          fi # end check jdk version
24406        fi # end check javac
24407      fi # end check java
24408    fi # end check boot jdk found
24409  fi
24410
24411  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24412
24413  if test "x$BOOT_JDK_FOUND" = xno; then
24414    # Now execute the test
24415
24416  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24417  BOOT_JDK_SUFFIX="/Contents/Home"
24418  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24419  if test "x$ALL_JDKS_FOUND" != x; then
24420    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24421
24422  if test "x$BOOT_JDK_FOUND" = xno; then
24423    # Now execute the test
24424
24425        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24426        if test -d "$BOOT_JDK"; then
24427          BOOT_JDK_FOUND=maybe
24428          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24429$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24430        fi
24431
24432
24433    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24434    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24435      # Do we have a bin/java?
24436      if test ! -x "$BOOT_JDK/bin/java"; then
24437        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24439        BOOT_JDK_FOUND=no
24440      else
24441        # Do we have a bin/javac?
24442        if test ! -x "$BOOT_JDK/bin/javac"; then
24443          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24445          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24446$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24447          BOOT_JDK_FOUND=no
24448        else
24449          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24450          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24451
24452          # Extra M4 quote needed to protect [] in grep expression.
24453          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24454          if test "x$FOUND_CORRECT_VERSION" = x; then
24455            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24457            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24458$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24459            BOOT_JDK_FOUND=no
24460          else
24461            # We're done! :-)
24462            BOOT_JDK_FOUND=yes
24463
24464  # Only process if variable expands to non-empty
24465
24466  if test "x$BOOT_JDK" != x; then
24467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24468
24469  # Input might be given as Windows format, start by converting to
24470  # unix format.
24471  path="$BOOT_JDK"
24472  new_path=`$CYGPATH -u "$path"`
24473
24474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24477  # "foo.exe" is OK but "foo" is an error.
24478  #
24479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24480  # It is also a way to make sure we got the proper file name for the real test later on.
24481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24482  if test "x$test_shortpath" = x; then
24483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24485    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24486  fi
24487
24488  # Call helper function which possibly converts this using DOS-style short mode.
24489  # If so, the updated path is stored in $new_path.
24490
24491  input_path="$new_path"
24492  # Check if we need to convert this using DOS-style short mode. If the path
24493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24494  # take no chances and rewrite it.
24495  # Note: m4 eats our [], so we need to use [ and ] instead.
24496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24497  if test "x$has_forbidden_chars" != x; then
24498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24502      # Going to short mode and back again did indeed matter. Since short mode is
24503      # case insensitive, let's make it lowercase to improve readability.
24504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24505      # Now convert it back to Unix-style (cygpath)
24506      input_path=`$CYGPATH -u "$shortmode_path"`
24507      new_path="$input_path"
24508    fi
24509  fi
24510
24511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24512  if test "x$test_cygdrive_prefix" = x; then
24513    # As a simple fix, exclude /usr/bin since it's not a real path.
24514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24516      # a path prefixed by /cygdrive for fixpath to work.
24517      new_path="$CYGWIN_ROOT_PATH$input_path"
24518    fi
24519  fi
24520
24521
24522  if test "x$path" != "x$new_path"; then
24523    BOOT_JDK="$new_path"
24524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24526  fi
24527
24528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24529
24530  path="$BOOT_JDK"
24531  has_colon=`$ECHO $path | $GREP ^.:`
24532  new_path="$path"
24533  if test "x$has_colon" = x; then
24534    # Not in mixed or Windows style, start by that.
24535    new_path=`cmd //c echo $path`
24536  fi
24537
24538
24539  input_path="$new_path"
24540  # Check if we need to convert this using DOS-style short mode. If the path
24541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24542  # take no chances and rewrite it.
24543  # Note: m4 eats our [], so we need to use [ and ] instead.
24544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24545  if test "x$has_forbidden_chars" != x; then
24546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24548  fi
24549
24550
24551  windows_path="$new_path"
24552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24553    unix_path=`$CYGPATH -u "$windows_path"`
24554    new_path="$unix_path"
24555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24557    new_path="$unix_path"
24558  fi
24559
24560  if test "x$path" != "x$new_path"; then
24561    BOOT_JDK="$new_path"
24562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24563$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24564  fi
24565
24566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24568
24569    else
24570      # We're on a unix platform. Hooray! :)
24571      path="$BOOT_JDK"
24572      has_space=`$ECHO "$path" | $GREP " "`
24573      if test "x$has_space" != x; then
24574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24577      fi
24578
24579      # Use eval to expand a potential ~
24580      eval path="$path"
24581      if test ! -f "$path" && test ! -d "$path"; then
24582        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24583      fi
24584
24585      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24586    fi
24587  fi
24588
24589            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24590$as_echo_n "checking for Boot JDK... " >&6; }
24591            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24592$as_echo "$BOOT_JDK" >&6; }
24593            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24594$as_echo_n "checking Boot JDK version... " >&6; }
24595            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24596            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24597$as_echo "$BOOT_JDK_VERSION" >&6; }
24598          fi # end check jdk version
24599        fi # end check javac
24600      fi # end check java
24601    fi # end check boot jdk found
24602  fi
24603
24604    done
24605  fi
24606
24607
24608    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24609    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24610      # Do we have a bin/java?
24611      if test ! -x "$BOOT_JDK/bin/java"; then
24612        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24614        BOOT_JDK_FOUND=no
24615      else
24616        # Do we have a bin/javac?
24617        if test ! -x "$BOOT_JDK/bin/javac"; then
24618          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24620          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24621$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24622          BOOT_JDK_FOUND=no
24623        else
24624          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24625          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24626
24627          # Extra M4 quote needed to protect [] in grep expression.
24628          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24629          if test "x$FOUND_CORRECT_VERSION" = x; then
24630            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24632            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24633$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24634            BOOT_JDK_FOUND=no
24635          else
24636            # We're done! :-)
24637            BOOT_JDK_FOUND=yes
24638
24639  # Only process if variable expands to non-empty
24640
24641  if test "x$BOOT_JDK" != x; then
24642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24643
24644  # Input might be given as Windows format, start by converting to
24645  # unix format.
24646  path="$BOOT_JDK"
24647  new_path=`$CYGPATH -u "$path"`
24648
24649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24652  # "foo.exe" is OK but "foo" is an error.
24653  #
24654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24655  # It is also a way to make sure we got the proper file name for the real test later on.
24656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24657  if test "x$test_shortpath" = x; then
24658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24660    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24661  fi
24662
24663  # Call helper function which possibly converts this using DOS-style short mode.
24664  # If so, the updated path is stored in $new_path.
24665
24666  input_path="$new_path"
24667  # Check if we need to convert this using DOS-style short mode. If the path
24668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24669  # take no chances and rewrite it.
24670  # Note: m4 eats our [], so we need to use [ and ] instead.
24671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24672  if test "x$has_forbidden_chars" != x; then
24673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24677      # Going to short mode and back again did indeed matter. Since short mode is
24678      # case insensitive, let's make it lowercase to improve readability.
24679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24680      # Now convert it back to Unix-style (cygpath)
24681      input_path=`$CYGPATH -u "$shortmode_path"`
24682      new_path="$input_path"
24683    fi
24684  fi
24685
24686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24687  if test "x$test_cygdrive_prefix" = x; then
24688    # As a simple fix, exclude /usr/bin since it's not a real path.
24689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24691      # a path prefixed by /cygdrive for fixpath to work.
24692      new_path="$CYGWIN_ROOT_PATH$input_path"
24693    fi
24694  fi
24695
24696
24697  if test "x$path" != "x$new_path"; then
24698    BOOT_JDK="$new_path"
24699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24700$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24701  fi
24702
24703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24704
24705  path="$BOOT_JDK"
24706  has_colon=`$ECHO $path | $GREP ^.:`
24707  new_path="$path"
24708  if test "x$has_colon" = x; then
24709    # Not in mixed or Windows style, start by that.
24710    new_path=`cmd //c echo $path`
24711  fi
24712
24713
24714  input_path="$new_path"
24715  # Check if we need to convert this using DOS-style short mode. If the path
24716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24717  # take no chances and rewrite it.
24718  # Note: m4 eats our [], so we need to use [ and ] instead.
24719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24720  if test "x$has_forbidden_chars" != x; then
24721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24723  fi
24724
24725
24726  windows_path="$new_path"
24727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24728    unix_path=`$CYGPATH -u "$windows_path"`
24729    new_path="$unix_path"
24730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24732    new_path="$unix_path"
24733  fi
24734
24735  if test "x$path" != "x$new_path"; then
24736    BOOT_JDK="$new_path"
24737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24738$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24739  fi
24740
24741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24743
24744    else
24745      # We're on a unix platform. Hooray! :)
24746      path="$BOOT_JDK"
24747      has_space=`$ECHO "$path" | $GREP " "`
24748      if test "x$has_space" != x; then
24749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24750$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24751        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24752      fi
24753
24754      # Use eval to expand a potential ~
24755      eval path="$path"
24756      if test ! -f "$path" && test ! -d "$path"; then
24757        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24758      fi
24759
24760      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24761    fi
24762  fi
24763
24764            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24765$as_echo_n "checking for Boot JDK... " >&6; }
24766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24767$as_echo "$BOOT_JDK" >&6; }
24768            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24769$as_echo_n "checking Boot JDK version... " >&6; }
24770            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24772$as_echo "$BOOT_JDK_VERSION" >&6; }
24773          fi # end check jdk version
24774        fi # end check javac
24775      fi # end check java
24776    fi # end check boot jdk found
24777  fi
24778
24779
24780  if test "x$BOOT_JDK_FOUND" = xno; then
24781    # Now execute the test
24782
24783  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24784  BOOT_JDK_SUFFIX="/Contents/Home"
24785  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24786  if test "x$ALL_JDKS_FOUND" != x; then
24787    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24788
24789  if test "x$BOOT_JDK_FOUND" = xno; then
24790    # Now execute the test
24791
24792        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24793        if test -d "$BOOT_JDK"; then
24794          BOOT_JDK_FOUND=maybe
24795          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24796$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24797        fi
24798
24799
24800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24802      # Do we have a bin/java?
24803      if test ! -x "$BOOT_JDK/bin/java"; then
24804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24806        BOOT_JDK_FOUND=no
24807      else
24808        # Do we have a bin/javac?
24809        if test ! -x "$BOOT_JDK/bin/javac"; then
24810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24814          BOOT_JDK_FOUND=no
24815        else
24816          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24817          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24818
24819          # Extra M4 quote needed to protect [] in grep expression.
24820          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24821          if test "x$FOUND_CORRECT_VERSION" = x; then
24822            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24824            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24826            BOOT_JDK_FOUND=no
24827          else
24828            # We're done! :-)
24829            BOOT_JDK_FOUND=yes
24830
24831  # Only process if variable expands to non-empty
24832
24833  if test "x$BOOT_JDK" != x; then
24834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24835
24836  # Input might be given as Windows format, start by converting to
24837  # unix format.
24838  path="$BOOT_JDK"
24839  new_path=`$CYGPATH -u "$path"`
24840
24841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24844  # "foo.exe" is OK but "foo" is an error.
24845  #
24846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24847  # It is also a way to make sure we got the proper file name for the real test later on.
24848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24849  if test "x$test_shortpath" = x; then
24850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24853  fi
24854
24855  # Call helper function which possibly converts this using DOS-style short mode.
24856  # If so, the updated path is stored in $new_path.
24857
24858  input_path="$new_path"
24859  # Check if we need to convert this using DOS-style short mode. If the path
24860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24861  # take no chances and rewrite it.
24862  # Note: m4 eats our [], so we need to use [ and ] instead.
24863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24864  if test "x$has_forbidden_chars" != x; then
24865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24869      # Going to short mode and back again did indeed matter. Since short mode is
24870      # case insensitive, let's make it lowercase to improve readability.
24871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24872      # Now convert it back to Unix-style (cygpath)
24873      input_path=`$CYGPATH -u "$shortmode_path"`
24874      new_path="$input_path"
24875    fi
24876  fi
24877
24878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24879  if test "x$test_cygdrive_prefix" = x; then
24880    # As a simple fix, exclude /usr/bin since it's not a real path.
24881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24883      # a path prefixed by /cygdrive for fixpath to work.
24884      new_path="$CYGWIN_ROOT_PATH$input_path"
24885    fi
24886  fi
24887
24888
24889  if test "x$path" != "x$new_path"; then
24890    BOOT_JDK="$new_path"
24891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24893  fi
24894
24895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24896
24897  path="$BOOT_JDK"
24898  has_colon=`$ECHO $path | $GREP ^.:`
24899  new_path="$path"
24900  if test "x$has_colon" = x; then
24901    # Not in mixed or Windows style, start by that.
24902    new_path=`cmd //c echo $path`
24903  fi
24904
24905
24906  input_path="$new_path"
24907  # Check if we need to convert this using DOS-style short mode. If the path
24908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24909  # take no chances and rewrite it.
24910  # Note: m4 eats our [], so we need to use [ and ] instead.
24911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24912  if test "x$has_forbidden_chars" != x; then
24913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24915  fi
24916
24917
24918  windows_path="$new_path"
24919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24920    unix_path=`$CYGPATH -u "$windows_path"`
24921    new_path="$unix_path"
24922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24924    new_path="$unix_path"
24925  fi
24926
24927  if test "x$path" != "x$new_path"; then
24928    BOOT_JDK="$new_path"
24929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24931  fi
24932
24933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24935
24936    else
24937      # We're on a unix platform. Hooray! :)
24938      path="$BOOT_JDK"
24939      has_space=`$ECHO "$path" | $GREP " "`
24940      if test "x$has_space" != x; then
24941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24944      fi
24945
24946      # Use eval to expand a potential ~
24947      eval path="$path"
24948      if test ! -f "$path" && test ! -d "$path"; then
24949        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24950      fi
24951
24952      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24953    fi
24954  fi
24955
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24957$as_echo_n "checking for Boot JDK... " >&6; }
24958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24959$as_echo "$BOOT_JDK" >&6; }
24960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24961$as_echo_n "checking Boot JDK version... " >&6; }
24962            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24964$as_echo "$BOOT_JDK_VERSION" >&6; }
24965          fi # end check jdk version
24966        fi # end check javac
24967      fi # end check java
24968    fi # end check boot jdk found
24969  fi
24970
24971    done
24972  fi
24973
24974
24975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24977      # Do we have a bin/java?
24978      if test ! -x "$BOOT_JDK/bin/java"; then
24979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24981        BOOT_JDK_FOUND=no
24982      else
24983        # Do we have a bin/javac?
24984        if test ! -x "$BOOT_JDK/bin/javac"; then
24985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24989          BOOT_JDK_FOUND=no
24990        else
24991          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24992          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24993
24994          # Extra M4 quote needed to protect [] in grep expression.
24995          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24996          if test "x$FOUND_CORRECT_VERSION" = x; then
24997            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24999            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25000$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25001            BOOT_JDK_FOUND=no
25002          else
25003            # We're done! :-)
25004            BOOT_JDK_FOUND=yes
25005
25006  # Only process if variable expands to non-empty
25007
25008  if test "x$BOOT_JDK" != x; then
25009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25010
25011  # Input might be given as Windows format, start by converting to
25012  # unix format.
25013  path="$BOOT_JDK"
25014  new_path=`$CYGPATH -u "$path"`
25015
25016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25019  # "foo.exe" is OK but "foo" is an error.
25020  #
25021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25022  # It is also a way to make sure we got the proper file name for the real test later on.
25023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25024  if test "x$test_shortpath" = x; then
25025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25027    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25028  fi
25029
25030  # Call helper function which possibly converts this using DOS-style short mode.
25031  # If so, the updated path is stored in $new_path.
25032
25033  input_path="$new_path"
25034  # Check if we need to convert this using DOS-style short mode. If the path
25035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25036  # take no chances and rewrite it.
25037  # Note: m4 eats our [], so we need to use [ and ] instead.
25038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25039  if test "x$has_forbidden_chars" != x; then
25040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25044      # Going to short mode and back again did indeed matter. Since short mode is
25045      # case insensitive, let's make it lowercase to improve readability.
25046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25047      # Now convert it back to Unix-style (cygpath)
25048      input_path=`$CYGPATH -u "$shortmode_path"`
25049      new_path="$input_path"
25050    fi
25051  fi
25052
25053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25054  if test "x$test_cygdrive_prefix" = x; then
25055    # As a simple fix, exclude /usr/bin since it's not a real path.
25056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25058      # a path prefixed by /cygdrive for fixpath to work.
25059      new_path="$CYGWIN_ROOT_PATH$input_path"
25060    fi
25061  fi
25062
25063
25064  if test "x$path" != "x$new_path"; then
25065    BOOT_JDK="$new_path"
25066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25068  fi
25069
25070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25071
25072  path="$BOOT_JDK"
25073  has_colon=`$ECHO $path | $GREP ^.:`
25074  new_path="$path"
25075  if test "x$has_colon" = x; then
25076    # Not in mixed or Windows style, start by that.
25077    new_path=`cmd //c echo $path`
25078  fi
25079
25080
25081  input_path="$new_path"
25082  # Check if we need to convert this using DOS-style short mode. If the path
25083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25084  # take no chances and rewrite it.
25085  # Note: m4 eats our [], so we need to use [ and ] instead.
25086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25087  if test "x$has_forbidden_chars" != x; then
25088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25090  fi
25091
25092
25093  windows_path="$new_path"
25094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25095    unix_path=`$CYGPATH -u "$windows_path"`
25096    new_path="$unix_path"
25097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25099    new_path="$unix_path"
25100  fi
25101
25102  if test "x$path" != "x$new_path"; then
25103    BOOT_JDK="$new_path"
25104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25106  fi
25107
25108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25110
25111    else
25112      # We're on a unix platform. Hooray! :)
25113      path="$BOOT_JDK"
25114      has_space=`$ECHO "$path" | $GREP " "`
25115      if test "x$has_space" != x; then
25116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25119      fi
25120
25121      # Use eval to expand a potential ~
25122      eval path="$path"
25123      if test ! -f "$path" && test ! -d "$path"; then
25124        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25125      fi
25126
25127      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25128    fi
25129  fi
25130
25131            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25132$as_echo_n "checking for Boot JDK... " >&6; }
25133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25134$as_echo "$BOOT_JDK" >&6; }
25135            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25136$as_echo_n "checking Boot JDK version... " >&6; }
25137            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25139$as_echo "$BOOT_JDK_VERSION" >&6; }
25140          fi # end check jdk version
25141        fi # end check javac
25142      fi # end check java
25143    fi # end check boot jdk found
25144  fi
25145
25146  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25147
25148  if test "x$BOOT_JDK_FOUND" = xno; then
25149    # Now execute the test
25150
25151  BOOT_JDK_PREFIX="/usr/lib/jvm"
25152  BOOT_JDK_SUFFIX=""
25153  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25154  if test "x$ALL_JDKS_FOUND" != x; then
25155    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25156
25157  if test "x$BOOT_JDK_FOUND" = xno; then
25158    # Now execute the test
25159
25160        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25161        if test -d "$BOOT_JDK"; then
25162          BOOT_JDK_FOUND=maybe
25163          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25164$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25165        fi
25166
25167
25168    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25169    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25170      # Do we have a bin/java?
25171      if test ! -x "$BOOT_JDK/bin/java"; then
25172        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25174        BOOT_JDK_FOUND=no
25175      else
25176        # Do we have a bin/javac?
25177        if test ! -x "$BOOT_JDK/bin/javac"; then
25178          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25180          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25181$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25182          BOOT_JDK_FOUND=no
25183        else
25184          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25185          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25186
25187          # Extra M4 quote needed to protect [] in grep expression.
25188          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25189          if test "x$FOUND_CORRECT_VERSION" = x; then
25190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25192            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25193$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25194            BOOT_JDK_FOUND=no
25195          else
25196            # We're done! :-)
25197            BOOT_JDK_FOUND=yes
25198
25199  # Only process if variable expands to non-empty
25200
25201  if test "x$BOOT_JDK" != x; then
25202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25203
25204  # Input might be given as Windows format, start by converting to
25205  # unix format.
25206  path="$BOOT_JDK"
25207  new_path=`$CYGPATH -u "$path"`
25208
25209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25212  # "foo.exe" is OK but "foo" is an error.
25213  #
25214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25215  # It is also a way to make sure we got the proper file name for the real test later on.
25216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25217  if test "x$test_shortpath" = x; then
25218    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25219$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25220    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25221  fi
25222
25223  # Call helper function which possibly converts this using DOS-style short mode.
25224  # If so, the updated path is stored in $new_path.
25225
25226  input_path="$new_path"
25227  # Check if we need to convert this using DOS-style short mode. If the path
25228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25229  # take no chances and rewrite it.
25230  # Note: m4 eats our [], so we need to use [ and ] instead.
25231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25232  if test "x$has_forbidden_chars" != x; then
25233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25237      # Going to short mode and back again did indeed matter. Since short mode is
25238      # case insensitive, let's make it lowercase to improve readability.
25239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25240      # Now convert it back to Unix-style (cygpath)
25241      input_path=`$CYGPATH -u "$shortmode_path"`
25242      new_path="$input_path"
25243    fi
25244  fi
25245
25246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25247  if test "x$test_cygdrive_prefix" = x; then
25248    # As a simple fix, exclude /usr/bin since it's not a real path.
25249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25251      # a path prefixed by /cygdrive for fixpath to work.
25252      new_path="$CYGWIN_ROOT_PATH$input_path"
25253    fi
25254  fi
25255
25256
25257  if test "x$path" != "x$new_path"; then
25258    BOOT_JDK="$new_path"
25259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25261  fi
25262
25263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25264
25265  path="$BOOT_JDK"
25266  has_colon=`$ECHO $path | $GREP ^.:`
25267  new_path="$path"
25268  if test "x$has_colon" = x; then
25269    # Not in mixed or Windows style, start by that.
25270    new_path=`cmd //c echo $path`
25271  fi
25272
25273
25274  input_path="$new_path"
25275  # Check if we need to convert this using DOS-style short mode. If the path
25276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25277  # take no chances and rewrite it.
25278  # Note: m4 eats our [], so we need to use [ and ] instead.
25279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25280  if test "x$has_forbidden_chars" != x; then
25281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25283  fi
25284
25285
25286  windows_path="$new_path"
25287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25288    unix_path=`$CYGPATH -u "$windows_path"`
25289    new_path="$unix_path"
25290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25292    new_path="$unix_path"
25293  fi
25294
25295  if test "x$path" != "x$new_path"; then
25296    BOOT_JDK="$new_path"
25297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25299  fi
25300
25301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25303
25304    else
25305      # We're on a unix platform. Hooray! :)
25306      path="$BOOT_JDK"
25307      has_space=`$ECHO "$path" | $GREP " "`
25308      if test "x$has_space" != x; then
25309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25311        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25312      fi
25313
25314      # Use eval to expand a potential ~
25315      eval path="$path"
25316      if test ! -f "$path" && test ! -d "$path"; then
25317        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25318      fi
25319
25320      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25321    fi
25322  fi
25323
25324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25325$as_echo_n "checking for Boot JDK... " >&6; }
25326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25327$as_echo "$BOOT_JDK" >&6; }
25328            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25329$as_echo_n "checking Boot JDK version... " >&6; }
25330            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25332$as_echo "$BOOT_JDK_VERSION" >&6; }
25333          fi # end check jdk version
25334        fi # end check javac
25335      fi # end check java
25336    fi # end check boot jdk found
25337  fi
25338
25339    done
25340  fi
25341
25342
25343    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25344    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25345      # Do we have a bin/java?
25346      if test ! -x "$BOOT_JDK/bin/java"; then
25347        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25349        BOOT_JDK_FOUND=no
25350      else
25351        # Do we have a bin/javac?
25352        if test ! -x "$BOOT_JDK/bin/javac"; then
25353          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25355          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25356$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25357          BOOT_JDK_FOUND=no
25358        else
25359          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25360          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25361
25362          # Extra M4 quote needed to protect [] in grep expression.
25363          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25364          if test "x$FOUND_CORRECT_VERSION" = x; then
25365            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25367            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25368$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25369            BOOT_JDK_FOUND=no
25370          else
25371            # We're done! :-)
25372            BOOT_JDK_FOUND=yes
25373
25374  # Only process if variable expands to non-empty
25375
25376  if test "x$BOOT_JDK" != x; then
25377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25378
25379  # Input might be given as Windows format, start by converting to
25380  # unix format.
25381  path="$BOOT_JDK"
25382  new_path=`$CYGPATH -u "$path"`
25383
25384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25387  # "foo.exe" is OK but "foo" is an error.
25388  #
25389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25390  # It is also a way to make sure we got the proper file name for the real test later on.
25391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25392  if test "x$test_shortpath" = x; then
25393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25395    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25396  fi
25397
25398  # Call helper function which possibly converts this using DOS-style short mode.
25399  # If so, the updated path is stored in $new_path.
25400
25401  input_path="$new_path"
25402  # Check if we need to convert this using DOS-style short mode. If the path
25403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25404  # take no chances and rewrite it.
25405  # Note: m4 eats our [], so we need to use [ and ] instead.
25406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25407  if test "x$has_forbidden_chars" != x; then
25408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25412      # Going to short mode and back again did indeed matter. Since short mode is
25413      # case insensitive, let's make it lowercase to improve readability.
25414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25415      # Now convert it back to Unix-style (cygpath)
25416      input_path=`$CYGPATH -u "$shortmode_path"`
25417      new_path="$input_path"
25418    fi
25419  fi
25420
25421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25422  if test "x$test_cygdrive_prefix" = x; then
25423    # As a simple fix, exclude /usr/bin since it's not a real path.
25424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25426      # a path prefixed by /cygdrive for fixpath to work.
25427      new_path="$CYGWIN_ROOT_PATH$input_path"
25428    fi
25429  fi
25430
25431
25432  if test "x$path" != "x$new_path"; then
25433    BOOT_JDK="$new_path"
25434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25436  fi
25437
25438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25439
25440  path="$BOOT_JDK"
25441  has_colon=`$ECHO $path | $GREP ^.:`
25442  new_path="$path"
25443  if test "x$has_colon" = x; then
25444    # Not in mixed or Windows style, start by that.
25445    new_path=`cmd //c echo $path`
25446  fi
25447
25448
25449  input_path="$new_path"
25450  # Check if we need to convert this using DOS-style short mode. If the path
25451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25452  # take no chances and rewrite it.
25453  # Note: m4 eats our [], so we need to use [ and ] instead.
25454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25455  if test "x$has_forbidden_chars" != x; then
25456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25458  fi
25459
25460
25461  windows_path="$new_path"
25462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25463    unix_path=`$CYGPATH -u "$windows_path"`
25464    new_path="$unix_path"
25465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25467    new_path="$unix_path"
25468  fi
25469
25470  if test "x$path" != "x$new_path"; then
25471    BOOT_JDK="$new_path"
25472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25473$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25474  fi
25475
25476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25478
25479    else
25480      # We're on a unix platform. Hooray! :)
25481      path="$BOOT_JDK"
25482      has_space=`$ECHO "$path" | $GREP " "`
25483      if test "x$has_space" != x; then
25484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25487      fi
25488
25489      # Use eval to expand a potential ~
25490      eval path="$path"
25491      if test ! -f "$path" && test ! -d "$path"; then
25492        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25493      fi
25494
25495      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25496    fi
25497  fi
25498
25499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25500$as_echo_n "checking for Boot JDK... " >&6; }
25501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25502$as_echo "$BOOT_JDK" >&6; }
25503            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25504$as_echo_n "checking Boot JDK version... " >&6; }
25505            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25506            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25507$as_echo "$BOOT_JDK_VERSION" >&6; }
25508          fi # end check jdk version
25509        fi # end check javac
25510      fi # end check java
25511    fi # end check boot jdk found
25512  fi
25513
25514  fi
25515
25516
25517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25519      # Do we have a bin/java?
25520      if test ! -x "$BOOT_JDK/bin/java"; then
25521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25523        BOOT_JDK_FOUND=no
25524      else
25525        # Do we have a bin/javac?
25526        if test ! -x "$BOOT_JDK/bin/javac"; then
25527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25531          BOOT_JDK_FOUND=no
25532        else
25533          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25534          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25535
25536          # Extra M4 quote needed to protect [] in grep expression.
25537          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25538          if test "x$FOUND_CORRECT_VERSION" = x; then
25539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25541            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25542$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25543            BOOT_JDK_FOUND=no
25544          else
25545            # We're done! :-)
25546            BOOT_JDK_FOUND=yes
25547
25548  # Only process if variable expands to non-empty
25549
25550  if test "x$BOOT_JDK" != x; then
25551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25552
25553  # Input might be given as Windows format, start by converting to
25554  # unix format.
25555  path="$BOOT_JDK"
25556  new_path=`$CYGPATH -u "$path"`
25557
25558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25561  # "foo.exe" is OK but "foo" is an error.
25562  #
25563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25564  # It is also a way to make sure we got the proper file name for the real test later on.
25565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25566  if test "x$test_shortpath" = x; then
25567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25570  fi
25571
25572  # Call helper function which possibly converts this using DOS-style short mode.
25573  # If so, the updated path is stored in $new_path.
25574
25575  input_path="$new_path"
25576  # Check if we need to convert this using DOS-style short mode. If the path
25577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25578  # take no chances and rewrite it.
25579  # Note: m4 eats our [], so we need to use [ and ] instead.
25580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25581  if test "x$has_forbidden_chars" != x; then
25582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25586      # Going to short mode and back again did indeed matter. Since short mode is
25587      # case insensitive, let's make it lowercase to improve readability.
25588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25589      # Now convert it back to Unix-style (cygpath)
25590      input_path=`$CYGPATH -u "$shortmode_path"`
25591      new_path="$input_path"
25592    fi
25593  fi
25594
25595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25596  if test "x$test_cygdrive_prefix" = x; then
25597    # As a simple fix, exclude /usr/bin since it's not a real path.
25598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25600      # a path prefixed by /cygdrive for fixpath to work.
25601      new_path="$CYGWIN_ROOT_PATH$input_path"
25602    fi
25603  fi
25604
25605
25606  if test "x$path" != "x$new_path"; then
25607    BOOT_JDK="$new_path"
25608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25610  fi
25611
25612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25613
25614  path="$BOOT_JDK"
25615  has_colon=`$ECHO $path | $GREP ^.:`
25616  new_path="$path"
25617  if test "x$has_colon" = x; then
25618    # Not in mixed or Windows style, start by that.
25619    new_path=`cmd //c echo $path`
25620  fi
25621
25622
25623  input_path="$new_path"
25624  # Check if we need to convert this using DOS-style short mode. If the path
25625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25626  # take no chances and rewrite it.
25627  # Note: m4 eats our [], so we need to use [ and ] instead.
25628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25629  if test "x$has_forbidden_chars" != x; then
25630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25632  fi
25633
25634
25635  windows_path="$new_path"
25636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25637    unix_path=`$CYGPATH -u "$windows_path"`
25638    new_path="$unix_path"
25639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25641    new_path="$unix_path"
25642  fi
25643
25644  if test "x$path" != "x$new_path"; then
25645    BOOT_JDK="$new_path"
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25648  fi
25649
25650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25652
25653    else
25654      # We're on a unix platform. Hooray! :)
25655      path="$BOOT_JDK"
25656      has_space=`$ECHO "$path" | $GREP " "`
25657      if test "x$has_space" != x; then
25658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25661      fi
25662
25663      # Use eval to expand a potential ~
25664      eval path="$path"
25665      if test ! -f "$path" && test ! -d "$path"; then
25666        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25667      fi
25668
25669      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25670    fi
25671  fi
25672
25673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25674$as_echo_n "checking for Boot JDK... " >&6; }
25675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25676$as_echo "$BOOT_JDK" >&6; }
25677            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25678$as_echo_n "checking Boot JDK version... " >&6; }
25679            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25681$as_echo "$BOOT_JDK_VERSION" >&6; }
25682          fi # end check jdk version
25683        fi # end check javac
25684      fi # end check java
25685    fi # end check boot jdk found
25686  fi
25687
25688
25689  # If we haven't found anything yet, we've truly lost. Give up.
25690  if test "x$BOOT_JDK_FOUND" = xno; then
25691
25692  # Print a helpful message on how to acquire the necessary build dependency.
25693  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25694  MISSING_DEPENDENCY=openjdk
25695
25696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25697    cygwin_help $MISSING_DEPENDENCY
25698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25699    msys_help $MISSING_DEPENDENCY
25700  else
25701    PKGHANDLER_COMMAND=
25702
25703    case $PKGHANDLER in
25704      apt-get)
25705        apt_help     $MISSING_DEPENDENCY ;;
25706      yum)
25707        yum_help     $MISSING_DEPENDENCY ;;
25708      port)
25709        port_help    $MISSING_DEPENDENCY ;;
25710      pkgutil)
25711        pkgutil_help $MISSING_DEPENDENCY ;;
25712      pkgadd)
25713        pkgadd_help  $MISSING_DEPENDENCY ;;
25714    esac
25715
25716    if test "x$PKGHANDLER_COMMAND" != x; then
25717      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25718    fi
25719  fi
25720
25721    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25722$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25723    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25724$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25725    as_fn_error $? "Cannot continue" "$LINENO" 5
25726  fi
25727
25728
25729
25730  # Setup tools from the Boot JDK.
25731
25732  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25733
25734  # Publish this variable in the help.
25735
25736
25737  if test "x$JAVA" = x; then
25738    # The variable is not set by user, try to locate tool using the code snippet
25739
25740      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25741$as_echo_n "checking for java in Boot JDK... " >&6; }
25742      JAVA=$BOOT_JDK/bin/java
25743      if test ! -x $JAVA; then
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25745$as_echo "not found" >&6; }
25746        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25747$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25748        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25749      fi
25750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25751$as_echo "ok" >&6; }
25752
25753
25754  else
25755    # The variable is set, but is it from the command line or the environment?
25756
25757    # Try to remove the string !JAVA! from our list.
25758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25760      # If it failed, the variable was not from the command line. Ignore it,
25761      # but warn the user (except for BASH, which is always set by the calling BASH).
25762      if test "xJAVA" != xBASH; then
25763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25764$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25765      fi
25766      # Try to locate tool using the code snippet
25767
25768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25769$as_echo_n "checking for java in Boot JDK... " >&6; }
25770      JAVA=$BOOT_JDK/bin/java
25771      if test ! -x $JAVA; then
25772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25773$as_echo "not found" >&6; }
25774        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25775$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25776        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25777      fi
25778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25779$as_echo "ok" >&6; }
25780
25781
25782    else
25783      # If it succeeded, then it was overridden by the user. We will use it
25784      # for the tool.
25785
25786      # First remove it from the list of overridden variables, so we can test
25787      # for unknown variables in the end.
25788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25789
25790      # Check if the provided tool contains a complete path.
25791      tool_specified="$JAVA"
25792      tool_basename="${tool_specified##*/}"
25793      if test "x$tool_basename" = "x$tool_specified"; then
25794        # A command without a complete path is provided, search $PATH.
25795        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25796$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25797        # Extract the first word of "$tool_basename", so it can be a program name with args.
25798set dummy $tool_basename; ac_word=$2
25799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25800$as_echo_n "checking for $ac_word... " >&6; }
25801if ${ac_cv_path_JAVA+:} false; then :
25802  $as_echo_n "(cached) " >&6
25803else
25804  case $JAVA in
25805  [\\/]* | ?:[\\/]*)
25806  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25807  ;;
25808  *)
25809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25810for as_dir in $PATH
25811do
25812  IFS=$as_save_IFS
25813  test -z "$as_dir" && as_dir=.
25814    for ac_exec_ext in '' $ac_executable_extensions; do
25815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25816    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25818    break 2
25819  fi
25820done
25821  done
25822IFS=$as_save_IFS
25823
25824  ;;
25825esac
25826fi
25827JAVA=$ac_cv_path_JAVA
25828if test -n "$JAVA"; then
25829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25830$as_echo "$JAVA" >&6; }
25831else
25832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25833$as_echo "no" >&6; }
25834fi
25835
25836
25837        if test "x$JAVA" = x; then
25838          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25839        fi
25840      else
25841        # Otherwise we believe it is a complete path. Use it as it is.
25842        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25843$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25844        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25845$as_echo_n "checking for JAVA... " >&6; }
25846        if test ! -x "$tool_specified"; then
25847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25848$as_echo "not found" >&6; }
25849          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25850        fi
25851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25852$as_echo "$tool_specified" >&6; }
25853      fi
25854    fi
25855  fi
25856
25857
25858
25859  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25860
25861  # Publish this variable in the help.
25862
25863
25864  if test "x$JAVAC" = x; then
25865    # The variable is not set by user, try to locate tool using the code snippet
25866
25867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25868$as_echo_n "checking for javac in Boot JDK... " >&6; }
25869      JAVAC=$BOOT_JDK/bin/javac
25870      if test ! -x $JAVAC; then
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25872$as_echo "not found" >&6; }
25873        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25874$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25875        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25876      fi
25877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25878$as_echo "ok" >&6; }
25879
25880
25881  else
25882    # The variable is set, but is it from the command line or the environment?
25883
25884    # Try to remove the string !JAVAC! from our list.
25885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25887      # If it failed, the variable was not from the command line. Ignore it,
25888      # but warn the user (except for BASH, which is always set by the calling BASH).
25889      if test "xJAVAC" != xBASH; then
25890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25891$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25892      fi
25893      # Try to locate tool using the code snippet
25894
25895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25896$as_echo_n "checking for javac in Boot JDK... " >&6; }
25897      JAVAC=$BOOT_JDK/bin/javac
25898      if test ! -x $JAVAC; then
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25900$as_echo "not found" >&6; }
25901        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25902$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25903        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25904      fi
25905      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25906$as_echo "ok" >&6; }
25907
25908
25909    else
25910      # If it succeeded, then it was overridden by the user. We will use it
25911      # for the tool.
25912
25913      # First remove it from the list of overridden variables, so we can test
25914      # for unknown variables in the end.
25915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25916
25917      # Check if the provided tool contains a complete path.
25918      tool_specified="$JAVAC"
25919      tool_basename="${tool_specified##*/}"
25920      if test "x$tool_basename" = "x$tool_specified"; then
25921        # A command without a complete path is provided, search $PATH.
25922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25923$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25924        # Extract the first word of "$tool_basename", so it can be a program name with args.
25925set dummy $tool_basename; ac_word=$2
25926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25927$as_echo_n "checking for $ac_word... " >&6; }
25928if ${ac_cv_path_JAVAC+:} false; then :
25929  $as_echo_n "(cached) " >&6
25930else
25931  case $JAVAC in
25932  [\\/]* | ?:[\\/]*)
25933  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25934  ;;
25935  *)
25936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25937for as_dir in $PATH
25938do
25939  IFS=$as_save_IFS
25940  test -z "$as_dir" && as_dir=.
25941    for ac_exec_ext in '' $ac_executable_extensions; do
25942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25943    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25945    break 2
25946  fi
25947done
25948  done
25949IFS=$as_save_IFS
25950
25951  ;;
25952esac
25953fi
25954JAVAC=$ac_cv_path_JAVAC
25955if test -n "$JAVAC"; then
25956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25957$as_echo "$JAVAC" >&6; }
25958else
25959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25960$as_echo "no" >&6; }
25961fi
25962
25963
25964        if test "x$JAVAC" = x; then
25965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25966        fi
25967      else
25968        # Otherwise we believe it is a complete path. Use it as it is.
25969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25970$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25972$as_echo_n "checking for JAVAC... " >&6; }
25973        if test ! -x "$tool_specified"; then
25974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25975$as_echo "not found" >&6; }
25976          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25977        fi
25978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25979$as_echo "$tool_specified" >&6; }
25980      fi
25981    fi
25982  fi
25983
25984
25985
25986  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25987
25988  # Publish this variable in the help.
25989
25990
25991  if test "x$JAVAH" = x; then
25992    # The variable is not set by user, try to locate tool using the code snippet
25993
25994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25995$as_echo_n "checking for javah in Boot JDK... " >&6; }
25996      JAVAH=$BOOT_JDK/bin/javah
25997      if test ! -x $JAVAH; then
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25999$as_echo "not found" >&6; }
26000        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26001$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26002        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26003      fi
26004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26005$as_echo "ok" >&6; }
26006
26007
26008  else
26009    # The variable is set, but is it from the command line or the environment?
26010
26011    # Try to remove the string !JAVAH! from our list.
26012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26014      # If it failed, the variable was not from the command line. Ignore it,
26015      # but warn the user (except for BASH, which is always set by the calling BASH).
26016      if test "xJAVAH" != xBASH; then
26017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26018$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26019      fi
26020      # Try to locate tool using the code snippet
26021
26022      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26023$as_echo_n "checking for javah in Boot JDK... " >&6; }
26024      JAVAH=$BOOT_JDK/bin/javah
26025      if test ! -x $JAVAH; then
26026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26027$as_echo "not found" >&6; }
26028        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26029$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26030        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26031      fi
26032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26033$as_echo "ok" >&6; }
26034
26035
26036    else
26037      # If it succeeded, then it was overridden by the user. We will use it
26038      # for the tool.
26039
26040      # First remove it from the list of overridden variables, so we can test
26041      # for unknown variables in the end.
26042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26043
26044      # Check if the provided tool contains a complete path.
26045      tool_specified="$JAVAH"
26046      tool_basename="${tool_specified##*/}"
26047      if test "x$tool_basename" = "x$tool_specified"; then
26048        # A command without a complete path is provided, search $PATH.
26049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26050$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26051        # Extract the first word of "$tool_basename", so it can be a program name with args.
26052set dummy $tool_basename; ac_word=$2
26053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26054$as_echo_n "checking for $ac_word... " >&6; }
26055if ${ac_cv_path_JAVAH+:} false; then :
26056  $as_echo_n "(cached) " >&6
26057else
26058  case $JAVAH in
26059  [\\/]* | ?:[\\/]*)
26060  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26061  ;;
26062  *)
26063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26064for as_dir in $PATH
26065do
26066  IFS=$as_save_IFS
26067  test -z "$as_dir" && as_dir=.
26068    for ac_exec_ext in '' $ac_executable_extensions; do
26069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26070    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26072    break 2
26073  fi
26074done
26075  done
26076IFS=$as_save_IFS
26077
26078  ;;
26079esac
26080fi
26081JAVAH=$ac_cv_path_JAVAH
26082if test -n "$JAVAH"; then
26083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26084$as_echo "$JAVAH" >&6; }
26085else
26086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26087$as_echo "no" >&6; }
26088fi
26089
26090
26091        if test "x$JAVAH" = x; then
26092          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26093        fi
26094      else
26095        # Otherwise we believe it is a complete path. Use it as it is.
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26097$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26099$as_echo_n "checking for JAVAH... " >&6; }
26100        if test ! -x "$tool_specified"; then
26101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26102$as_echo "not found" >&6; }
26103          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26104        fi
26105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26106$as_echo "$tool_specified" >&6; }
26107      fi
26108    fi
26109  fi
26110
26111
26112
26113  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26114
26115  # Publish this variable in the help.
26116
26117
26118  if test "x$JAR" = x; then
26119    # The variable is not set by user, try to locate tool using the code snippet
26120
26121      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26122$as_echo_n "checking for jar in Boot JDK... " >&6; }
26123      JAR=$BOOT_JDK/bin/jar
26124      if test ! -x $JAR; then
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26126$as_echo "not found" >&6; }
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26128$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26129        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26130      fi
26131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26132$as_echo "ok" >&6; }
26133
26134
26135  else
26136    # The variable is set, but is it from the command line or the environment?
26137
26138    # Try to remove the string !JAR! from our list.
26139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26141      # If it failed, the variable was not from the command line. Ignore it,
26142      # but warn the user (except for BASH, which is always set by the calling BASH).
26143      if test "xJAR" != xBASH; then
26144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26145$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26146      fi
26147      # Try to locate tool using the code snippet
26148
26149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26150$as_echo_n "checking for jar in Boot JDK... " >&6; }
26151      JAR=$BOOT_JDK/bin/jar
26152      if test ! -x $JAR; then
26153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26154$as_echo "not found" >&6; }
26155        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26156$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26157        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26158      fi
26159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26160$as_echo "ok" >&6; }
26161
26162
26163    else
26164      # If it succeeded, then it was overridden by the user. We will use it
26165      # for the tool.
26166
26167      # First remove it from the list of overridden variables, so we can test
26168      # for unknown variables in the end.
26169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26170
26171      # Check if the provided tool contains a complete path.
26172      tool_specified="$JAR"
26173      tool_basename="${tool_specified##*/}"
26174      if test "x$tool_basename" = "x$tool_specified"; then
26175        # A command without a complete path is provided, search $PATH.
26176        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26177$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26178        # Extract the first word of "$tool_basename", so it can be a program name with args.
26179set dummy $tool_basename; ac_word=$2
26180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26181$as_echo_n "checking for $ac_word... " >&6; }
26182if ${ac_cv_path_JAR+:} false; then :
26183  $as_echo_n "(cached) " >&6
26184else
26185  case $JAR in
26186  [\\/]* | ?:[\\/]*)
26187  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26188  ;;
26189  *)
26190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26191for as_dir in $PATH
26192do
26193  IFS=$as_save_IFS
26194  test -z "$as_dir" && as_dir=.
26195    for ac_exec_ext in '' $ac_executable_extensions; do
26196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26197    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26199    break 2
26200  fi
26201done
26202  done
26203IFS=$as_save_IFS
26204
26205  ;;
26206esac
26207fi
26208JAR=$ac_cv_path_JAR
26209if test -n "$JAR"; then
26210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26211$as_echo "$JAR" >&6; }
26212else
26213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26214$as_echo "no" >&6; }
26215fi
26216
26217
26218        if test "x$JAR" = x; then
26219          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26220        fi
26221      else
26222        # Otherwise we believe it is a complete path. Use it as it is.
26223        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26224$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26226$as_echo_n "checking for JAR... " >&6; }
26227        if test ! -x "$tool_specified"; then
26228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26229$as_echo "not found" >&6; }
26230          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26231        fi
26232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26233$as_echo "$tool_specified" >&6; }
26234      fi
26235    fi
26236  fi
26237
26238
26239
26240  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26241
26242  # Publish this variable in the help.
26243
26244
26245  if test "x$JARSIGNER" = x; then
26246    # The variable is not set by user, try to locate tool using the code snippet
26247
26248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26249$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26250      JARSIGNER=$BOOT_JDK/bin/jarsigner
26251      if test ! -x $JARSIGNER; then
26252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26253$as_echo "not found" >&6; }
26254        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26255$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26256        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26257      fi
26258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26259$as_echo "ok" >&6; }
26260
26261
26262  else
26263    # The variable is set, but is it from the command line or the environment?
26264
26265    # Try to remove the string !JARSIGNER! from our list.
26266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26268      # If it failed, the variable was not from the command line. Ignore it,
26269      # but warn the user (except for BASH, which is always set by the calling BASH).
26270      if test "xJARSIGNER" != xBASH; then
26271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26272$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26273      fi
26274      # Try to locate tool using the code snippet
26275
26276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26277$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26278      JARSIGNER=$BOOT_JDK/bin/jarsigner
26279      if test ! -x $JARSIGNER; then
26280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26281$as_echo "not found" >&6; }
26282        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26283$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26284        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26285      fi
26286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26287$as_echo "ok" >&6; }
26288
26289
26290    else
26291      # If it succeeded, then it was overridden by the user. We will use it
26292      # for the tool.
26293
26294      # First remove it from the list of overridden variables, so we can test
26295      # for unknown variables in the end.
26296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26297
26298      # Check if the provided tool contains a complete path.
26299      tool_specified="$JARSIGNER"
26300      tool_basename="${tool_specified##*/}"
26301      if test "x$tool_basename" = "x$tool_specified"; then
26302        # A command without a complete path is provided, search $PATH.
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26304$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26305        # Extract the first word of "$tool_basename", so it can be a program name with args.
26306set dummy $tool_basename; ac_word=$2
26307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26308$as_echo_n "checking for $ac_word... " >&6; }
26309if ${ac_cv_path_JARSIGNER+:} false; then :
26310  $as_echo_n "(cached) " >&6
26311else
26312  case $JARSIGNER in
26313  [\\/]* | ?:[\\/]*)
26314  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26315  ;;
26316  *)
26317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26318for as_dir in $PATH
26319do
26320  IFS=$as_save_IFS
26321  test -z "$as_dir" && as_dir=.
26322    for ac_exec_ext in '' $ac_executable_extensions; do
26323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26324    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26326    break 2
26327  fi
26328done
26329  done
26330IFS=$as_save_IFS
26331
26332  ;;
26333esac
26334fi
26335JARSIGNER=$ac_cv_path_JARSIGNER
26336if test -n "$JARSIGNER"; then
26337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26338$as_echo "$JARSIGNER" >&6; }
26339else
26340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26341$as_echo "no" >&6; }
26342fi
26343
26344
26345        if test "x$JARSIGNER" = x; then
26346          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26347        fi
26348      else
26349        # Otherwise we believe it is a complete path. Use it as it is.
26350        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26351$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26352        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26353$as_echo_n "checking for JARSIGNER... " >&6; }
26354        if test ! -x "$tool_specified"; then
26355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26356$as_echo "not found" >&6; }
26357          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26358        fi
26359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26360$as_echo "$tool_specified" >&6; }
26361      fi
26362    fi
26363  fi
26364
26365
26366
26367  # Finally, set some other options...
26368
26369  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26370  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26371
26372
26373
26374
26375###############################################################################
26376#
26377# Configure the sources to use. We can add or override individual directories.
26378#
26379###############################################################################
26380
26381
26382  # Where are the sources. Any of these can be overridden
26383  # using --with-override-corba and the likes.
26384  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26385  CORBA_TOPDIR="$SRC_ROOT/corba"
26386  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26387  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26388  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26389  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26390  JDK_TOPDIR="$SRC_ROOT/jdk"
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401  ###############################################################################
26402  #
26403  # Pickup additional source for a component from outside of the source root
26404  # or override source for a component.
26405  #
26406
26407# Check whether --with-add-source-root was given.
26408if test "${with_add_source_root+set}" = set; then :
26409  withval=$with_add_source_root;
26410fi
26411
26412
26413
26414# Check whether --with-override-source-root was given.
26415if test "${with_override_source_root+set}" = set; then :
26416  withval=$with_override_source_root;
26417fi
26418
26419
26420
26421# Check whether --with-adds-and-overrides was given.
26422if test "${with_adds_and_overrides+set}" = set; then :
26423  withval=$with_adds_and_overrides;
26424fi
26425
26426
26427  if test "x$with_adds_and_overrides" != x; then
26428    with_add_source_root="$with_adds_and_overrides/adds"
26429    with_override_source_root="$with_adds_and_overrides/overrides"
26430  fi
26431
26432  if test "x$with_add_source_root" != x; then
26433    if ! test -d $with_add_source_root; then
26434      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26435    fi
26436    CURDIR="$PWD"
26437    cd "$with_add_source_root"
26438    ADD_SRC_ROOT="`pwd`"
26439    cd "$CURDIR"
26440    # Verify that the addon source root does not have any root makefiles.
26441    # If it does, then it is usually an error, prevent this.
26442    if test -f $with_add_source_root/langtools/make/Makefile; then
26443      as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
26444    fi
26445    if test -f $with_add_source_root/corba/make/Makefile; then
26446      as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
26447    fi
26448    if test -f $with_add_source_root/jaxp/make/Makefile; then
26449      as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
26450    fi
26451    if test -f $with_add_source_root/jaxws/make/Makefile; then
26452      as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
26453    fi
26454    if test -f $with_add_source_root/hotspot/make/Makefile; then
26455      as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
26456    fi
26457    if test -f $with_add_source_root/nashorn/make/Makefile; then
26458      as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
26459    fi
26460    if test -f $with_add_source_root/jdk/make/Makefile; then
26461      as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
26462    fi
26463  fi
26464
26465
26466  if test "x$with_override_source_root" != x; then
26467    if ! test -d $with_override_source_root; then
26468      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26469    fi
26470    CURDIR="$PWD"
26471    cd "$with_override_source_root"
26472    OVERRIDE_SRC_ROOT="`pwd`"
26473    cd "$CURDIR"
26474    if test -f $with_override_source_root/langtools/make/Makefile; then
26475      as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
26476    fi
26477    if test -f $with_override_source_root/corba/make/Makefile; then
26478      as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
26479    fi
26480    if test -f $with_override_source_root/jaxp/make/Makefile; then
26481      as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
26482    fi
26483    if test -f $with_override_source_root/jaxws/make/Makefile; then
26484      as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
26485    fi
26486    if test -f $with_override_source_root/hotspot/make/Makefile; then
26487      as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
26488    fi
26489    if test -f $with_override_source_root/nashorn/make/Makefile; then
26490      as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
26491    fi
26492    if test -f $with_override_source_root/jdk/make/Makefile; then
26493      as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
26494    fi
26495  fi
26496
26497
26498  ###############################################################################
26499  #
26500  # Override a repo completely, this is used for example when you have 3 small
26501  # development sandboxes of the langtools sources and want to avoid having 3 full
26502  # OpenJDK sources checked out on disk.
26503  #
26504  # Assuming that the 3 langtools sandboxes are located here:
26505  # /home/fredrik/sandbox1/langtools
26506  # /home/fredrik/sandbox2/langtools
26507  # /home/fredrik/sandbox3/langtools
26508  #
26509  # From the source root you create build subdirs manually:
26510  #     mkdir -p build1 build2 build3
26511  # in each build directory run:
26512  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26513  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26514  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26515  #
26516
26517
26518# Check whether --with-override-langtools was given.
26519if test "${with_override_langtools+set}" = set; then :
26520  withval=$with_override_langtools;
26521fi
26522
26523
26524
26525# Check whether --with-override-corba was given.
26526if test "${with_override_corba+set}" = set; then :
26527  withval=$with_override_corba;
26528fi
26529
26530
26531
26532# Check whether --with-override-jaxp was given.
26533if test "${with_override_jaxp+set}" = set; then :
26534  withval=$with_override_jaxp;
26535fi
26536
26537
26538
26539# Check whether --with-override-jaxws was given.
26540if test "${with_override_jaxws+set}" = set; then :
26541  withval=$with_override_jaxws;
26542fi
26543
26544
26545
26546# Check whether --with-override-hotspot was given.
26547if test "${with_override_hotspot+set}" = set; then :
26548  withval=$with_override_hotspot;
26549fi
26550
26551
26552
26553# Check whether --with-override-nashorn was given.
26554if test "${with_override_nashorn+set}" = set; then :
26555  withval=$with_override_nashorn;
26556fi
26557
26558
26559
26560# Check whether --with-override-jdk was given.
26561if test "${with_override_jdk+set}" = set; then :
26562  withval=$with_override_jdk;
26563fi
26564
26565
26566  if test "x$with_override_langtools" != x; then
26567    CURDIR="$PWD"
26568    cd "$with_override_langtools"
26569    LANGTOOLS_TOPDIR="`pwd`"
26570    cd "$CURDIR"
26571    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26572      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26573    fi
26574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26575$as_echo_n "checking if langtools should be overridden... " >&6; }
26576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26577$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26578  fi
26579  if test "x$with_override_corba" != x; then
26580    CURDIR="$PWD"
26581    cd "$with_override_corba"
26582    CORBA_TOPDIR="`pwd`"
26583    cd "$CURDIR"
26584    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26585      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26586    fi
26587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26588$as_echo_n "checking if corba should be overridden... " >&6; }
26589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26590$as_echo "yes with $CORBA_TOPDIR" >&6; }
26591  fi
26592  if test "x$with_override_jaxp" != x; then
26593    CURDIR="$PWD"
26594    cd "$with_override_jaxp"
26595    JAXP_TOPDIR="`pwd`"
26596    cd "$CURDIR"
26597    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26598      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26599    fi
26600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26601$as_echo_n "checking if jaxp should be overridden... " >&6; }
26602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26603$as_echo "yes with $JAXP_TOPDIR" >&6; }
26604  fi
26605  if test "x$with_override_jaxws" != x; then
26606    CURDIR="$PWD"
26607    cd "$with_override_jaxws"
26608    JAXWS_TOPDIR="`pwd`"
26609    cd "$CURDIR"
26610    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26611      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26612    fi
26613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26614$as_echo_n "checking if jaxws should be overridden... " >&6; }
26615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26616$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26617  fi
26618  if test "x$with_override_hotspot" != x; then
26619    CURDIR="$PWD"
26620    cd "$with_override_hotspot"
26621    HOTSPOT_TOPDIR="`pwd`"
26622    cd "$CURDIR"
26623    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26624      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26625    fi
26626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26627$as_echo_n "checking if hotspot should be overridden... " >&6; }
26628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26629$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26630  fi
26631  if test "x$with_override_nashorn" != x; then
26632    CURDIR="$PWD"
26633    cd "$with_override_nashorn"
26634    NASHORN_TOPDIR="`pwd`"
26635    cd "$CURDIR"
26636    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26637      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26638    fi
26639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26640$as_echo_n "checking if nashorn should be overridden... " >&6; }
26641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26642$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26643  fi
26644  if test "x$with_override_jdk" != x; then
26645    CURDIR="$PWD"
26646    cd "$with_override_jdk"
26647    JDK_TOPDIR="`pwd`"
26648    cd "$CURDIR"
26649    if ! test -f $JDK_TOPDIR/make/Makefile; then
26650      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26651    fi
26652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26653$as_echo_n "checking if JDK should be overridden... " >&6; }
26654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26655$as_echo "yes with $JDK_TOPDIR" >&6; }
26656  fi
26657
26658
26659  BUILD_OUTPUT="$OUTPUT_ROOT"
26660
26661
26662  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26663  BUILD_HOTSPOT=true
26664
26665
26666
26667# Check whether --with-import-hotspot was given.
26668if test "${with_import_hotspot+set}" = set; then :
26669  withval=$with_import_hotspot;
26670fi
26671
26672  if test "x$with_import_hotspot" != x; then
26673    CURDIR="$PWD"
26674    cd "$with_import_hotspot"
26675    HOTSPOT_DIST="`pwd`"
26676    cd "$CURDIR"
26677    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26678      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26679    fi
26680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26681$as_echo_n "checking if hotspot should be imported... " >&6; }
26682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26683$as_echo "yes from $HOTSPOT_DIST" >&6; }
26684    BUILD_HOTSPOT=false
26685  fi
26686
26687  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26688
26689
26690###############################################################################
26691#
26692# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26693# native code.
26694#
26695###############################################################################
26696
26697# First determine the toolchain type (compiler family)
26698
26699
26700# Check whether --with-toolchain-type was given.
26701if test "${with_toolchain_type+set}" = set; then :
26702  withval=$with_toolchain_type;
26703fi
26704
26705
26706  # Use indirect variable referencing
26707  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26708  VALID_TOOLCHAINS=${!toolchain_var_name}
26709
26710  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26711    if test -n "$XCODEBUILD"; then
26712      # On Mac OS X, default toolchain to clang after Xcode 5
26713      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26714      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26715      if test $? -ne 0; then
26716        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26717      fi
26718      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26719          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26720          $CUT -f 1 -d .`
26721      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26722$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26723      if test $XCODE_MAJOR_VERSION -ge 5; then
26724          DEFAULT_TOOLCHAIN="clang"
26725      else
26726          DEFAULT_TOOLCHAIN="gcc"
26727      fi
26728    else
26729      # If Xcode is not installed, but the command line tools are
26730      # then we can't run xcodebuild. On these systems we should
26731      # default to clang
26732      DEFAULT_TOOLCHAIN="clang"
26733    fi
26734  else
26735    # First toolchain type in the list is the default
26736    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26737  fi
26738
26739  if test "x$with_toolchain_type" = xlist; then
26740    # List all toolchains
26741    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26742$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26743    for toolchain in $VALID_TOOLCHAINS; do
26744      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26745      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26746      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26747    done
26748
26749    exit 0
26750  elif test "x$with_toolchain_type" != x; then
26751    # User override; check that it is valid
26752    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26753      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26754$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26755      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26756$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26757      as_fn_error $? "Cannot continue." "$LINENO" 5
26758    fi
26759    TOOLCHAIN_TYPE=$with_toolchain_type
26760  else
26761    # No flag given, use default
26762    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26763  fi
26764
26765
26766  TOOLCHAIN_CC_BINARY_clang="clang"
26767  TOOLCHAIN_CC_BINARY_gcc="gcc"
26768  TOOLCHAIN_CC_BINARY_microsoft="cl"
26769  TOOLCHAIN_CC_BINARY_solstudio="cc"
26770  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26771
26772  TOOLCHAIN_CXX_BINARY_clang="clang++"
26773  TOOLCHAIN_CXX_BINARY_gcc="g++"
26774  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26775  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26776  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26777
26778  # Use indirect variable referencing
26779  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26780  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26781  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26782  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26783  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26784  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26785
26786
26787  # Define filename patterns
26788  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26789    LIBRARY_PREFIX=
26790    SHARED_LIBRARY_SUFFIX='.dll'
26791    STATIC_LIBRARY_SUFFIX='.lib'
26792    SHARED_LIBRARY='$1.dll'
26793    STATIC_LIBRARY='$1.lib'
26794    OBJ_SUFFIX='.obj'
26795    EXE_SUFFIX='.exe'
26796  else
26797    LIBRARY_PREFIX=lib
26798    SHARED_LIBRARY_SUFFIX='.so'
26799    STATIC_LIBRARY_SUFFIX='.a'
26800    SHARED_LIBRARY='lib$1.so'
26801    STATIC_LIBRARY='lib$1.a'
26802    OBJ_SUFFIX='.o'
26803    EXE_SUFFIX=''
26804    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26805      SHARED_LIBRARY='lib$1.dylib'
26806      SHARED_LIBRARY_SUFFIX='.dylib'
26807    fi
26808  fi
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26820    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26821$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26822  else
26823    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26824$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26825  fi
26826
26827
26828# Then detect the actual binaries needed
26829
26830  # FIXME: Is this needed?
26831  ac_ext=cpp
26832ac_cpp='$CXXCPP $CPPFLAGS'
26833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26836
26837
26838  # Store the CFLAGS etc passed to the configure script.
26839  ORG_CFLAGS="$CFLAGS"
26840  ORG_CXXFLAGS="$CXXFLAGS"
26841
26842  # autoconf magic only relies on PATH, so update it if tools dir is specified
26843  OLD_PATH="$PATH"
26844
26845  # On Windows, we need to detect the visual studio installation first.
26846  # This will change the PATH, but we need to keep that new PATH even
26847  # after toolchain detection is done, since the compiler (on x86) uses
26848  # it for DLL resolution in runtime.
26849  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26850      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26851
26852  # Store path to cygwin link.exe to help excluding it when searching for
26853  # VS linker. This must be done before changing the PATH when looking for VS.
26854  # Extract the first word of "link", so it can be a program name with args.
26855set dummy link; ac_word=$2
26856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26857$as_echo_n "checking for $ac_word... " >&6; }
26858if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26859  $as_echo_n "(cached) " >&6
26860else
26861  case $CYGWIN_LINK in
26862  [\\/]* | ?:[\\/]*)
26863  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26864  ;;
26865  *)
26866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26867for as_dir in $PATH
26868do
26869  IFS=$as_save_IFS
26870  test -z "$as_dir" && as_dir=.
26871    for ac_exec_ext in '' $ac_executable_extensions; do
26872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26873    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26875    break 2
26876  fi
26877done
26878  done
26879IFS=$as_save_IFS
26880
26881  ;;
26882esac
26883fi
26884CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26885if test -n "$CYGWIN_LINK"; then
26886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26887$as_echo "$CYGWIN_LINK" >&6; }
26888else
26889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26890$as_echo "no" >&6; }
26891fi
26892
26893
26894  if test "x$CYGWIN_LINK" != x; then
26895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26896$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26897    "$CYGWIN_LINK" --version > /dev/null
26898    if test $? -eq 0 ; then
26899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26900$as_echo "yes" >&6; }
26901    else
26902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26903$as_echo "no" >&6; }
26904      # This might be the VS linker. Don't exclude it later on.
26905      CYGWIN_LINK=""
26906    fi
26907  fi
26908
26909  # First-hand choice is to locate and run the vsvars bat file.
26910
26911
26912# Check whether --with-toolchain-version was given.
26913if test "${with_toolchain_version+set}" = set; then :
26914  withval=$with_toolchain_version;
26915fi
26916
26917
26918  if test "x$with_toolchain_version" = xlist; then
26919    # List all toolchains
26920    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26921$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26922    for version in $VALID_VS_VERSIONS; do
26923      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26924      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26925    done
26926
26927    exit 0
26928  elif test "x$DEVKIT_VS_VERSION" != x; then
26929    VS_VERSION=$DEVKIT_VS_VERSION
26930    TOOLCHAIN_VERSION=$VS_VERSION
26931    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26932    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26933    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26934    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26935    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26936    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26937
26938    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26939    # can still be exported as INCLUDE for compiler invocations without
26940    # SYSROOT_CFLAGS
26941    OLDIFS="$IFS"
26942    IFS=";"
26943    for i in $DEVKIT_VS_INCLUDE; do
26944      ipath=$i
26945
26946  unix_path="$ipath"
26947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26948    windows_path=`$CYGPATH -m "$unix_path"`
26949    ipath="$windows_path"
26950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26951    windows_path=`cmd //c echo $unix_path`
26952    ipath="$windows_path"
26953  fi
26954
26955      VS_INCLUDE="$VS_INCLUDE;$ipath"
26956    done
26957    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26958    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26959    for i in $DEVKIT_VS_LIB; do
26960      libpath=$i
26961
26962  unix_path="$libpath"
26963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26964    windows_path=`$CYGPATH -m "$unix_path"`
26965    libpath="$windows_path"
26966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26967    windows_path=`cmd //c echo $unix_path`
26968    libpath="$windows_path"
26969  fi
26970
26971      VS_LIB="$VS_LIB;$libpath"
26972    done
26973    IFS="$OLDIFS"
26974
26975    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26976$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26977
26978  elif test "x$with_toolchain_version" != x; then
26979    # User override; check that it is valid
26980    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26981      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26982$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26983      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26984$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26985      as_fn_error $? "Cannot continue." "$LINENO" 5
26986    fi
26987    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26988  else
26989    # No flag given, use default
26990    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26991  fi
26992
26993  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26994
26995  VS_VERSION="$VS_VERSION"
26996  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26997  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26998  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26999  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
27000
27001  # When using --with-tools-dir, assume it points to the correct and default
27002  # version of Visual Studio or that --with-toolchain-version was also set.
27003  if test "x$with_tools_dir" != x; then
27004
27005  if test "x$VS_ENV_CMD" = x; then
27006    VS_VERSION="${VS_VERSION}"
27007    VS_BASE="$with_tools_dir/../.."
27008    METHOD="--with-tools-dir"
27009
27010    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27011      VCVARSFILE="vc/bin/vcvars32.bat"
27012    else
27013      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27014    fi
27015
27016
27017  windows_path="$VS_BASE"
27018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27019    unix_path=`$CYGPATH -u "$windows_path"`
27020    VS_BASE="$unix_path"
27021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27023    VS_BASE="$unix_path"
27024  fi
27025
27026    if test -d "$VS_BASE"; then
27027      if test -f "$VS_BASE/$VCVARSFILE"; then
27028        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27029$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27030        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27031        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27032        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27033        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27034      else
27035        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27036$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27037        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27038$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27039      fi
27040    fi
27041  fi
27042
27043
27044  if test "x$VS_ENV_CMD" = x; then
27045    VS_VERSION="${VS_VERSION}"
27046    VS_BASE="$with_tools_dir/../../.."
27047    METHOD="--with-tools-dir"
27048
27049    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27050      VCVARSFILE="vc/bin/vcvars32.bat"
27051    else
27052      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27053    fi
27054
27055
27056  windows_path="$VS_BASE"
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058    unix_path=`$CYGPATH -u "$windows_path"`
27059    VS_BASE="$unix_path"
27060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27062    VS_BASE="$unix_path"
27063  fi
27064
27065    if test -d "$VS_BASE"; then
27066      if test -f "$VS_BASE/$VCVARSFILE"; then
27067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27068$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27069        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27070        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27071        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27072        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27073      else
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27075$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27076        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27077$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27078      fi
27079    fi
27080  fi
27081
27082    if test "x$VS_ENV_CMD" = x; then
27083      # Having specified an argument which is incorrect will produce an instant failure;
27084      # we should not go on looking
27085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27086$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27087      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27088$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27089      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27090$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27091      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27092    fi
27093  fi
27094
27095  VS_ENV_CMD=""
27096  VS_ENV_ARGS=""
27097
27098  if test "x$VS_COMNTOOLS" != x; then
27099
27100  if test "x$VS_ENV_CMD" = x; then
27101    VS_VERSION="${VS_VERSION}"
27102    VS_BASE="$VS_COMNTOOLS/../.."
27103    METHOD="$VS_COMNTOOLS_VAR variable"
27104
27105    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27106      VCVARSFILE="vc/bin/vcvars32.bat"
27107    else
27108      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27109    fi
27110
27111
27112  windows_path="$VS_BASE"
27113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27114    unix_path=`$CYGPATH -u "$windows_path"`
27115    VS_BASE="$unix_path"
27116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27118    VS_BASE="$unix_path"
27119  fi
27120
27121    if test -d "$VS_BASE"; then
27122      if test -f "$VS_BASE/$VCVARSFILE"; then
27123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27124$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27125        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27126        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27127        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27128        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27129      else
27130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27131$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27132        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27133$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27134      fi
27135    fi
27136  fi
27137
27138  fi
27139  if test "x$PROGRAMFILES" != x; then
27140
27141  if test "x$VS_ENV_CMD" = x; then
27142    VS_VERSION="${VS_VERSION}"
27143    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27144    METHOD="well-known name"
27145
27146    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27147      VCVARSFILE="vc/bin/vcvars32.bat"
27148    else
27149      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27150    fi
27151
27152
27153  windows_path="$VS_BASE"
27154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27155    unix_path=`$CYGPATH -u "$windows_path"`
27156    VS_BASE="$unix_path"
27157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27159    VS_BASE="$unix_path"
27160  fi
27161
27162    if test -d "$VS_BASE"; then
27163      if test -f "$VS_BASE/$VCVARSFILE"; then
27164        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27165$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27166        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27167        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27168        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27169        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27170      else
27171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27172$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27173        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27174$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27175      fi
27176    fi
27177  fi
27178
27179  fi
27180  # Work around the insanely named ProgramFiles(x86) env variable
27181  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27182  if test "x$PROGRAMFILES_X86" != x; then
27183
27184  if test "x$VS_ENV_CMD" = x; then
27185    VS_VERSION="${VS_VERSION}"
27186    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27187    METHOD="well-known name"
27188
27189    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27190      VCVARSFILE="vc/bin/vcvars32.bat"
27191    else
27192      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27193    fi
27194
27195
27196  windows_path="$VS_BASE"
27197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27198    unix_path=`$CYGPATH -u "$windows_path"`
27199    VS_BASE="$unix_path"
27200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27202    VS_BASE="$unix_path"
27203  fi
27204
27205    if test -d "$VS_BASE"; then
27206      if test -f "$VS_BASE/$VCVARSFILE"; then
27207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27208$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27209        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27210        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27211        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27212        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27213      else
27214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27215$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27216        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27217$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27218      fi
27219    fi
27220  fi
27221
27222  fi
27223
27224  if test "x$VS_ENV_CMD" = x; then
27225    VS_VERSION="${VS_VERSION}"
27226    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27227    METHOD="well-known name"
27228
27229    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27230      VCVARSFILE="vc/bin/vcvars32.bat"
27231    else
27232      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27233    fi
27234
27235
27236  windows_path="$VS_BASE"
27237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27238    unix_path=`$CYGPATH -u "$windows_path"`
27239    VS_BASE="$unix_path"
27240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27242    VS_BASE="$unix_path"
27243  fi
27244
27245    if test -d "$VS_BASE"; then
27246      if test -f "$VS_BASE/$VCVARSFILE"; then
27247        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27248$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27249        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27250        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27251        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27252        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27253      else
27254        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27255$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27256        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27257$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27258      fi
27259    fi
27260  fi
27261
27262
27263  if test "x$VS_ENV_CMD" = x; then
27264    VS_VERSION="${VS_VERSION}"
27265    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27266    METHOD="well-known name"
27267
27268    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27269      VCVARSFILE="vc/bin/vcvars32.bat"
27270    else
27271      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27272    fi
27273
27274
27275  windows_path="$VS_BASE"
27276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27277    unix_path=`$CYGPATH -u "$windows_path"`
27278    VS_BASE="$unix_path"
27279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27281    VS_BASE="$unix_path"
27282  fi
27283
27284    if test -d "$VS_BASE"; then
27285      if test -f "$VS_BASE/$VCVARSFILE"; then
27286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27287$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27288        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27289        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27290        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27291        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27292      else
27293        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27294$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27295        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27296$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27297      fi
27298    fi
27299  fi
27300
27301
27302  if test "x$SDK_INSTALL_DIR" != x; then
27303    if test "x$ProgramW6432" != x; then
27304
27305  if test "x$VS_ENV_CMD" = x; then
27306    VS_VERSION="${VS_VERSION}"
27307    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27308    METHOD="well-known name"
27309
27310  windows_path="$WIN_SDK_BASE"
27311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27312    unix_path=`$CYGPATH -u "$windows_path"`
27313    WIN_SDK_BASE="$unix_path"
27314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27316    WIN_SDK_BASE="$unix_path"
27317  fi
27318
27319    if test -d "$WIN_SDK_BASE"; then
27320      # There have been cases of partial or broken SDK installations. A missing
27321      # lib dir is not going to work.
27322      if test ! -d "$WIN_SDK_BASE/lib"; then
27323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27324$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27325        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27326$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27327      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27328        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27329$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27330        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27331        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27332          VS_ENV_ARGS="/x86"
27333        else
27334          VS_ENV_ARGS="/x64"
27335        fi
27336        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27337        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27338        # TODO: improve detection for other versions of SDK
27339        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27340      else
27341        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27342$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27343        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27344$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27345      fi
27346    fi
27347  fi
27348
27349    fi
27350    if test "x$PROGRAMW6432" != x; then
27351
27352  if test "x$VS_ENV_CMD" = x; then
27353    VS_VERSION="${VS_VERSION}"
27354    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27355    METHOD="well-known name"
27356
27357  windows_path="$WIN_SDK_BASE"
27358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27359    unix_path=`$CYGPATH -u "$windows_path"`
27360    WIN_SDK_BASE="$unix_path"
27361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27363    WIN_SDK_BASE="$unix_path"
27364  fi
27365
27366    if test -d "$WIN_SDK_BASE"; then
27367      # There have been cases of partial or broken SDK installations. A missing
27368      # lib dir is not going to work.
27369      if test ! -d "$WIN_SDK_BASE/lib"; then
27370        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27371$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27372        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27373$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27374      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27375        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27376$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27377        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27378        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27379          VS_ENV_ARGS="/x86"
27380        else
27381          VS_ENV_ARGS="/x64"
27382        fi
27383        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27384        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27385        # TODO: improve detection for other versions of SDK
27386        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27387      else
27388        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27389$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27390        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27391$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27392      fi
27393    fi
27394  fi
27395
27396    fi
27397    if test "x$PROGRAMFILES" != x; then
27398
27399  if test "x$VS_ENV_CMD" = x; then
27400    VS_VERSION="${VS_VERSION}"
27401    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27402    METHOD="well-known name"
27403
27404  windows_path="$WIN_SDK_BASE"
27405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27406    unix_path=`$CYGPATH -u "$windows_path"`
27407    WIN_SDK_BASE="$unix_path"
27408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27410    WIN_SDK_BASE="$unix_path"
27411  fi
27412
27413    if test -d "$WIN_SDK_BASE"; then
27414      # There have been cases of partial or broken SDK installations. A missing
27415      # lib dir is not going to work.
27416      if test ! -d "$WIN_SDK_BASE/lib"; then
27417        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27418$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27419        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27420$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27421      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27422        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27423$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27424        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27425        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27426          VS_ENV_ARGS="/x86"
27427        else
27428          VS_ENV_ARGS="/x64"
27429        fi
27430        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27431        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27432        # TODO: improve detection for other versions of SDK
27433        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27434      else
27435        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27436$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27437        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27438$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27439      fi
27440    fi
27441  fi
27442
27443    fi
27444
27445  if test "x$VS_ENV_CMD" = x; then
27446    VS_VERSION="${VS_VERSION}"
27447    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27448    METHOD="well-known name"
27449
27450  windows_path="$WIN_SDK_BASE"
27451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27452    unix_path=`$CYGPATH -u "$windows_path"`
27453    WIN_SDK_BASE="$unix_path"
27454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27456    WIN_SDK_BASE="$unix_path"
27457  fi
27458
27459    if test -d "$WIN_SDK_BASE"; then
27460      # There have been cases of partial or broken SDK installations. A missing
27461      # lib dir is not going to work.
27462      if test ! -d "$WIN_SDK_BASE/lib"; then
27463        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27464$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27465        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27466$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27467      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27468        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27469$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27470        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27471        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27472          VS_ENV_ARGS="/x86"
27473        else
27474          VS_ENV_ARGS="/x64"
27475        fi
27476        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27477        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27478        # TODO: improve detection for other versions of SDK
27479        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27480      else
27481        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27482$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27483        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27484$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27485      fi
27486    fi
27487  fi
27488
27489
27490  if test "x$VS_ENV_CMD" = x; then
27491    VS_VERSION="${VS_VERSION}"
27492    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27493    METHOD="well-known name"
27494
27495  windows_path="$WIN_SDK_BASE"
27496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27497    unix_path=`$CYGPATH -u "$windows_path"`
27498    WIN_SDK_BASE="$unix_path"
27499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27501    WIN_SDK_BASE="$unix_path"
27502  fi
27503
27504    if test -d "$WIN_SDK_BASE"; then
27505      # There have been cases of partial or broken SDK installations. A missing
27506      # lib dir is not going to work.
27507      if test ! -d "$WIN_SDK_BASE/lib"; then
27508        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27509$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27510        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27511$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27512      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27513        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27514$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27515        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27516        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27517          VS_ENV_ARGS="/x86"
27518        else
27519          VS_ENV_ARGS="/x64"
27520        fi
27521        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27522        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27523        # TODO: improve detection for other versions of SDK
27524        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27525      else
27526        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27527$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27528        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27529$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27530      fi
27531    fi
27532  fi
27533
27534  fi
27535
27536    if test "x$VS_ENV_CMD" != x; then
27537      TOOLCHAIN_VERSION=$VS_VERSION
27538      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27539      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27540      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27541      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27542      # The rest of the variables are already evaled while probing
27543      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27544$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27545      break
27546    fi
27547  done
27548
27549
27550  # If we have a devkit, skip all of the below.
27551  if test "x$DEVKIT_VS_VERSION" = x; then
27552    if test "x$VS_ENV_CMD" != x; then
27553      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27554
27555  # Only process if variable expands to non-empty
27556
27557  if test "x$VS_ENV_CMD" != x; then
27558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27559
27560  # First separate the path from the arguments. This will split at the first
27561  # space.
27562  complete="$VS_ENV_CMD"
27563  path="${complete%% *}"
27564  tmp="$complete EOL"
27565  arguments="${tmp#* }"
27566
27567  # Input might be given as Windows format, start by converting to
27568  # unix format.
27569  new_path=`$CYGPATH -u "$path"`
27570
27571  # Now try to locate executable using which
27572  new_path=`$WHICH "$new_path" 2> /dev/null`
27573  # bat and cmd files are not always considered executable in cygwin causing which
27574  # to not find them
27575  if test "x$new_path" = x \
27576      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27577      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27578    new_path=`$CYGPATH -u "$path"`
27579  fi
27580  if test "x$new_path" = x; then
27581    # Oops. Which didn't find the executable.
27582    # The splitting of arguments from the executable at a space might have been incorrect,
27583    # since paths with space are more likely in Windows. Give it another try with the whole
27584    # argument.
27585    path="$complete"
27586    arguments="EOL"
27587    new_path=`$CYGPATH -u "$path"`
27588    new_path=`$WHICH "$new_path" 2> /dev/null`
27589    # bat and cmd files are not always considered executable in cygwin causing which
27590    # to not find them
27591    if test "x$new_path" = x \
27592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27594      new_path=`$CYGPATH -u "$path"`
27595    fi
27596    if test "x$new_path" = x; then
27597      # It's still not found. Now this is an unrecoverable error.
27598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27599$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27600      has_space=`$ECHO "$complete" | $GREP " "`
27601      if test "x$has_space" != x; then
27602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27604      fi
27605      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27606    fi
27607  fi
27608
27609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27612  # "foo.exe" is OK but "foo" is an error.
27613  #
27614  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27615  # It is also a way to make sure we got the proper file name for the real test later on.
27616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27617  if test "x$test_shortpath" = x; then
27618    # Short path failed, file does not exist as specified.
27619    # Try adding .exe or .cmd
27620    if test -f "${new_path}.exe"; then
27621      input_to_shortpath="${new_path}.exe"
27622    elif test -f "${new_path}.cmd"; then
27623      input_to_shortpath="${new_path}.cmd"
27624    else
27625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27626$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27629      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27630    fi
27631  else
27632    input_to_shortpath="$new_path"
27633  fi
27634
27635  # Call helper function which possibly converts this using DOS-style short mode.
27636  # If so, the updated path is stored in $new_path.
27637  new_path="$input_to_shortpath"
27638
27639  input_path="$input_to_shortpath"
27640  # Check if we need to convert this using DOS-style short mode. If the path
27641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27642  # take no chances and rewrite it.
27643  # Note: m4 eats our [], so we need to use [ and ] instead.
27644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27645  if test "x$has_forbidden_chars" != x; then
27646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27650      # Going to short mode and back again did indeed matter. Since short mode is
27651      # case insensitive, let's make it lowercase to improve readability.
27652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27653      # Now convert it back to Unix-style (cygpath)
27654      input_path=`$CYGPATH -u "$shortmode_path"`
27655      new_path="$input_path"
27656    fi
27657  fi
27658
27659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27660  if test "x$test_cygdrive_prefix" = x; then
27661    # As a simple fix, exclude /usr/bin since it's not a real path.
27662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27664      # a path prefixed by /cygdrive for fixpath to work.
27665      new_path="$CYGWIN_ROOT_PATH$input_path"
27666    fi
27667  fi
27668
27669  # remove trailing .exe if any
27670  new_path="${new_path/%.exe/}"
27671
27672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27673
27674  # First separate the path from the arguments. This will split at the first
27675  # space.
27676  complete="$VS_ENV_CMD"
27677  path="${complete%% *}"
27678  tmp="$complete EOL"
27679  arguments="${tmp#* }"
27680
27681  # Input might be given as Windows format, start by converting to
27682  # unix format.
27683  new_path="$path"
27684
27685  windows_path="$new_path"
27686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27687    unix_path=`$CYGPATH -u "$windows_path"`
27688    new_path="$unix_path"
27689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27691    new_path="$unix_path"
27692  fi
27693
27694
27695  # Now try to locate executable using which
27696  new_path=`$WHICH "$new_path" 2> /dev/null`
27697
27698  if test "x$new_path" = x; then
27699    # Oops. Which didn't find the executable.
27700    # The splitting of arguments from the executable at a space might have been incorrect,
27701    # since paths with space are more likely in Windows. Give it another try with the whole
27702    # argument.
27703    path="$complete"
27704    arguments="EOL"
27705    new_path="$path"
27706
27707  windows_path="$new_path"
27708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27709    unix_path=`$CYGPATH -u "$windows_path"`
27710    new_path="$unix_path"
27711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27713    new_path="$unix_path"
27714  fi
27715
27716
27717    new_path=`$WHICH "$new_path" 2> /dev/null`
27718    # bat and cmd files are not always considered executable in MSYS causing which
27719    # to not find them
27720    if test "x$new_path" = x \
27721        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27722        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27723      new_path="$path"
27724
27725  windows_path="$new_path"
27726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27727    unix_path=`$CYGPATH -u "$windows_path"`
27728    new_path="$unix_path"
27729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27731    new_path="$unix_path"
27732  fi
27733
27734    fi
27735
27736    if test "x$new_path" = x; then
27737      # It's still not found. Now this is an unrecoverable error.
27738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27739$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27740      has_space=`$ECHO "$complete" | $GREP " "`
27741      if test "x$has_space" != x; then
27742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27744      fi
27745      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27746    fi
27747  fi
27748
27749  # Now new_path has a complete unix path to the binary
27750  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27751    # Keep paths in /bin as-is, but remove trailing .exe if any
27752    new_path="${new_path/%.exe/}"
27753    # Do not save /bin paths to all_fixpath_prefixes!
27754  else
27755    # Not in mixed or Windows style, start by that.
27756    new_path=`cmd //c echo $new_path`
27757
27758  input_path="$new_path"
27759  # Check if we need to convert this using DOS-style short mode. If the path
27760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27761  # take no chances and rewrite it.
27762  # Note: m4 eats our [], so we need to use [ and ] instead.
27763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27764  if test "x$has_forbidden_chars" != x; then
27765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27767  fi
27768
27769    # Output is in $new_path
27770
27771  windows_path="$new_path"
27772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27773    unix_path=`$CYGPATH -u "$windows_path"`
27774    new_path="$unix_path"
27775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27777    new_path="$unix_path"
27778  fi
27779
27780    # remove trailing .exe if any
27781    new_path="${new_path/%.exe/}"
27782
27783    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27784    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27785  fi
27786
27787    else
27788      # We're on a unix platform. Hooray! :)
27789      # First separate the path from the arguments. This will split at the first
27790      # space.
27791      complete="$VS_ENV_CMD"
27792      path="${complete%% *}"
27793      tmp="$complete EOL"
27794      arguments="${tmp#* }"
27795
27796      # Cannot rely on the command "which" here since it doesn't always work.
27797      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27798      if test -z "$is_absolute_path"; then
27799        # Path to executable is not absolute. Find it.
27800        IFS_save="$IFS"
27801        IFS=:
27802        for p in $PATH; do
27803          if test -f "$p/$path" && test -x "$p/$path"; then
27804            new_path="$p/$path"
27805            break
27806          fi
27807        done
27808        IFS="$IFS_save"
27809      else
27810        # This is an absolute path, we can use it without further modifications.
27811        new_path="$path"
27812      fi
27813
27814      if test "x$new_path" = x; then
27815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27816$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27817        has_space=`$ECHO "$complete" | $GREP " "`
27818        if test "x$has_space" != x; then
27819          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27820$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27821        fi
27822        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27823      fi
27824    fi
27825
27826    # Now join together the path and the arguments once again
27827    if test "x$arguments" != xEOL; then
27828      new_complete="$new_path ${arguments% *}"
27829    else
27830      new_complete="$new_path"
27831    fi
27832
27833    if test "x$complete" != "x$new_complete"; then
27834      VS_ENV_CMD="$new_complete"
27835      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27836$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27837    fi
27838  fi
27839
27840
27841      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27842      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27843$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27844
27845      # We need to create a couple of temporary files.
27846      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27847      $MKDIR -p $VS_ENV_TMP_DIR
27848
27849      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27850      # Instead create a shell script which will set the relevant variables when run.
27851      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27852
27853  unix_path="$WINPATH_VS_ENV_CMD"
27854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27855    windows_path=`$CYGPATH -m "$unix_path"`
27856    WINPATH_VS_ENV_CMD="$windows_path"
27857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858    windows_path=`cmd //c echo $unix_path`
27859    WINPATH_VS_ENV_CMD="$windows_path"
27860  fi
27861
27862      WINPATH_BASH="$BASH"
27863
27864  unix_path="$WINPATH_BASH"
27865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27866    windows_path=`$CYGPATH -m "$unix_path"`
27867    WINPATH_BASH="$windows_path"
27868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27869    windows_path=`cmd //c echo $unix_path`
27870    WINPATH_BASH="$windows_path"
27871  fi
27872
27873
27874      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27875      # script (executable by bash) that will setup the important variables.
27876      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27877      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27878      # This will end up something like:
27879      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27880      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27881      # These will end up something like:
27882      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27883      # The trailing space for everyone except PATH is no typo, but is needed due
27884      # to trailing \ in the Windows paths. These will be stripped later.
27885      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27886          >> $EXTRACT_VC_ENV_BAT_FILE
27887      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27888          >> $EXTRACT_VC_ENV_BAT_FILE
27889      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27890          >> $EXTRACT_VC_ENV_BAT_FILE
27891      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27892          >> $EXTRACT_VC_ENV_BAT_FILE
27893      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27894          >> $EXTRACT_VC_ENV_BAT_FILE
27895      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27896          >> $EXTRACT_VC_ENV_BAT_FILE
27897
27898      # Now execute the newly created bat file.
27899      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27900      # Change directory so we don't need to mess with Windows paths in redirects.
27901      cd $VS_ENV_TMP_DIR
27902      cmd /c extract-vs-env.bat | $CAT
27903      cd $CURDIR
27904
27905      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27906        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27907$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27908        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27909$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27911$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27912        as_fn_error $? "Cannot continue" "$LINENO" 5
27913      fi
27914
27915      # Now set all paths and other env variables. This will allow the rest of
27916      # the configure script to find and run the compiler in the proper way.
27917      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27918$as_echo "$as_me: Setting extracted environment variables" >&6;}
27919      . $VS_ENV_TMP_DIR/set-vs-env.sh
27920      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27921      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27922    else
27923      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27924      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27925$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27926    fi
27927  fi
27928
27929  # At this point, we should have correct variables in the environment, or we can't continue.
27930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27931$as_echo_n "checking for Visual Studio variables... " >&6; }
27932
27933  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27934      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27935    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27936      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27937$as_echo "present but broken" >&6; }
27938      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27939    else
27940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27941$as_echo "ok" >&6; }
27942      # Remove any trailing "\" ";" and " " from the variables.
27943      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27944      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27945      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27946      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27947      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27948      # Remove any paths containing # (typically F#) as that messes up make. This
27949      # is needed if visual studio was installed with F# support.
27950      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27951
27952
27953
27954
27955
27956      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27957      OLDIFS="$IFS"
27958      IFS=";"
27959      for i in $VS_INCLUDE; do
27960        ipath=$i
27961        # Only process non-empty elements
27962        if test "x$ipath" != x; then
27963          IFS="$OLDIFS"
27964          # Check that directory exists before calling fixup_path
27965          testpath=$ipath
27966
27967  windows_path="$testpath"
27968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27969    unix_path=`$CYGPATH -u "$windows_path"`
27970    testpath="$unix_path"
27971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27973    testpath="$unix_path"
27974  fi
27975
27976          if test -d "$testpath"; then
27977
27978  # Only process if variable expands to non-empty
27979
27980  if test "x$ipath" != x; then
27981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27982
27983  # Input might be given as Windows format, start by converting to
27984  # unix format.
27985  path="$ipath"
27986  new_path=`$CYGPATH -u "$path"`
27987
27988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27991  # "foo.exe" is OK but "foo" is an error.
27992  #
27993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27994  # It is also a way to make sure we got the proper file name for the real test later on.
27995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27996  if test "x$test_shortpath" = x; then
27997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27998$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27999    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
28000  fi
28001
28002  # Call helper function which possibly converts this using DOS-style short mode.
28003  # If so, the updated path is stored in $new_path.
28004
28005  input_path="$new_path"
28006  # Check if we need to convert this using DOS-style short mode. If the path
28007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28008  # take no chances and rewrite it.
28009  # Note: m4 eats our [], so we need to use [ and ] instead.
28010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28011  if test "x$has_forbidden_chars" != x; then
28012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28016      # Going to short mode and back again did indeed matter. Since short mode is
28017      # case insensitive, let's make it lowercase to improve readability.
28018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28019      # Now convert it back to Unix-style (cygpath)
28020      input_path=`$CYGPATH -u "$shortmode_path"`
28021      new_path="$input_path"
28022    fi
28023  fi
28024
28025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28026  if test "x$test_cygdrive_prefix" = x; then
28027    # As a simple fix, exclude /usr/bin since it's not a real path.
28028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28030      # a path prefixed by /cygdrive for fixpath to work.
28031      new_path="$CYGWIN_ROOT_PATH$input_path"
28032    fi
28033  fi
28034
28035
28036  if test "x$path" != "x$new_path"; then
28037    ipath="$new_path"
28038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28039$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28040  fi
28041
28042    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28043
28044  path="$ipath"
28045  has_colon=`$ECHO $path | $GREP ^.:`
28046  new_path="$path"
28047  if test "x$has_colon" = x; then
28048    # Not in mixed or Windows style, start by that.
28049    new_path=`cmd //c echo $path`
28050  fi
28051
28052
28053  input_path="$new_path"
28054  # Check if we need to convert this using DOS-style short mode. If the path
28055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28056  # take no chances and rewrite it.
28057  # Note: m4 eats our [], so we need to use [ and ] instead.
28058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28059  if test "x$has_forbidden_chars" != x; then
28060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28062  fi
28063
28064
28065  windows_path="$new_path"
28066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28067    unix_path=`$CYGPATH -u "$windows_path"`
28068    new_path="$unix_path"
28069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28071    new_path="$unix_path"
28072  fi
28073
28074  if test "x$path" != "x$new_path"; then
28075    ipath="$new_path"
28076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28077$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28078  fi
28079
28080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28082
28083    else
28084      # We're on a unix platform. Hooray! :)
28085      path="$ipath"
28086      has_space=`$ECHO "$path" | $GREP " "`
28087      if test "x$has_space" != x; then
28088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28089$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28090        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28091      fi
28092
28093      # Use eval to expand a potential ~
28094      eval path="$path"
28095      if test ! -f "$path" && test ! -d "$path"; then
28096        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28097      fi
28098
28099      ipath="`cd "$path"; $THEPWDCMD -L`"
28100    fi
28101  fi
28102
28103            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28104          fi
28105          IFS=";"
28106        fi
28107      done
28108      # Convert VS_LIB into SYSROOT_LDFLAGS
28109      for i in $VS_LIB; do
28110        libpath=$i
28111        # Only process non-empty elements
28112        if test "x$libpath" != x; then
28113          IFS="$OLDIFS"
28114          # Check that directory exists before calling fixup_path
28115          testpath=$libpath
28116
28117  windows_path="$testpath"
28118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28119    unix_path=`$CYGPATH -u "$windows_path"`
28120    testpath="$unix_path"
28121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28123    testpath="$unix_path"
28124  fi
28125
28126          if test -d "$testpath"; then
28127
28128  # Only process if variable expands to non-empty
28129
28130  if test "x$libpath" != x; then
28131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132
28133  # Input might be given as Windows format, start by converting to
28134  # unix format.
28135  path="$libpath"
28136  new_path=`$CYGPATH -u "$path"`
28137
28138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28141  # "foo.exe" is OK but "foo" is an error.
28142  #
28143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28144  # It is also a way to make sure we got the proper file name for the real test later on.
28145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28146  if test "x$test_shortpath" = x; then
28147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28148$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28149    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28150  fi
28151
28152  # Call helper function which possibly converts this using DOS-style short mode.
28153  # If so, the updated path is stored in $new_path.
28154
28155  input_path="$new_path"
28156  # Check if we need to convert this using DOS-style short mode. If the path
28157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28158  # take no chances and rewrite it.
28159  # Note: m4 eats our [], so we need to use [ and ] instead.
28160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28161  if test "x$has_forbidden_chars" != x; then
28162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28166      # Going to short mode and back again did indeed matter. Since short mode is
28167      # case insensitive, let's make it lowercase to improve readability.
28168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28169      # Now convert it back to Unix-style (cygpath)
28170      input_path=`$CYGPATH -u "$shortmode_path"`
28171      new_path="$input_path"
28172    fi
28173  fi
28174
28175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28176  if test "x$test_cygdrive_prefix" = x; then
28177    # As a simple fix, exclude /usr/bin since it's not a real path.
28178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28180      # a path prefixed by /cygdrive for fixpath to work.
28181      new_path="$CYGWIN_ROOT_PATH$input_path"
28182    fi
28183  fi
28184
28185
28186  if test "x$path" != "x$new_path"; then
28187    libpath="$new_path"
28188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28189$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28190  fi
28191
28192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28193
28194  path="$libpath"
28195  has_colon=`$ECHO $path | $GREP ^.:`
28196  new_path="$path"
28197  if test "x$has_colon" = x; then
28198    # Not in mixed or Windows style, start by that.
28199    new_path=`cmd //c echo $path`
28200  fi
28201
28202
28203  input_path="$new_path"
28204  # Check if we need to convert this using DOS-style short mode. If the path
28205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28206  # take no chances and rewrite it.
28207  # Note: m4 eats our [], so we need to use [ and ] instead.
28208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28209  if test "x$has_forbidden_chars" != x; then
28210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28212  fi
28213
28214
28215  windows_path="$new_path"
28216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28217    unix_path=`$CYGPATH -u "$windows_path"`
28218    new_path="$unix_path"
28219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28221    new_path="$unix_path"
28222  fi
28223
28224  if test "x$path" != "x$new_path"; then
28225    libpath="$new_path"
28226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28227$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28228  fi
28229
28230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28232
28233    else
28234      # We're on a unix platform. Hooray! :)
28235      path="$libpath"
28236      has_space=`$ECHO "$path" | $GREP " "`
28237      if test "x$has_space" != x; then
28238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28239$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28241      fi
28242
28243      # Use eval to expand a potential ~
28244      eval path="$path"
28245      if test ! -f "$path" && test ! -d "$path"; then
28246        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28247      fi
28248
28249      libpath="`cd "$path"; $THEPWDCMD -L`"
28250    fi
28251  fi
28252
28253            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28254          fi
28255          IFS=";"
28256        fi
28257      done
28258      IFS="$OLDIFS"
28259    fi
28260  else
28261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28262$as_echo "not found" >&6; }
28263
28264    if test "x$VS_ENV_CMD" = x; then
28265      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28266$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28267      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28268$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28269    else
28270      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28271$as_echo "$as_me: Running the extraction script failed." >&6;}
28272    fi
28273    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28274$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28275    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28276$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28277    as_fn_error $? "Cannot continue" "$LINENO" 5
28278  fi
28279
28280    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28281    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28282    PATH="$VS_PATH"
28283    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28284    export INCLUDE="$VS_INCLUDE"
28285    export LIB="$VS_LIB"
28286  fi
28287
28288  # For solaris we really need solaris tools, and not the GNU equivalent.
28289  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28290  # so add that to path before starting to probe.
28291  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28292  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28293    PATH="/usr/ccs/bin:$PATH"
28294  fi
28295
28296  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28297  # override all other locations.
28298  if test "x$TOOLCHAIN_PATH" != x; then
28299    PATH=$TOOLCHAIN_PATH:$PATH
28300  fi
28301
28302
28303  #
28304  # Setup the compilers (CC and CXX)
28305  #
28306
28307  COMPILER_NAME=C
28308  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28309
28310  if test "x$CC" != x; then
28311    # User has supplied compiler name already, always let that override.
28312    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28313$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28314    if test "x`basename $CC`" = "x$CC"; then
28315      # A command without a complete path is provided, search $PATH.
28316
28317      for ac_prog in $CC
28318do
28319  # Extract the first word of "$ac_prog", so it can be a program name with args.
28320set dummy $ac_prog; ac_word=$2
28321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28322$as_echo_n "checking for $ac_word... " >&6; }
28323if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28324  $as_echo_n "(cached) " >&6
28325else
28326  case $POTENTIAL_CC in
28327  [\\/]* | ?:[\\/]*)
28328  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28329  ;;
28330  *)
28331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28332for as_dir in $PATH
28333do
28334  IFS=$as_save_IFS
28335  test -z "$as_dir" && as_dir=.
28336    for ac_exec_ext in '' $ac_executable_extensions; do
28337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28338    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28340    break 2
28341  fi
28342done
28343  done
28344IFS=$as_save_IFS
28345
28346  ;;
28347esac
28348fi
28349POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28350if test -n "$POTENTIAL_CC"; then
28351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28352$as_echo "$POTENTIAL_CC" >&6; }
28353else
28354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28355$as_echo "no" >&6; }
28356fi
28357
28358
28359  test -n "$POTENTIAL_CC" && break
28360done
28361
28362      if test "x$POTENTIAL_CC" != x; then
28363        CC=$POTENTIAL_CC
28364      else
28365        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28366      fi
28367    else
28368      # Otherwise it might already be a complete path
28369      if test ! -x "$CC"; then
28370        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28371      fi
28372    fi
28373  else
28374    # No user supplied value. Locate compiler ourselves.
28375
28376    # If we are cross compiling, assume cross compilation tools follows the
28377    # cross compilation standard where they are prefixed with the autoconf
28378    # standard name for the target. For example the binary
28379    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28380    # If we are not cross compiling, then the default compiler name will be
28381    # used.
28382
28383    CC=
28384    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28385    # before checking the rest of the PATH.
28386    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28387    # step, this should not be necessary.
28388    if test -n "$TOOLCHAIN_PATH"; then
28389      PATH_save="$PATH"
28390      PATH="$TOOLCHAIN_PATH"
28391      for ac_prog in $SEARCH_LIST
28392do
28393  # Extract the first word of "$ac_prog", so it can be a program name with args.
28394set dummy $ac_prog; ac_word=$2
28395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28396$as_echo_n "checking for $ac_word... " >&6; }
28397if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28398  $as_echo_n "(cached) " >&6
28399else
28400  case $TOOLCHAIN_PATH_CC in
28401  [\\/]* | ?:[\\/]*)
28402  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28403  ;;
28404  *)
28405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28406for as_dir in $PATH
28407do
28408  IFS=$as_save_IFS
28409  test -z "$as_dir" && as_dir=.
28410    for ac_exec_ext in '' $ac_executable_extensions; do
28411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28412    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28414    break 2
28415  fi
28416done
28417  done
28418IFS=$as_save_IFS
28419
28420  ;;
28421esac
28422fi
28423TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28424if test -n "$TOOLCHAIN_PATH_CC"; then
28425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28426$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28427else
28428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28429$as_echo "no" >&6; }
28430fi
28431
28432
28433  test -n "$TOOLCHAIN_PATH_CC" && break
28434done
28435
28436      CC=$TOOLCHAIN_PATH_CC
28437      PATH="$PATH_save"
28438    fi
28439
28440    # AC_PATH_PROGS can't be run multiple times with the same variable,
28441    # so create a new name for this run.
28442    if test "x$CC" = x; then
28443      for ac_prog in $SEARCH_LIST
28444do
28445  # Extract the first word of "$ac_prog", so it can be a program name with args.
28446set dummy $ac_prog; ac_word=$2
28447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28448$as_echo_n "checking for $ac_word... " >&6; }
28449if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28450  $as_echo_n "(cached) " >&6
28451else
28452  case $POTENTIAL_CC in
28453  [\\/]* | ?:[\\/]*)
28454  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28455  ;;
28456  *)
28457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28458for as_dir in $PATH
28459do
28460  IFS=$as_save_IFS
28461  test -z "$as_dir" && as_dir=.
28462    for ac_exec_ext in '' $ac_executable_extensions; do
28463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28464    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28466    break 2
28467  fi
28468done
28469  done
28470IFS=$as_save_IFS
28471
28472  ;;
28473esac
28474fi
28475POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28476if test -n "$POTENTIAL_CC"; then
28477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28478$as_echo "$POTENTIAL_CC" >&6; }
28479else
28480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28481$as_echo "no" >&6; }
28482fi
28483
28484
28485  test -n "$POTENTIAL_CC" && break
28486done
28487
28488      CC=$POTENTIAL_CC
28489    fi
28490
28491    if test "x$CC" = x; then
28492
28493  # Print a helpful message on how to acquire the necessary build dependency.
28494  # devkit is the help tag: freetype, cups, pulse, alsa etc
28495  MISSING_DEPENDENCY=devkit
28496
28497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28498    cygwin_help $MISSING_DEPENDENCY
28499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28500    msys_help $MISSING_DEPENDENCY
28501  else
28502    PKGHANDLER_COMMAND=
28503
28504    case $PKGHANDLER in
28505      apt-get)
28506        apt_help     $MISSING_DEPENDENCY ;;
28507      yum)
28508        yum_help     $MISSING_DEPENDENCY ;;
28509      port)
28510        port_help    $MISSING_DEPENDENCY ;;
28511      pkgutil)
28512        pkgutil_help $MISSING_DEPENDENCY ;;
28513      pkgadd)
28514        pkgadd_help  $MISSING_DEPENDENCY ;;
28515    esac
28516
28517    if test "x$PKGHANDLER_COMMAND" != x; then
28518      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28519    fi
28520  fi
28521
28522      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28523    fi
28524  fi
28525
28526  # Now we have a compiler binary in CC. Make sure it's okay.
28527
28528  # Only process if variable expands to non-empty
28529
28530  if test "x$CC" != x; then
28531    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28532
28533  # First separate the path from the arguments. This will split at the first
28534  # space.
28535  complete="$CC"
28536  path="${complete%% *}"
28537  tmp="$complete EOL"
28538  arguments="${tmp#* }"
28539
28540  # Input might be given as Windows format, start by converting to
28541  # unix format.
28542  new_path=`$CYGPATH -u "$path"`
28543
28544  # Now try to locate executable using which
28545  new_path=`$WHICH "$new_path" 2> /dev/null`
28546  # bat and cmd files are not always considered executable in cygwin causing which
28547  # to not find them
28548  if test "x$new_path" = x \
28549      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28550      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28551    new_path=`$CYGPATH -u "$path"`
28552  fi
28553  if test "x$new_path" = x; then
28554    # Oops. Which didn't find the executable.
28555    # The splitting of arguments from the executable at a space might have been incorrect,
28556    # since paths with space are more likely in Windows. Give it another try with the whole
28557    # argument.
28558    path="$complete"
28559    arguments="EOL"
28560    new_path=`$CYGPATH -u "$path"`
28561    new_path=`$WHICH "$new_path" 2> /dev/null`
28562    # bat and cmd files are not always considered executable in cygwin causing which
28563    # to not find them
28564    if test "x$new_path" = x \
28565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28567      new_path=`$CYGPATH -u "$path"`
28568    fi
28569    if test "x$new_path" = x; then
28570      # It's still not found. Now this is an unrecoverable error.
28571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28572$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28573      has_space=`$ECHO "$complete" | $GREP " "`
28574      if test "x$has_space" != x; then
28575        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28576$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28577      fi
28578      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28579    fi
28580  fi
28581
28582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28585  # "foo.exe" is OK but "foo" is an error.
28586  #
28587  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28588  # It is also a way to make sure we got the proper file name for the real test later on.
28589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28590  if test "x$test_shortpath" = x; then
28591    # Short path failed, file does not exist as specified.
28592    # Try adding .exe or .cmd
28593    if test -f "${new_path}.exe"; then
28594      input_to_shortpath="${new_path}.exe"
28595    elif test -f "${new_path}.cmd"; then
28596      input_to_shortpath="${new_path}.cmd"
28597    else
28598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28599$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28600      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28601$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28602      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28603    fi
28604  else
28605    input_to_shortpath="$new_path"
28606  fi
28607
28608  # Call helper function which possibly converts this using DOS-style short mode.
28609  # If so, the updated path is stored in $new_path.
28610  new_path="$input_to_shortpath"
28611
28612  input_path="$input_to_shortpath"
28613  # Check if we need to convert this using DOS-style short mode. If the path
28614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28615  # take no chances and rewrite it.
28616  # Note: m4 eats our [], so we need to use [ and ] instead.
28617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28618  if test "x$has_forbidden_chars" != x; then
28619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28623      # Going to short mode and back again did indeed matter. Since short mode is
28624      # case insensitive, let's make it lowercase to improve readability.
28625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28626      # Now convert it back to Unix-style (cygpath)
28627      input_path=`$CYGPATH -u "$shortmode_path"`
28628      new_path="$input_path"
28629    fi
28630  fi
28631
28632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28633  if test "x$test_cygdrive_prefix" = x; then
28634    # As a simple fix, exclude /usr/bin since it's not a real path.
28635    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28637      # a path prefixed by /cygdrive for fixpath to work.
28638      new_path="$CYGWIN_ROOT_PATH$input_path"
28639    fi
28640  fi
28641
28642  # remove trailing .exe if any
28643  new_path="${new_path/%.exe/}"
28644
28645    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28646
28647  # First separate the path from the arguments. This will split at the first
28648  # space.
28649  complete="$CC"
28650  path="${complete%% *}"
28651  tmp="$complete EOL"
28652  arguments="${tmp#* }"
28653
28654  # Input might be given as Windows format, start by converting to
28655  # unix format.
28656  new_path="$path"
28657
28658  windows_path="$new_path"
28659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28660    unix_path=`$CYGPATH -u "$windows_path"`
28661    new_path="$unix_path"
28662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28664    new_path="$unix_path"
28665  fi
28666
28667
28668  # Now try to locate executable using which
28669  new_path=`$WHICH "$new_path" 2> /dev/null`
28670
28671  if test "x$new_path" = x; then
28672    # Oops. Which didn't find the executable.
28673    # The splitting of arguments from the executable at a space might have been incorrect,
28674    # since paths with space are more likely in Windows. Give it another try with the whole
28675    # argument.
28676    path="$complete"
28677    arguments="EOL"
28678    new_path="$path"
28679
28680  windows_path="$new_path"
28681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28682    unix_path=`$CYGPATH -u "$windows_path"`
28683    new_path="$unix_path"
28684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28686    new_path="$unix_path"
28687  fi
28688
28689
28690    new_path=`$WHICH "$new_path" 2> /dev/null`
28691    # bat and cmd files are not always considered executable in MSYS causing which
28692    # to not find them
28693    if test "x$new_path" = x \
28694        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28695        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28696      new_path="$path"
28697
28698  windows_path="$new_path"
28699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28700    unix_path=`$CYGPATH -u "$windows_path"`
28701    new_path="$unix_path"
28702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28704    new_path="$unix_path"
28705  fi
28706
28707    fi
28708
28709    if test "x$new_path" = x; then
28710      # It's still not found. Now this is an unrecoverable error.
28711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28712$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28713      has_space=`$ECHO "$complete" | $GREP " "`
28714      if test "x$has_space" != x; then
28715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28717      fi
28718      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28719    fi
28720  fi
28721
28722  # Now new_path has a complete unix path to the binary
28723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28724    # Keep paths in /bin as-is, but remove trailing .exe if any
28725    new_path="${new_path/%.exe/}"
28726    # Do not save /bin paths to all_fixpath_prefixes!
28727  else
28728    # Not in mixed or Windows style, start by that.
28729    new_path=`cmd //c echo $new_path`
28730
28731  input_path="$new_path"
28732  # Check if we need to convert this using DOS-style short mode. If the path
28733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28734  # take no chances and rewrite it.
28735  # Note: m4 eats our [], so we need to use [ and ] instead.
28736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28737  if test "x$has_forbidden_chars" != x; then
28738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28740  fi
28741
28742    # Output is in $new_path
28743
28744  windows_path="$new_path"
28745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28746    unix_path=`$CYGPATH -u "$windows_path"`
28747    new_path="$unix_path"
28748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28750    new_path="$unix_path"
28751  fi
28752
28753    # remove trailing .exe if any
28754    new_path="${new_path/%.exe/}"
28755
28756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28758  fi
28759
28760    else
28761      # We're on a unix platform. Hooray! :)
28762      # First separate the path from the arguments. This will split at the first
28763      # space.
28764      complete="$CC"
28765      path="${complete%% *}"
28766      tmp="$complete EOL"
28767      arguments="${tmp#* }"
28768
28769      # Cannot rely on the command "which" here since it doesn't always work.
28770      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28771      if test -z "$is_absolute_path"; then
28772        # Path to executable is not absolute. Find it.
28773        IFS_save="$IFS"
28774        IFS=:
28775        for p in $PATH; do
28776          if test -f "$p/$path" && test -x "$p/$path"; then
28777            new_path="$p/$path"
28778            break
28779          fi
28780        done
28781        IFS="$IFS_save"
28782      else
28783        # This is an absolute path, we can use it without further modifications.
28784        new_path="$path"
28785      fi
28786
28787      if test "x$new_path" = x; then
28788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28789$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28790        has_space=`$ECHO "$complete" | $GREP " "`
28791        if test "x$has_space" != x; then
28792          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28793$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28794        fi
28795        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28796      fi
28797    fi
28798
28799    # Now join together the path and the arguments once again
28800    if test "x$arguments" != xEOL; then
28801      new_complete="$new_path ${arguments% *}"
28802    else
28803      new_complete="$new_path"
28804    fi
28805
28806    if test "x$complete" != "x$new_complete"; then
28807      CC="$new_complete"
28808      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28809$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28810    fi
28811  fi
28812
28813  TEST_COMPILER="$CC"
28814  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28815  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28816  if test "x$OPENJDK_BUILD_OS" != xaix; then
28817    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28819$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28820
28821  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28822    # Follow a chain of symbolic links. Use readlink
28823    # where it exists, else fall back to horribly
28824    # complicated shell code.
28825    if test "x$READLINK_TESTED" != yes; then
28826      # On MacOSX there is a readlink tool with a different
28827      # purpose than the GNU readlink tool. Check the found readlink.
28828      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28829      if test "x$ISGNU" = x; then
28830        # A readlink that we do not know how to use.
28831        # Are there other non-GNU readlinks out there?
28832        READLINK_TESTED=yes
28833        READLINK=
28834      fi
28835    fi
28836
28837    if test "x$READLINK" != x; then
28838      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28839    else
28840      # Save the current directory for restoring afterwards
28841      STARTDIR=$PWD
28842      COUNTER=0
28843      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28844      sym_link_file=`$BASENAME $TEST_COMPILER`
28845      cd $sym_link_dir
28846      # Use -P flag to resolve symlinks in directories.
28847      cd `$THEPWDCMD -P`
28848      sym_link_dir=`$THEPWDCMD -P`
28849      # Resolve file symlinks
28850      while test $COUNTER -lt 20; do
28851        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28852        if test "x$ISLINK" == x; then
28853          # This is not a symbolic link! We are done!
28854          break
28855        fi
28856        # Again resolve directory symlinks since the target of the just found
28857        # link could be in a different directory
28858        cd `$DIRNAME $ISLINK`
28859        sym_link_dir=`$THEPWDCMD -P`
28860        sym_link_file=`$BASENAME $ISLINK`
28861        let COUNTER=COUNTER+1
28862      done
28863      cd $STARTDIR
28864      TEST_COMPILER=$sym_link_dir/$sym_link_file
28865    fi
28866  fi
28867
28868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28869$as_echo "$TEST_COMPILER" >&6; }
28870  fi
28871  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28872$as_echo_n "checking if CC is disguised ccache... " >&6; }
28873
28874  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28875  if test "x$COMPILER_BASENAME" = "xccache"; then
28876    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28877$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28878    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28879    # We want to control ccache invocation ourselves, so ignore this cc and try
28880    # searching again.
28881
28882    # Remove the path to the fake ccache cc from the PATH
28883    RETRY_COMPILER_SAVED_PATH="$PATH"
28884    COMPILER_DIRNAME=`$DIRNAME $CC`
28885    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28886
28887    # Try again looking for our compiler
28888    if test -n "$ac_tool_prefix"; then
28889  for ac_prog in $TOOLCHAIN_CC_BINARY
28890  do
28891    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28892set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28894$as_echo_n "checking for $ac_word... " >&6; }
28895if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28896  $as_echo_n "(cached) " >&6
28897else
28898  if test -n "$PROPER_COMPILER_CC"; then
28899  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28900else
28901as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28902for as_dir in $PATH
28903do
28904  IFS=$as_save_IFS
28905  test -z "$as_dir" && as_dir=.
28906    for ac_exec_ext in '' $ac_executable_extensions; do
28907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28908    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28910    break 2
28911  fi
28912done
28913  done
28914IFS=$as_save_IFS
28915
28916fi
28917fi
28918PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28919if test -n "$PROPER_COMPILER_CC"; then
28920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28921$as_echo "$PROPER_COMPILER_CC" >&6; }
28922else
28923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28924$as_echo "no" >&6; }
28925fi
28926
28927
28928    test -n "$PROPER_COMPILER_CC" && break
28929  done
28930fi
28931if test -z "$PROPER_COMPILER_CC"; then
28932  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28933  for ac_prog in $TOOLCHAIN_CC_BINARY
28934do
28935  # Extract the first word of "$ac_prog", so it can be a program name with args.
28936set dummy $ac_prog; ac_word=$2
28937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28938$as_echo_n "checking for $ac_word... " >&6; }
28939if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28940  $as_echo_n "(cached) " >&6
28941else
28942  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28943  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28944else
28945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28946for as_dir in $PATH
28947do
28948  IFS=$as_save_IFS
28949  test -z "$as_dir" && as_dir=.
28950    for ac_exec_ext in '' $ac_executable_extensions; do
28951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28952    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28954    break 2
28955  fi
28956done
28957  done
28958IFS=$as_save_IFS
28959
28960fi
28961fi
28962ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28963if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28965$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28966else
28967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28968$as_echo "no" >&6; }
28969fi
28970
28971
28972  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28973done
28974
28975  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28976    PROPER_COMPILER_CC=""
28977  else
28978    case $cross_compiling:$ac_tool_warned in
28979yes:)
28980{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28981$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28982ac_tool_warned=yes ;;
28983esac
28984    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28985  fi
28986fi
28987
28988
28989  # Only process if variable expands to non-empty
28990
28991  if test "x$PROPER_COMPILER_CC" != x; then
28992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28993
28994  # First separate the path from the arguments. This will split at the first
28995  # space.
28996  complete="$PROPER_COMPILER_CC"
28997  path="${complete%% *}"
28998  tmp="$complete EOL"
28999  arguments="${tmp#* }"
29000
29001  # Input might be given as Windows format, start by converting to
29002  # unix format.
29003  new_path=`$CYGPATH -u "$path"`
29004
29005  # Now try to locate executable using which
29006  new_path=`$WHICH "$new_path" 2> /dev/null`
29007  # bat and cmd files are not always considered executable in cygwin causing which
29008  # to not find them
29009  if test "x$new_path" = x \
29010      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29011      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29012    new_path=`$CYGPATH -u "$path"`
29013  fi
29014  if test "x$new_path" = x; then
29015    # Oops. Which didn't find the executable.
29016    # The splitting of arguments from the executable at a space might have been incorrect,
29017    # since paths with space are more likely in Windows. Give it another try with the whole
29018    # argument.
29019    path="$complete"
29020    arguments="EOL"
29021    new_path=`$CYGPATH -u "$path"`
29022    new_path=`$WHICH "$new_path" 2> /dev/null`
29023    # bat and cmd files are not always considered executable in cygwin causing which
29024    # to not find them
29025    if test "x$new_path" = x \
29026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29028      new_path=`$CYGPATH -u "$path"`
29029    fi
29030    if test "x$new_path" = x; then
29031      # It's still not found. Now this is an unrecoverable error.
29032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29033$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29034      has_space=`$ECHO "$complete" | $GREP " "`
29035      if test "x$has_space" != x; then
29036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29038      fi
29039      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29040    fi
29041  fi
29042
29043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29046  # "foo.exe" is OK but "foo" is an error.
29047  #
29048  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29049  # It is also a way to make sure we got the proper file name for the real test later on.
29050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29051  if test "x$test_shortpath" = x; then
29052    # Short path failed, file does not exist as specified.
29053    # Try adding .exe or .cmd
29054    if test -f "${new_path}.exe"; then
29055      input_to_shortpath="${new_path}.exe"
29056    elif test -f "${new_path}.cmd"; then
29057      input_to_shortpath="${new_path}.cmd"
29058    else
29059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29060$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29061      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29063      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29064    fi
29065  else
29066    input_to_shortpath="$new_path"
29067  fi
29068
29069  # Call helper function which possibly converts this using DOS-style short mode.
29070  # If so, the updated path is stored in $new_path.
29071  new_path="$input_to_shortpath"
29072
29073  input_path="$input_to_shortpath"
29074  # Check if we need to convert this using DOS-style short mode. If the path
29075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29076  # take no chances and rewrite it.
29077  # Note: m4 eats our [], so we need to use [ and ] instead.
29078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29079  if test "x$has_forbidden_chars" != x; then
29080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29084      # Going to short mode and back again did indeed matter. Since short mode is
29085      # case insensitive, let's make it lowercase to improve readability.
29086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29087      # Now convert it back to Unix-style (cygpath)
29088      input_path=`$CYGPATH -u "$shortmode_path"`
29089      new_path="$input_path"
29090    fi
29091  fi
29092
29093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29094  if test "x$test_cygdrive_prefix" = x; then
29095    # As a simple fix, exclude /usr/bin since it's not a real path.
29096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29098      # a path prefixed by /cygdrive for fixpath to work.
29099      new_path="$CYGWIN_ROOT_PATH$input_path"
29100    fi
29101  fi
29102
29103  # remove trailing .exe if any
29104  new_path="${new_path/%.exe/}"
29105
29106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29107
29108  # First separate the path from the arguments. This will split at the first
29109  # space.
29110  complete="$PROPER_COMPILER_CC"
29111  path="${complete%% *}"
29112  tmp="$complete EOL"
29113  arguments="${tmp#* }"
29114
29115  # Input might be given as Windows format, start by converting to
29116  # unix format.
29117  new_path="$path"
29118
29119  windows_path="$new_path"
29120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29121    unix_path=`$CYGPATH -u "$windows_path"`
29122    new_path="$unix_path"
29123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29125    new_path="$unix_path"
29126  fi
29127
29128
29129  # Now try to locate executable using which
29130  new_path=`$WHICH "$new_path" 2> /dev/null`
29131
29132  if test "x$new_path" = x; then
29133    # Oops. Which didn't find the executable.
29134    # The splitting of arguments from the executable at a space might have been incorrect,
29135    # since paths with space are more likely in Windows. Give it another try with the whole
29136    # argument.
29137    path="$complete"
29138    arguments="EOL"
29139    new_path="$path"
29140
29141  windows_path="$new_path"
29142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29143    unix_path=`$CYGPATH -u "$windows_path"`
29144    new_path="$unix_path"
29145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29147    new_path="$unix_path"
29148  fi
29149
29150
29151    new_path=`$WHICH "$new_path" 2> /dev/null`
29152    # bat and cmd files are not always considered executable in MSYS causing which
29153    # to not find them
29154    if test "x$new_path" = x \
29155        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29156        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29157      new_path="$path"
29158
29159  windows_path="$new_path"
29160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29161    unix_path=`$CYGPATH -u "$windows_path"`
29162    new_path="$unix_path"
29163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29165    new_path="$unix_path"
29166  fi
29167
29168    fi
29169
29170    if test "x$new_path" = x; then
29171      # It's still not found. Now this is an unrecoverable error.
29172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29173$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29174      has_space=`$ECHO "$complete" | $GREP " "`
29175      if test "x$has_space" != x; then
29176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29178      fi
29179      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29180    fi
29181  fi
29182
29183  # Now new_path has a complete unix path to the binary
29184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29185    # Keep paths in /bin as-is, but remove trailing .exe if any
29186    new_path="${new_path/%.exe/}"
29187    # Do not save /bin paths to all_fixpath_prefixes!
29188  else
29189    # Not in mixed or Windows style, start by that.
29190    new_path=`cmd //c echo $new_path`
29191
29192  input_path="$new_path"
29193  # Check if we need to convert this using DOS-style short mode. If the path
29194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29195  # take no chances and rewrite it.
29196  # Note: m4 eats our [], so we need to use [ and ] instead.
29197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29198  if test "x$has_forbidden_chars" != x; then
29199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29201  fi
29202
29203    # Output is in $new_path
29204
29205  windows_path="$new_path"
29206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29207    unix_path=`$CYGPATH -u "$windows_path"`
29208    new_path="$unix_path"
29209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29211    new_path="$unix_path"
29212  fi
29213
29214    # remove trailing .exe if any
29215    new_path="${new_path/%.exe/}"
29216
29217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29219  fi
29220
29221    else
29222      # We're on a unix platform. Hooray! :)
29223      # First separate the path from the arguments. This will split at the first
29224      # space.
29225      complete="$PROPER_COMPILER_CC"
29226      path="${complete%% *}"
29227      tmp="$complete EOL"
29228      arguments="${tmp#* }"
29229
29230      # Cannot rely on the command "which" here since it doesn't always work.
29231      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29232      if test -z "$is_absolute_path"; then
29233        # Path to executable is not absolute. Find it.
29234        IFS_save="$IFS"
29235        IFS=:
29236        for p in $PATH; do
29237          if test -f "$p/$path" && test -x "$p/$path"; then
29238            new_path="$p/$path"
29239            break
29240          fi
29241        done
29242        IFS="$IFS_save"
29243      else
29244        # This is an absolute path, we can use it without further modifications.
29245        new_path="$path"
29246      fi
29247
29248      if test "x$new_path" = x; then
29249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29250$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29251        has_space=`$ECHO "$complete" | $GREP " "`
29252        if test "x$has_space" != x; then
29253          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29255        fi
29256        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29257      fi
29258    fi
29259
29260    # Now join together the path and the arguments once again
29261    if test "x$arguments" != xEOL; then
29262      new_complete="$new_path ${arguments% *}"
29263    else
29264      new_complete="$new_path"
29265    fi
29266
29267    if test "x$complete" != "x$new_complete"; then
29268      PROPER_COMPILER_CC="$new_complete"
29269      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29270$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29271    fi
29272  fi
29273
29274    PATH="$RETRY_COMPILER_SAVED_PATH"
29275
29276    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29277$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29278
29279  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29280    # Follow a chain of symbolic links. Use readlink
29281    # where it exists, else fall back to horribly
29282    # complicated shell code.
29283    if test "x$READLINK_TESTED" != yes; then
29284      # On MacOSX there is a readlink tool with a different
29285      # purpose than the GNU readlink tool. Check the found readlink.
29286      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29287      if test "x$ISGNU" = x; then
29288        # A readlink that we do not know how to use.
29289        # Are there other non-GNU readlinks out there?
29290        READLINK_TESTED=yes
29291        READLINK=
29292      fi
29293    fi
29294
29295    if test "x$READLINK" != x; then
29296      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29297    else
29298      # Save the current directory for restoring afterwards
29299      STARTDIR=$PWD
29300      COUNTER=0
29301      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29302      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29303      cd $sym_link_dir
29304      # Use -P flag to resolve symlinks in directories.
29305      cd `$THEPWDCMD -P`
29306      sym_link_dir=`$THEPWDCMD -P`
29307      # Resolve file symlinks
29308      while test $COUNTER -lt 20; do
29309        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29310        if test "x$ISLINK" == x; then
29311          # This is not a symbolic link! We are done!
29312          break
29313        fi
29314        # Again resolve directory symlinks since the target of the just found
29315        # link could be in a different directory
29316        cd `$DIRNAME $ISLINK`
29317        sym_link_dir=`$THEPWDCMD -P`
29318        sym_link_file=`$BASENAME $ISLINK`
29319        let COUNTER=COUNTER+1
29320      done
29321      cd $STARTDIR
29322      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29323    fi
29324  fi
29325
29326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29327$as_echo "$PROPER_COMPILER_CC" >&6; }
29328    CC="$PROPER_COMPILER_CC"
29329  else
29330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29331$as_echo "no, keeping CC" >&6; }
29332  fi
29333
29334
29335  COMPILER=$CC
29336  COMPILER_NAME=$COMPILER_NAME
29337
29338  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29339    # cc -V output typically looks like
29340    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29341    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29342    # Check that this is likely to be the Solaris Studio cc.
29343    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29344    if test $? -ne 0; then
29345      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29346      { $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
29347$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29348      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29349$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29350      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29351$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29352      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29353    fi
29354    # Remove usage instructions (if present), and
29355    # collapse compiler output into a single line
29356    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29357        $SED -e 's/ *[Uu]sage:.*//'`
29358    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29359        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29360  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29361    # xlc -qversion output typically looks like
29362    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29363    #     Version: 11.01.0000.0015
29364    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29365    # Check that this is likely to be the IBM XL C compiler.
29366    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29367    if test $? -ne 0; then
29368      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29369      { $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
29370$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29371      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29372$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29373      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29374$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29375      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29376    fi
29377    # Collapse compiler output into a single line
29378    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29379    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29380        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29381  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29382    # There is no specific version flag, but all output starts with a version string.
29383    # First line typically looks something like:
29384    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29385    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29386    # Check that this is likely to be Microsoft CL.EXE.
29387    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29388    if test $? -ne 0; then
29389      { $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
29390$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29391      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29392$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29393      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29394    fi
29395    # Collapse compiler output into a single line
29396    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29397    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29398        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29399  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29400    # gcc --version output typically looks like
29401    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29402    #     Copyright (C) 2013 Free Software Foundation, Inc.
29403    #     This is free software; see the source for copying conditions.  There is NO
29404    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29405    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29406    # Check that this is likely to be GCC.
29407    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29408    if test $? -ne 0; then
29409      { $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
29410$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29411      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29412$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29413      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29414    fi
29415    # Remove Copyright and legalese from version string, and
29416    # collapse into a single line
29417    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29418        $SED -e 's/ *Copyright .*//'`
29419    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29420        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29421  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29422    # clang --version output typically looks like
29423    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29424    #    clang version 3.3 (tags/RELEASE_33/final)
29425    # or
29426    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29427    #    Target: x86_64-pc-linux-gnu
29428    #    Thread model: posix
29429    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29430    # Check that this is likely to be clang
29431    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29432    if test $? -ne 0; then
29433      { $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
29434$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29435      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29436$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29437      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29438    fi
29439    # Collapse compiler output into a single line
29440    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29441    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29442        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29443  else
29444      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29445  fi
29446  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29447  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29448  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29449  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29450
29451  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29452$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29453
29454
29455  # Now that we have resolved CC ourself, let autoconf have its go at it
29456  ac_ext=c
29457ac_cpp='$CPP $CPPFLAGS'
29458ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29459ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29460ac_compiler_gnu=$ac_cv_c_compiler_gnu
29461if test -n "$ac_tool_prefix"; then
29462  for ac_prog in $CC
29463  do
29464    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29465set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29467$as_echo_n "checking for $ac_word... " >&6; }
29468if ${ac_cv_prog_CC+:} false; then :
29469  $as_echo_n "(cached) " >&6
29470else
29471  if test -n "$CC"; then
29472  ac_cv_prog_CC="$CC" # Let the user override the test.
29473else
29474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29475for as_dir in $PATH
29476do
29477  IFS=$as_save_IFS
29478  test -z "$as_dir" && as_dir=.
29479    for ac_exec_ext in '' $ac_executable_extensions; do
29480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29481    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29483    break 2
29484  fi
29485done
29486  done
29487IFS=$as_save_IFS
29488
29489fi
29490fi
29491CC=$ac_cv_prog_CC
29492if test -n "$CC"; then
29493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29494$as_echo "$CC" >&6; }
29495else
29496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29497$as_echo "no" >&6; }
29498fi
29499
29500
29501    test -n "$CC" && break
29502  done
29503fi
29504if test -z "$CC"; then
29505  ac_ct_CC=$CC
29506  for ac_prog in $CC
29507do
29508  # Extract the first word of "$ac_prog", so it can be a program name with args.
29509set dummy $ac_prog; ac_word=$2
29510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29511$as_echo_n "checking for $ac_word... " >&6; }
29512if ${ac_cv_prog_ac_ct_CC+:} false; then :
29513  $as_echo_n "(cached) " >&6
29514else
29515  if test -n "$ac_ct_CC"; then
29516  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29517else
29518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29519for as_dir in $PATH
29520do
29521  IFS=$as_save_IFS
29522  test -z "$as_dir" && as_dir=.
29523    for ac_exec_ext in '' $ac_executable_extensions; do
29524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29525    ac_cv_prog_ac_ct_CC="$ac_prog"
29526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29527    break 2
29528  fi
29529done
29530  done
29531IFS=$as_save_IFS
29532
29533fi
29534fi
29535ac_ct_CC=$ac_cv_prog_ac_ct_CC
29536if test -n "$ac_ct_CC"; then
29537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29538$as_echo "$ac_ct_CC" >&6; }
29539else
29540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29541$as_echo "no" >&6; }
29542fi
29543
29544
29545  test -n "$ac_ct_CC" && break
29546done
29547
29548  if test "x$ac_ct_CC" = x; then
29549    CC=""
29550  else
29551    case $cross_compiling:$ac_tool_warned in
29552yes:)
29553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29555ac_tool_warned=yes ;;
29556esac
29557    CC=$ac_ct_CC
29558  fi
29559fi
29560
29561
29562test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29564as_fn_error $? "no acceptable C compiler found in \$PATH
29565See \`config.log' for more details" "$LINENO" 5; }
29566
29567# Provide some information about the compiler.
29568$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29569set X $ac_compile
29570ac_compiler=$2
29571for ac_option in --version -v -V -qversion; do
29572  { { ac_try="$ac_compiler $ac_option >&5"
29573case "(($ac_try" in
29574  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29575  *) ac_try_echo=$ac_try;;
29576esac
29577eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29578$as_echo "$ac_try_echo"; } >&5
29579  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29580  ac_status=$?
29581  if test -s conftest.err; then
29582    sed '10a\
29583... rest of stderr output deleted ...
29584         10q' conftest.err >conftest.er1
29585    cat conftest.er1 >&5
29586  fi
29587  rm -f conftest.er1 conftest.err
29588  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29589  test $ac_status = 0; }
29590done
29591
29592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29593/* end confdefs.h.  */
29594
29595int
29596main ()
29597{
29598
29599  ;
29600  return 0;
29601}
29602_ACEOF
29603ac_clean_files_save=$ac_clean_files
29604ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29605# Try to create an executable without -o first, disregard a.out.
29606# It will help us diagnose broken compilers, and finding out an intuition
29607# of exeext.
29608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29609$as_echo_n "checking whether the C compiler works... " >&6; }
29610ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29611
29612# The possible output files:
29613ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29614
29615ac_rmfiles=
29616for ac_file in $ac_files
29617do
29618  case $ac_file in
29619    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29620    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29621  esac
29622done
29623rm -f $ac_rmfiles
29624
29625if { { ac_try="$ac_link_default"
29626case "(($ac_try" in
29627  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29628  *) ac_try_echo=$ac_try;;
29629esac
29630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29631$as_echo "$ac_try_echo"; } >&5
29632  (eval "$ac_link_default") 2>&5
29633  ac_status=$?
29634  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29635  test $ac_status = 0; }; then :
29636  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29637# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29638# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29639# so that the user can short-circuit this test for compilers unknown to
29640# Autoconf.
29641for ac_file in $ac_files ''
29642do
29643  test -f "$ac_file" || continue
29644  case $ac_file in
29645    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29646	;;
29647    [ab].out )
29648	# We found the default executable, but exeext='' is most
29649	# certainly right.
29650	break;;
29651    *.* )
29652	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29653	then :; else
29654	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29655	fi
29656	# We set ac_cv_exeext here because the later test for it is not
29657	# safe: cross compilers may not add the suffix if given an `-o'
29658	# argument, so we may need to know it at that point already.
29659	# Even if this section looks crufty: it has the advantage of
29660	# actually working.
29661	break;;
29662    * )
29663	break;;
29664  esac
29665done
29666test "$ac_cv_exeext" = no && ac_cv_exeext=
29667
29668else
29669  ac_file=''
29670fi
29671if test -z "$ac_file"; then :
29672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29673$as_echo "no" >&6; }
29674$as_echo "$as_me: failed program was:" >&5
29675sed 's/^/| /' conftest.$ac_ext >&5
29676
29677{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29679as_fn_error 77 "C compiler cannot create executables
29680See \`config.log' for more details" "$LINENO" 5; }
29681else
29682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29683$as_echo "yes" >&6; }
29684fi
29685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29686$as_echo_n "checking for C compiler default output file name... " >&6; }
29687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29688$as_echo "$ac_file" >&6; }
29689ac_exeext=$ac_cv_exeext
29690
29691rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29692ac_clean_files=$ac_clean_files_save
29693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29694$as_echo_n "checking for suffix of executables... " >&6; }
29695if { { ac_try="$ac_link"
29696case "(($ac_try" in
29697  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29698  *) ac_try_echo=$ac_try;;
29699esac
29700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29701$as_echo "$ac_try_echo"; } >&5
29702  (eval "$ac_link") 2>&5
29703  ac_status=$?
29704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29705  test $ac_status = 0; }; then :
29706  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29707# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29708# work properly (i.e., refer to `conftest.exe'), while it won't with
29709# `rm'.
29710for ac_file in conftest.exe conftest conftest.*; do
29711  test -f "$ac_file" || continue
29712  case $ac_file in
29713    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29714    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29715	  break;;
29716    * ) break;;
29717  esac
29718done
29719else
29720  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29722as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29723See \`config.log' for more details" "$LINENO" 5; }
29724fi
29725rm -f conftest conftest$ac_cv_exeext
29726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29727$as_echo "$ac_cv_exeext" >&6; }
29728
29729rm -f conftest.$ac_ext
29730EXEEXT=$ac_cv_exeext
29731ac_exeext=$EXEEXT
29732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29733/* end confdefs.h.  */
29734#include <stdio.h>
29735int
29736main ()
29737{
29738FILE *f = fopen ("conftest.out", "w");
29739 return ferror (f) || fclose (f) != 0;
29740
29741  ;
29742  return 0;
29743}
29744_ACEOF
29745ac_clean_files="$ac_clean_files conftest.out"
29746# Check that the compiler produces executables we can run.  If not, either
29747# the compiler is broken, or we cross compile.
29748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29749$as_echo_n "checking whether we are cross compiling... " >&6; }
29750if test "$cross_compiling" != yes; then
29751  { { ac_try="$ac_link"
29752case "(($ac_try" in
29753  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29754  *) ac_try_echo=$ac_try;;
29755esac
29756eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29757$as_echo "$ac_try_echo"; } >&5
29758  (eval "$ac_link") 2>&5
29759  ac_status=$?
29760  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29761  test $ac_status = 0; }
29762  if { ac_try='./conftest$ac_cv_exeext'
29763  { { case "(($ac_try" in
29764  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29765  *) ac_try_echo=$ac_try;;
29766esac
29767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29768$as_echo "$ac_try_echo"; } >&5
29769  (eval "$ac_try") 2>&5
29770  ac_status=$?
29771  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29772  test $ac_status = 0; }; }; then
29773    cross_compiling=no
29774  else
29775    if test "$cross_compiling" = maybe; then
29776	cross_compiling=yes
29777    else
29778	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29780as_fn_error $? "cannot run C compiled programs.
29781If you meant to cross compile, use \`--host'.
29782See \`config.log' for more details" "$LINENO" 5; }
29783    fi
29784  fi
29785fi
29786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29787$as_echo "$cross_compiling" >&6; }
29788
29789rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29790ac_clean_files=$ac_clean_files_save
29791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29792$as_echo_n "checking for suffix of object files... " >&6; }
29793if ${ac_cv_objext+:} false; then :
29794  $as_echo_n "(cached) " >&6
29795else
29796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29797/* end confdefs.h.  */
29798
29799int
29800main ()
29801{
29802
29803  ;
29804  return 0;
29805}
29806_ACEOF
29807rm -f conftest.o conftest.obj
29808if { { ac_try="$ac_compile"
29809case "(($ac_try" in
29810  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29811  *) ac_try_echo=$ac_try;;
29812esac
29813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29814$as_echo "$ac_try_echo"; } >&5
29815  (eval "$ac_compile") 2>&5
29816  ac_status=$?
29817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29818  test $ac_status = 0; }; then :
29819  for ac_file in conftest.o conftest.obj conftest.*; do
29820  test -f "$ac_file" || continue;
29821  case $ac_file in
29822    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29823    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29824       break;;
29825  esac
29826done
29827else
29828  $as_echo "$as_me: failed program was:" >&5
29829sed 's/^/| /' conftest.$ac_ext >&5
29830
29831{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29833as_fn_error $? "cannot compute suffix of object files: cannot compile
29834See \`config.log' for more details" "$LINENO" 5; }
29835fi
29836rm -f conftest.$ac_cv_objext conftest.$ac_ext
29837fi
29838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29839$as_echo "$ac_cv_objext" >&6; }
29840OBJEXT=$ac_cv_objext
29841ac_objext=$OBJEXT
29842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29843$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29844if ${ac_cv_c_compiler_gnu+:} false; then :
29845  $as_echo_n "(cached) " >&6
29846else
29847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29848/* end confdefs.h.  */
29849
29850int
29851main ()
29852{
29853#ifndef __GNUC__
29854       choke me
29855#endif
29856
29857  ;
29858  return 0;
29859}
29860_ACEOF
29861if ac_fn_c_try_compile "$LINENO"; then :
29862  ac_compiler_gnu=yes
29863else
29864  ac_compiler_gnu=no
29865fi
29866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29867ac_cv_c_compiler_gnu=$ac_compiler_gnu
29868
29869fi
29870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29871$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29872if test $ac_compiler_gnu = yes; then
29873  GCC=yes
29874else
29875  GCC=
29876fi
29877ac_test_CFLAGS=${CFLAGS+set}
29878ac_save_CFLAGS=$CFLAGS
29879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29880$as_echo_n "checking whether $CC accepts -g... " >&6; }
29881if ${ac_cv_prog_cc_g+:} false; then :
29882  $as_echo_n "(cached) " >&6
29883else
29884  ac_save_c_werror_flag=$ac_c_werror_flag
29885   ac_c_werror_flag=yes
29886   ac_cv_prog_cc_g=no
29887   CFLAGS="-g"
29888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29889/* end confdefs.h.  */
29890
29891int
29892main ()
29893{
29894
29895  ;
29896  return 0;
29897}
29898_ACEOF
29899if ac_fn_c_try_compile "$LINENO"; then :
29900  ac_cv_prog_cc_g=yes
29901else
29902  CFLAGS=""
29903      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29904/* end confdefs.h.  */
29905
29906int
29907main ()
29908{
29909
29910  ;
29911  return 0;
29912}
29913_ACEOF
29914if ac_fn_c_try_compile "$LINENO"; then :
29915
29916else
29917  ac_c_werror_flag=$ac_save_c_werror_flag
29918	 CFLAGS="-g"
29919	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29920/* end confdefs.h.  */
29921
29922int
29923main ()
29924{
29925
29926  ;
29927  return 0;
29928}
29929_ACEOF
29930if ac_fn_c_try_compile "$LINENO"; then :
29931  ac_cv_prog_cc_g=yes
29932fi
29933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29934fi
29935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29936fi
29937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29938   ac_c_werror_flag=$ac_save_c_werror_flag
29939fi
29940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29941$as_echo "$ac_cv_prog_cc_g" >&6; }
29942if test "$ac_test_CFLAGS" = set; then
29943  CFLAGS=$ac_save_CFLAGS
29944elif test $ac_cv_prog_cc_g = yes; then
29945  if test "$GCC" = yes; then
29946    CFLAGS="-g -O2"
29947  else
29948    CFLAGS="-g"
29949  fi
29950else
29951  if test "$GCC" = yes; then
29952    CFLAGS="-O2"
29953  else
29954    CFLAGS=
29955  fi
29956fi
29957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29958$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29959if ${ac_cv_prog_cc_c89+:} false; then :
29960  $as_echo_n "(cached) " >&6
29961else
29962  ac_cv_prog_cc_c89=no
29963ac_save_CC=$CC
29964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29965/* end confdefs.h.  */
29966#include <stdarg.h>
29967#include <stdio.h>
29968struct stat;
29969/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29970struct buf { int x; };
29971FILE * (*rcsopen) (struct buf *, struct stat *, int);
29972static char *e (p, i)
29973     char **p;
29974     int i;
29975{
29976  return p[i];
29977}
29978static char *f (char * (*g) (char **, int), char **p, ...)
29979{
29980  char *s;
29981  va_list v;
29982  va_start (v,p);
29983  s = g (p, va_arg (v,int));
29984  va_end (v);
29985  return s;
29986}
29987
29988/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29989   function prototypes and stuff, but not '\xHH' hex character constants.
29990   These don't provoke an error unfortunately, instead are silently treated
29991   as 'x'.  The following induces an error, until -std is added to get
29992   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29993   array size at least.  It's necessary to write '\x00'==0 to get something
29994   that's true only with -std.  */
29995int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29996
29997/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29998   inside strings and character constants.  */
29999#define FOO(x) 'x'
30000int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30001
30002int test (int i, double x);
30003struct s1 {int (*f) (int a);};
30004struct s2 {int (*f) (double a);};
30005int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30006int argc;
30007char **argv;
30008int
30009main ()
30010{
30011return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30012  ;
30013  return 0;
30014}
30015_ACEOF
30016for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30017	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30018do
30019  CC="$ac_save_CC $ac_arg"
30020  if ac_fn_c_try_compile "$LINENO"; then :
30021  ac_cv_prog_cc_c89=$ac_arg
30022fi
30023rm -f core conftest.err conftest.$ac_objext
30024  test "x$ac_cv_prog_cc_c89" != "xno" && break
30025done
30026rm -f conftest.$ac_ext
30027CC=$ac_save_CC
30028
30029fi
30030# AC_CACHE_VAL
30031case "x$ac_cv_prog_cc_c89" in
30032  x)
30033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30034$as_echo "none needed" >&6; } ;;
30035  xno)
30036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30037$as_echo "unsupported" >&6; } ;;
30038  *)
30039    CC="$CC $ac_cv_prog_cc_c89"
30040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30041$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30042esac
30043if test "x$ac_cv_prog_cc_c89" != xno; then :
30044
30045fi
30046
30047ac_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
30055  COMPILER_NAME=C++
30056  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30057
30058  if test "x$CXX" != x; then
30059    # User has supplied compiler name already, always let that override.
30060    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30061$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30062    if test "x`basename $CXX`" = "x$CXX"; then
30063      # A command without a complete path is provided, search $PATH.
30064
30065      for ac_prog in $CXX
30066do
30067  # Extract the first word of "$ac_prog", so it can be a program name with args.
30068set dummy $ac_prog; ac_word=$2
30069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30070$as_echo_n "checking for $ac_word... " >&6; }
30071if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30072  $as_echo_n "(cached) " >&6
30073else
30074  case $POTENTIAL_CXX in
30075  [\\/]* | ?:[\\/]*)
30076  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30077  ;;
30078  *)
30079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30080for as_dir in $PATH
30081do
30082  IFS=$as_save_IFS
30083  test -z "$as_dir" && as_dir=.
30084    for ac_exec_ext in '' $ac_executable_extensions; do
30085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30086    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30088    break 2
30089  fi
30090done
30091  done
30092IFS=$as_save_IFS
30093
30094  ;;
30095esac
30096fi
30097POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30098if test -n "$POTENTIAL_CXX"; then
30099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30100$as_echo "$POTENTIAL_CXX" >&6; }
30101else
30102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30103$as_echo "no" >&6; }
30104fi
30105
30106
30107  test -n "$POTENTIAL_CXX" && break
30108done
30109
30110      if test "x$POTENTIAL_CXX" != x; then
30111        CXX=$POTENTIAL_CXX
30112      else
30113        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30114      fi
30115    else
30116      # Otherwise it might already be a complete path
30117      if test ! -x "$CXX"; then
30118        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30119      fi
30120    fi
30121  else
30122    # No user supplied value. Locate compiler ourselves.
30123
30124    # If we are cross compiling, assume cross compilation tools follows the
30125    # cross compilation standard where they are prefixed with the autoconf
30126    # standard name for the target. For example the binary
30127    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30128    # If we are not cross compiling, then the default compiler name will be
30129    # used.
30130
30131    CXX=
30132    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30133    # before checking the rest of the PATH.
30134    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30135    # step, this should not be necessary.
30136    if test -n "$TOOLCHAIN_PATH"; then
30137      PATH_save="$PATH"
30138      PATH="$TOOLCHAIN_PATH"
30139      for ac_prog in $SEARCH_LIST
30140do
30141  # Extract the first word of "$ac_prog", so it can be a program name with args.
30142set dummy $ac_prog; ac_word=$2
30143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30144$as_echo_n "checking for $ac_word... " >&6; }
30145if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30146  $as_echo_n "(cached) " >&6
30147else
30148  case $TOOLCHAIN_PATH_CXX in
30149  [\\/]* | ?:[\\/]*)
30150  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30151  ;;
30152  *)
30153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30154for as_dir in $PATH
30155do
30156  IFS=$as_save_IFS
30157  test -z "$as_dir" && as_dir=.
30158    for ac_exec_ext in '' $ac_executable_extensions; do
30159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30160    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30162    break 2
30163  fi
30164done
30165  done
30166IFS=$as_save_IFS
30167
30168  ;;
30169esac
30170fi
30171TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30172if test -n "$TOOLCHAIN_PATH_CXX"; then
30173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30174$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30175else
30176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30177$as_echo "no" >&6; }
30178fi
30179
30180
30181  test -n "$TOOLCHAIN_PATH_CXX" && break
30182done
30183
30184      CXX=$TOOLCHAIN_PATH_CXX
30185      PATH="$PATH_save"
30186    fi
30187
30188    # AC_PATH_PROGS can't be run multiple times with the same variable,
30189    # so create a new name for this run.
30190    if test "x$CXX" = x; then
30191      for ac_prog in $SEARCH_LIST
30192do
30193  # Extract the first word of "$ac_prog", so it can be a program name with args.
30194set dummy $ac_prog; ac_word=$2
30195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30196$as_echo_n "checking for $ac_word... " >&6; }
30197if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30198  $as_echo_n "(cached) " >&6
30199else
30200  case $POTENTIAL_CXX in
30201  [\\/]* | ?:[\\/]*)
30202  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30203  ;;
30204  *)
30205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30206for as_dir in $PATH
30207do
30208  IFS=$as_save_IFS
30209  test -z "$as_dir" && as_dir=.
30210    for ac_exec_ext in '' $ac_executable_extensions; do
30211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30212    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30214    break 2
30215  fi
30216done
30217  done
30218IFS=$as_save_IFS
30219
30220  ;;
30221esac
30222fi
30223POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30224if test -n "$POTENTIAL_CXX"; then
30225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30226$as_echo "$POTENTIAL_CXX" >&6; }
30227else
30228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30229$as_echo "no" >&6; }
30230fi
30231
30232
30233  test -n "$POTENTIAL_CXX" && break
30234done
30235
30236      CXX=$POTENTIAL_CXX
30237    fi
30238
30239    if test "x$CXX" = x; then
30240
30241  # Print a helpful message on how to acquire the necessary build dependency.
30242  # devkit is the help tag: freetype, cups, pulse, alsa etc
30243  MISSING_DEPENDENCY=devkit
30244
30245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30246    cygwin_help $MISSING_DEPENDENCY
30247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30248    msys_help $MISSING_DEPENDENCY
30249  else
30250    PKGHANDLER_COMMAND=
30251
30252    case $PKGHANDLER in
30253      apt-get)
30254        apt_help     $MISSING_DEPENDENCY ;;
30255      yum)
30256        yum_help     $MISSING_DEPENDENCY ;;
30257      port)
30258        port_help    $MISSING_DEPENDENCY ;;
30259      pkgutil)
30260        pkgutil_help $MISSING_DEPENDENCY ;;
30261      pkgadd)
30262        pkgadd_help  $MISSING_DEPENDENCY ;;
30263    esac
30264
30265    if test "x$PKGHANDLER_COMMAND" != x; then
30266      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30267    fi
30268  fi
30269
30270      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30271    fi
30272  fi
30273
30274  # Now we have a compiler binary in CXX. Make sure it's okay.
30275
30276  # Only process if variable expands to non-empty
30277
30278  if test "x$CXX" != x; then
30279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30280
30281  # First separate the path from the arguments. This will split at the first
30282  # space.
30283  complete="$CXX"
30284  path="${complete%% *}"
30285  tmp="$complete EOL"
30286  arguments="${tmp#* }"
30287
30288  # Input might be given as Windows format, start by converting to
30289  # unix format.
30290  new_path=`$CYGPATH -u "$path"`
30291
30292  # Now try to locate executable using which
30293  new_path=`$WHICH "$new_path" 2> /dev/null`
30294  # bat and cmd files are not always considered executable in cygwin causing which
30295  # to not find them
30296  if test "x$new_path" = x \
30297      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30298      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30299    new_path=`$CYGPATH -u "$path"`
30300  fi
30301  if test "x$new_path" = x; then
30302    # Oops. Which didn't find the executable.
30303    # The splitting of arguments from the executable at a space might have been incorrect,
30304    # since paths with space are more likely in Windows. Give it another try with the whole
30305    # argument.
30306    path="$complete"
30307    arguments="EOL"
30308    new_path=`$CYGPATH -u "$path"`
30309    new_path=`$WHICH "$new_path" 2> /dev/null`
30310    # bat and cmd files are not always considered executable in cygwin causing which
30311    # to not find them
30312    if test "x$new_path" = x \
30313        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30314        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30315      new_path=`$CYGPATH -u "$path"`
30316    fi
30317    if test "x$new_path" = x; then
30318      # It's still not found. Now this is an unrecoverable error.
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30320$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30321      has_space=`$ECHO "$complete" | $GREP " "`
30322      if test "x$has_space" != x; then
30323        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30324$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30325      fi
30326      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30327    fi
30328  fi
30329
30330  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30331  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30332  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30333  # "foo.exe" is OK but "foo" is an error.
30334  #
30335  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30336  # It is also a way to make sure we got the proper file name for the real test later on.
30337  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30338  if test "x$test_shortpath" = x; then
30339    # Short path failed, file does not exist as specified.
30340    # Try adding .exe or .cmd
30341    if test -f "${new_path}.exe"; then
30342      input_to_shortpath="${new_path}.exe"
30343    elif test -f "${new_path}.cmd"; then
30344      input_to_shortpath="${new_path}.cmd"
30345    else
30346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30347$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30348      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30349$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30350      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30351    fi
30352  else
30353    input_to_shortpath="$new_path"
30354  fi
30355
30356  # Call helper function which possibly converts this using DOS-style short mode.
30357  # If so, the updated path is stored in $new_path.
30358  new_path="$input_to_shortpath"
30359
30360  input_path="$input_to_shortpath"
30361  # Check if we need to convert this using DOS-style short mode. If the path
30362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30363  # take no chances and rewrite it.
30364  # Note: m4 eats our [], so we need to use [ and ] instead.
30365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30366  if test "x$has_forbidden_chars" != x; then
30367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30371      # Going to short mode and back again did indeed matter. Since short mode is
30372      # case insensitive, let's make it lowercase to improve readability.
30373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30374      # Now convert it back to Unix-style (cygpath)
30375      input_path=`$CYGPATH -u "$shortmode_path"`
30376      new_path="$input_path"
30377    fi
30378  fi
30379
30380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30381  if test "x$test_cygdrive_prefix" = x; then
30382    # As a simple fix, exclude /usr/bin since it's not a real path.
30383    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30385      # a path prefixed by /cygdrive for fixpath to work.
30386      new_path="$CYGWIN_ROOT_PATH$input_path"
30387    fi
30388  fi
30389
30390  # remove trailing .exe if any
30391  new_path="${new_path/%.exe/}"
30392
30393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30394
30395  # First separate the path from the arguments. This will split at the first
30396  # space.
30397  complete="$CXX"
30398  path="${complete%% *}"
30399  tmp="$complete EOL"
30400  arguments="${tmp#* }"
30401
30402  # Input might be given as Windows format, start by converting to
30403  # unix format.
30404  new_path="$path"
30405
30406  windows_path="$new_path"
30407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30408    unix_path=`$CYGPATH -u "$windows_path"`
30409    new_path="$unix_path"
30410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30412    new_path="$unix_path"
30413  fi
30414
30415
30416  # Now try to locate executable using which
30417  new_path=`$WHICH "$new_path" 2> /dev/null`
30418
30419  if test "x$new_path" = x; then
30420    # Oops. Which didn't find the executable.
30421    # The splitting of arguments from the executable at a space might have been incorrect,
30422    # since paths with space are more likely in Windows. Give it another try with the whole
30423    # argument.
30424    path="$complete"
30425    arguments="EOL"
30426    new_path="$path"
30427
30428  windows_path="$new_path"
30429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30430    unix_path=`$CYGPATH -u "$windows_path"`
30431    new_path="$unix_path"
30432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30434    new_path="$unix_path"
30435  fi
30436
30437
30438    new_path=`$WHICH "$new_path" 2> /dev/null`
30439    # bat and cmd files are not always considered executable in MSYS causing which
30440    # to not find them
30441    if test "x$new_path" = x \
30442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30444      new_path="$path"
30445
30446  windows_path="$new_path"
30447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30448    unix_path=`$CYGPATH -u "$windows_path"`
30449    new_path="$unix_path"
30450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30452    new_path="$unix_path"
30453  fi
30454
30455    fi
30456
30457    if test "x$new_path" = x; then
30458      # It's still not found. Now this is an unrecoverable error.
30459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30460$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30461      has_space=`$ECHO "$complete" | $GREP " "`
30462      if test "x$has_space" != x; then
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30465      fi
30466      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30467    fi
30468  fi
30469
30470  # Now new_path has a complete unix path to the binary
30471  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30472    # Keep paths in /bin as-is, but remove trailing .exe if any
30473    new_path="${new_path/%.exe/}"
30474    # Do not save /bin paths to all_fixpath_prefixes!
30475  else
30476    # Not in mixed or Windows style, start by that.
30477    new_path=`cmd //c echo $new_path`
30478
30479  input_path="$new_path"
30480  # Check if we need to convert this using DOS-style short mode. If the path
30481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30482  # take no chances and rewrite it.
30483  # Note: m4 eats our [], so we need to use [ and ] instead.
30484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30485  if test "x$has_forbidden_chars" != x; then
30486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30488  fi
30489
30490    # Output is in $new_path
30491
30492  windows_path="$new_path"
30493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30494    unix_path=`$CYGPATH -u "$windows_path"`
30495    new_path="$unix_path"
30496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30498    new_path="$unix_path"
30499  fi
30500
30501    # remove trailing .exe if any
30502    new_path="${new_path/%.exe/}"
30503
30504    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30505    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30506  fi
30507
30508    else
30509      # We're on a unix platform. Hooray! :)
30510      # First separate the path from the arguments. This will split at the first
30511      # space.
30512      complete="$CXX"
30513      path="${complete%% *}"
30514      tmp="$complete EOL"
30515      arguments="${tmp#* }"
30516
30517      # Cannot rely on the command "which" here since it doesn't always work.
30518      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30519      if test -z "$is_absolute_path"; then
30520        # Path to executable is not absolute. Find it.
30521        IFS_save="$IFS"
30522        IFS=:
30523        for p in $PATH; do
30524          if test -f "$p/$path" && test -x "$p/$path"; then
30525            new_path="$p/$path"
30526            break
30527          fi
30528        done
30529        IFS="$IFS_save"
30530      else
30531        # This is an absolute path, we can use it without further modifications.
30532        new_path="$path"
30533      fi
30534
30535      if test "x$new_path" = x; then
30536        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30537$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30538        has_space=`$ECHO "$complete" | $GREP " "`
30539        if test "x$has_space" != x; then
30540          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30541$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30542        fi
30543        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30544      fi
30545    fi
30546
30547    # Now join together the path and the arguments once again
30548    if test "x$arguments" != xEOL; then
30549      new_complete="$new_path ${arguments% *}"
30550    else
30551      new_complete="$new_path"
30552    fi
30553
30554    if test "x$complete" != "x$new_complete"; then
30555      CXX="$new_complete"
30556      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30557$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30558    fi
30559  fi
30560
30561  TEST_COMPILER="$CXX"
30562  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30563  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30564  if test "x$OPENJDK_BUILD_OS" != xaix; then
30565    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30567$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30568
30569  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30570    # Follow a chain of symbolic links. Use readlink
30571    # where it exists, else fall back to horribly
30572    # complicated shell code.
30573    if test "x$READLINK_TESTED" != yes; then
30574      # On MacOSX there is a readlink tool with a different
30575      # purpose than the GNU readlink tool. Check the found readlink.
30576      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30577      if test "x$ISGNU" = x; then
30578        # A readlink that we do not know how to use.
30579        # Are there other non-GNU readlinks out there?
30580        READLINK_TESTED=yes
30581        READLINK=
30582      fi
30583    fi
30584
30585    if test "x$READLINK" != x; then
30586      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30587    else
30588      # Save the current directory for restoring afterwards
30589      STARTDIR=$PWD
30590      COUNTER=0
30591      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30592      sym_link_file=`$BASENAME $TEST_COMPILER`
30593      cd $sym_link_dir
30594      # Use -P flag to resolve symlinks in directories.
30595      cd `$THEPWDCMD -P`
30596      sym_link_dir=`$THEPWDCMD -P`
30597      # Resolve file symlinks
30598      while test $COUNTER -lt 20; do
30599        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30600        if test "x$ISLINK" == x; then
30601          # This is not a symbolic link! We are done!
30602          break
30603        fi
30604        # Again resolve directory symlinks since the target of the just found
30605        # link could be in a different directory
30606        cd `$DIRNAME $ISLINK`
30607        sym_link_dir=`$THEPWDCMD -P`
30608        sym_link_file=`$BASENAME $ISLINK`
30609        let COUNTER=COUNTER+1
30610      done
30611      cd $STARTDIR
30612      TEST_COMPILER=$sym_link_dir/$sym_link_file
30613    fi
30614  fi
30615
30616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30617$as_echo "$TEST_COMPILER" >&6; }
30618  fi
30619  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30620$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30621
30622  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30623  if test "x$COMPILER_BASENAME" = "xccache"; then
30624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30625$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30626    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30627    # We want to control ccache invocation ourselves, so ignore this cc and try
30628    # searching again.
30629
30630    # Remove the path to the fake ccache cc from the PATH
30631    RETRY_COMPILER_SAVED_PATH="$PATH"
30632    COMPILER_DIRNAME=`$DIRNAME $CXX`
30633    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30634
30635    # Try again looking for our compiler
30636    if test -n "$ac_tool_prefix"; then
30637  for ac_prog in $TOOLCHAIN_CXX_BINARY
30638  do
30639    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30640set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30642$as_echo_n "checking for $ac_word... " >&6; }
30643if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30644  $as_echo_n "(cached) " >&6
30645else
30646  if test -n "$PROPER_COMPILER_CXX"; then
30647  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30648else
30649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30650for as_dir in $PATH
30651do
30652  IFS=$as_save_IFS
30653  test -z "$as_dir" && as_dir=.
30654    for ac_exec_ext in '' $ac_executable_extensions; do
30655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30656    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30658    break 2
30659  fi
30660done
30661  done
30662IFS=$as_save_IFS
30663
30664fi
30665fi
30666PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30667if test -n "$PROPER_COMPILER_CXX"; then
30668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30669$as_echo "$PROPER_COMPILER_CXX" >&6; }
30670else
30671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30672$as_echo "no" >&6; }
30673fi
30674
30675
30676    test -n "$PROPER_COMPILER_CXX" && break
30677  done
30678fi
30679if test -z "$PROPER_COMPILER_CXX"; then
30680  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30681  for ac_prog in $TOOLCHAIN_CXX_BINARY
30682do
30683  # Extract the first word of "$ac_prog", so it can be a program name with args.
30684set dummy $ac_prog; ac_word=$2
30685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30686$as_echo_n "checking for $ac_word... " >&6; }
30687if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30688  $as_echo_n "(cached) " >&6
30689else
30690  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30691  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30692else
30693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30694for as_dir in $PATH
30695do
30696  IFS=$as_save_IFS
30697  test -z "$as_dir" && as_dir=.
30698    for ac_exec_ext in '' $ac_executable_extensions; do
30699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30700    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30702    break 2
30703  fi
30704done
30705  done
30706IFS=$as_save_IFS
30707
30708fi
30709fi
30710ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30711if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30713$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30714else
30715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30716$as_echo "no" >&6; }
30717fi
30718
30719
30720  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30721done
30722
30723  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30724    PROPER_COMPILER_CXX=""
30725  else
30726    case $cross_compiling:$ac_tool_warned in
30727yes:)
30728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30730ac_tool_warned=yes ;;
30731esac
30732    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30733  fi
30734fi
30735
30736
30737  # Only process if variable expands to non-empty
30738
30739  if test "x$PROPER_COMPILER_CXX" != x; then
30740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30741
30742  # First separate the path from the arguments. This will split at the first
30743  # space.
30744  complete="$PROPER_COMPILER_CXX"
30745  path="${complete%% *}"
30746  tmp="$complete EOL"
30747  arguments="${tmp#* }"
30748
30749  # Input might be given as Windows format, start by converting to
30750  # unix format.
30751  new_path=`$CYGPATH -u "$path"`
30752
30753  # Now try to locate executable using which
30754  new_path=`$WHICH "$new_path" 2> /dev/null`
30755  # bat and cmd files are not always considered executable in cygwin causing which
30756  # to not find them
30757  if test "x$new_path" = x \
30758      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30759      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30760    new_path=`$CYGPATH -u "$path"`
30761  fi
30762  if test "x$new_path" = x; then
30763    # Oops. Which didn't find the executable.
30764    # The splitting of arguments from the executable at a space might have been incorrect,
30765    # since paths with space are more likely in Windows. Give it another try with the whole
30766    # argument.
30767    path="$complete"
30768    arguments="EOL"
30769    new_path=`$CYGPATH -u "$path"`
30770    new_path=`$WHICH "$new_path" 2> /dev/null`
30771    # bat and cmd files are not always considered executable in cygwin causing which
30772    # to not find them
30773    if test "x$new_path" = x \
30774        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30775        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30776      new_path=`$CYGPATH -u "$path"`
30777    fi
30778    if test "x$new_path" = x; then
30779      # It's still not found. Now this is an unrecoverable error.
30780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30781$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30782      has_space=`$ECHO "$complete" | $GREP " "`
30783      if test "x$has_space" != x; then
30784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30786      fi
30787      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30788    fi
30789  fi
30790
30791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30794  # "foo.exe" is OK but "foo" is an error.
30795  #
30796  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30797  # It is also a way to make sure we got the proper file name for the real test later on.
30798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30799  if test "x$test_shortpath" = x; then
30800    # Short path failed, file does not exist as specified.
30801    # Try adding .exe or .cmd
30802    if test -f "${new_path}.exe"; then
30803      input_to_shortpath="${new_path}.exe"
30804    elif test -f "${new_path}.cmd"; then
30805      input_to_shortpath="${new_path}.cmd"
30806    else
30807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30808$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30809      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30810$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30811      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30812    fi
30813  else
30814    input_to_shortpath="$new_path"
30815  fi
30816
30817  # Call helper function which possibly converts this using DOS-style short mode.
30818  # If so, the updated path is stored in $new_path.
30819  new_path="$input_to_shortpath"
30820
30821  input_path="$input_to_shortpath"
30822  # Check if we need to convert this using DOS-style short mode. If the path
30823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30824  # take no chances and rewrite it.
30825  # Note: m4 eats our [], so we need to use [ and ] instead.
30826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30827  if test "x$has_forbidden_chars" != x; then
30828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30832      # Going to short mode and back again did indeed matter. Since short mode is
30833      # case insensitive, let's make it lowercase to improve readability.
30834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30835      # Now convert it back to Unix-style (cygpath)
30836      input_path=`$CYGPATH -u "$shortmode_path"`
30837      new_path="$input_path"
30838    fi
30839  fi
30840
30841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30842  if test "x$test_cygdrive_prefix" = x; then
30843    # As a simple fix, exclude /usr/bin since it's not a real path.
30844    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30846      # a path prefixed by /cygdrive for fixpath to work.
30847      new_path="$CYGWIN_ROOT_PATH$input_path"
30848    fi
30849  fi
30850
30851  # remove trailing .exe if any
30852  new_path="${new_path/%.exe/}"
30853
30854    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30855
30856  # First separate the path from the arguments. This will split at the first
30857  # space.
30858  complete="$PROPER_COMPILER_CXX"
30859  path="${complete%% *}"
30860  tmp="$complete EOL"
30861  arguments="${tmp#* }"
30862
30863  # Input might be given as Windows format, start by converting to
30864  # unix format.
30865  new_path="$path"
30866
30867  windows_path="$new_path"
30868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30869    unix_path=`$CYGPATH -u "$windows_path"`
30870    new_path="$unix_path"
30871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30873    new_path="$unix_path"
30874  fi
30875
30876
30877  # Now try to locate executable using which
30878  new_path=`$WHICH "$new_path" 2> /dev/null`
30879
30880  if test "x$new_path" = x; then
30881    # Oops. Which didn't find the executable.
30882    # The splitting of arguments from the executable at a space might have been incorrect,
30883    # since paths with space are more likely in Windows. Give it another try with the whole
30884    # argument.
30885    path="$complete"
30886    arguments="EOL"
30887    new_path="$path"
30888
30889  windows_path="$new_path"
30890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30891    unix_path=`$CYGPATH -u "$windows_path"`
30892    new_path="$unix_path"
30893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30895    new_path="$unix_path"
30896  fi
30897
30898
30899    new_path=`$WHICH "$new_path" 2> /dev/null`
30900    # bat and cmd files are not always considered executable in MSYS causing which
30901    # to not find them
30902    if test "x$new_path" = x \
30903        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30904        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30905      new_path="$path"
30906
30907  windows_path="$new_path"
30908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30909    unix_path=`$CYGPATH -u "$windows_path"`
30910    new_path="$unix_path"
30911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30913    new_path="$unix_path"
30914  fi
30915
30916    fi
30917
30918    if test "x$new_path" = x; then
30919      # It's still not found. Now this is an unrecoverable error.
30920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30921$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30922      has_space=`$ECHO "$complete" | $GREP " "`
30923      if test "x$has_space" != x; then
30924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30926      fi
30927      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30928    fi
30929  fi
30930
30931  # Now new_path has a complete unix path to the binary
30932  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30933    # Keep paths in /bin as-is, but remove trailing .exe if any
30934    new_path="${new_path/%.exe/}"
30935    # Do not save /bin paths to all_fixpath_prefixes!
30936  else
30937    # Not in mixed or Windows style, start by that.
30938    new_path=`cmd //c echo $new_path`
30939
30940  input_path="$new_path"
30941  # Check if we need to convert this using DOS-style short mode. If the path
30942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30943  # take no chances and rewrite it.
30944  # Note: m4 eats our [], so we need to use [ and ] instead.
30945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30946  if test "x$has_forbidden_chars" != x; then
30947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30948    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30949  fi
30950
30951    # Output is in $new_path
30952
30953  windows_path="$new_path"
30954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30955    unix_path=`$CYGPATH -u "$windows_path"`
30956    new_path="$unix_path"
30957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30959    new_path="$unix_path"
30960  fi
30961
30962    # remove trailing .exe if any
30963    new_path="${new_path/%.exe/}"
30964
30965    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30966    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30967  fi
30968
30969    else
30970      # We're on a unix platform. Hooray! :)
30971      # First separate the path from the arguments. This will split at the first
30972      # space.
30973      complete="$PROPER_COMPILER_CXX"
30974      path="${complete%% *}"
30975      tmp="$complete EOL"
30976      arguments="${tmp#* }"
30977
30978      # Cannot rely on the command "which" here since it doesn't always work.
30979      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30980      if test -z "$is_absolute_path"; then
30981        # Path to executable is not absolute. Find it.
30982        IFS_save="$IFS"
30983        IFS=:
30984        for p in $PATH; do
30985          if test -f "$p/$path" && test -x "$p/$path"; then
30986            new_path="$p/$path"
30987            break
30988          fi
30989        done
30990        IFS="$IFS_save"
30991      else
30992        # This is an absolute path, we can use it without further modifications.
30993        new_path="$path"
30994      fi
30995
30996      if test "x$new_path" = x; then
30997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30998$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30999        has_space=`$ECHO "$complete" | $GREP " "`
31000        if test "x$has_space" != x; then
31001          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31002$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31003        fi
31004        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31005      fi
31006    fi
31007
31008    # Now join together the path and the arguments once again
31009    if test "x$arguments" != xEOL; then
31010      new_complete="$new_path ${arguments% *}"
31011    else
31012      new_complete="$new_path"
31013    fi
31014
31015    if test "x$complete" != "x$new_complete"; then
31016      PROPER_COMPILER_CXX="$new_complete"
31017      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31018$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31019    fi
31020  fi
31021
31022    PATH="$RETRY_COMPILER_SAVED_PATH"
31023
31024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31025$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31026
31027  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31028    # Follow a chain of symbolic links. Use readlink
31029    # where it exists, else fall back to horribly
31030    # complicated shell code.
31031    if test "x$READLINK_TESTED" != yes; then
31032      # On MacOSX there is a readlink tool with a different
31033      # purpose than the GNU readlink tool. Check the found readlink.
31034      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31035      if test "x$ISGNU" = x; then
31036        # A readlink that we do not know how to use.
31037        # Are there other non-GNU readlinks out there?
31038        READLINK_TESTED=yes
31039        READLINK=
31040      fi
31041    fi
31042
31043    if test "x$READLINK" != x; then
31044      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31045    else
31046      # Save the current directory for restoring afterwards
31047      STARTDIR=$PWD
31048      COUNTER=0
31049      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31050      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31051      cd $sym_link_dir
31052      # Use -P flag to resolve symlinks in directories.
31053      cd `$THEPWDCMD -P`
31054      sym_link_dir=`$THEPWDCMD -P`
31055      # Resolve file symlinks
31056      while test $COUNTER -lt 20; do
31057        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31058        if test "x$ISLINK" == x; then
31059          # This is not a symbolic link! We are done!
31060          break
31061        fi
31062        # Again resolve directory symlinks since the target of the just found
31063        # link could be in a different directory
31064        cd `$DIRNAME $ISLINK`
31065        sym_link_dir=`$THEPWDCMD -P`
31066        sym_link_file=`$BASENAME $ISLINK`
31067        let COUNTER=COUNTER+1
31068      done
31069      cd $STARTDIR
31070      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31071    fi
31072  fi
31073
31074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31075$as_echo "$PROPER_COMPILER_CXX" >&6; }
31076    CXX="$PROPER_COMPILER_CXX"
31077  else
31078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31079$as_echo "no, keeping CXX" >&6; }
31080  fi
31081
31082
31083  COMPILER=$CXX
31084  COMPILER_NAME=$COMPILER_NAME
31085
31086  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31087    # cc -V output typically looks like
31088    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31089    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31090    # Check that this is likely to be the Solaris Studio cc.
31091    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31092    if test $? -ne 0; then
31093      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31094      { $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
31095$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31096      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31097$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31099$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31100      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31101    fi
31102    # Remove usage instructions (if present), and
31103    # collapse compiler output into a single line
31104    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31105        $SED -e 's/ *[Uu]sage:.*//'`
31106    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31107        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31108  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31109    # xlc -qversion output typically looks like
31110    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31111    #     Version: 11.01.0000.0015
31112    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31113    # Check that this is likely to be the IBM XL C compiler.
31114    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31115    if test $? -ne 0; then
31116      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31117      { $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
31118$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31119      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31120$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31122$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31123      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31124    fi
31125    # Collapse compiler output into a single line
31126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31127    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31128        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31129  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31130    # There is no specific version flag, but all output starts with a version string.
31131    # First line typically looks something like:
31132    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31133    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31134    # Check that this is likely to be Microsoft CL.EXE.
31135    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31136    if test $? -ne 0; then
31137      { $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
31138$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31139      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31140$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31141      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31142    fi
31143    # Collapse compiler output into a single line
31144    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31145    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31146        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31147  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31148    # gcc --version output typically looks like
31149    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31150    #     Copyright (C) 2013 Free Software Foundation, Inc.
31151    #     This is free software; see the source for copying conditions.  There is NO
31152    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31153    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31154    # Check that this is likely to be GCC.
31155    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31156    if test $? -ne 0; then
31157      { $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
31158$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31159      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31160$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31161      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31162    fi
31163    # Remove Copyright and legalese from version string, and
31164    # collapse into a single line
31165    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31166        $SED -e 's/ *Copyright .*//'`
31167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31168        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31169  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31170    # clang --version output typically looks like
31171    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31172    #    clang version 3.3 (tags/RELEASE_33/final)
31173    # or
31174    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31175    #    Target: x86_64-pc-linux-gnu
31176    #    Thread model: posix
31177    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31178    # Check that this is likely to be clang
31179    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31180    if test $? -ne 0; then
31181      { $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
31182$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31183      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31184$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31185      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31186    fi
31187    # Collapse compiler output into a single line
31188    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31189    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31190        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31191  else
31192      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31193  fi
31194  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31195  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31196  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31197  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31198
31199  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31200$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31201
31202
31203  # Now that we have resolved CXX ourself, let autoconf have its go at it
31204  ac_ext=cpp
31205ac_cpp='$CXXCPP $CPPFLAGS'
31206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31209if test -z "$CXX"; then
31210  if test -n "$CCC"; then
31211    CXX=$CCC
31212  else
31213    if test -n "$ac_tool_prefix"; then
31214  for ac_prog in $CXX
31215  do
31216    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31217set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31219$as_echo_n "checking for $ac_word... " >&6; }
31220if ${ac_cv_prog_CXX+:} false; then :
31221  $as_echo_n "(cached) " >&6
31222else
31223  if test -n "$CXX"; then
31224  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31225else
31226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31227for as_dir in $PATH
31228do
31229  IFS=$as_save_IFS
31230  test -z "$as_dir" && as_dir=.
31231    for ac_exec_ext in '' $ac_executable_extensions; do
31232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31233    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31235    break 2
31236  fi
31237done
31238  done
31239IFS=$as_save_IFS
31240
31241fi
31242fi
31243CXX=$ac_cv_prog_CXX
31244if test -n "$CXX"; then
31245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31246$as_echo "$CXX" >&6; }
31247else
31248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31249$as_echo "no" >&6; }
31250fi
31251
31252
31253    test -n "$CXX" && break
31254  done
31255fi
31256if test -z "$CXX"; then
31257  ac_ct_CXX=$CXX
31258  for ac_prog in $CXX
31259do
31260  # Extract the first word of "$ac_prog", so it can be a program name with args.
31261set dummy $ac_prog; ac_word=$2
31262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31263$as_echo_n "checking for $ac_word... " >&6; }
31264if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31265  $as_echo_n "(cached) " >&6
31266else
31267  if test -n "$ac_ct_CXX"; then
31268  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31269else
31270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31271for as_dir in $PATH
31272do
31273  IFS=$as_save_IFS
31274  test -z "$as_dir" && as_dir=.
31275    for ac_exec_ext in '' $ac_executable_extensions; do
31276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31277    ac_cv_prog_ac_ct_CXX="$ac_prog"
31278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31279    break 2
31280  fi
31281done
31282  done
31283IFS=$as_save_IFS
31284
31285fi
31286fi
31287ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31288if test -n "$ac_ct_CXX"; then
31289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31290$as_echo "$ac_ct_CXX" >&6; }
31291else
31292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31293$as_echo "no" >&6; }
31294fi
31295
31296
31297  test -n "$ac_ct_CXX" && break
31298done
31299
31300  if test "x$ac_ct_CXX" = x; then
31301    CXX="g++"
31302  else
31303    case $cross_compiling:$ac_tool_warned in
31304yes:)
31305{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31306$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31307ac_tool_warned=yes ;;
31308esac
31309    CXX=$ac_ct_CXX
31310  fi
31311fi
31312
31313  fi
31314fi
31315# Provide some information about the compiler.
31316$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31317set X $ac_compile
31318ac_compiler=$2
31319for ac_option in --version -v -V -qversion; do
31320  { { ac_try="$ac_compiler $ac_option >&5"
31321case "(($ac_try" in
31322  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31323  *) ac_try_echo=$ac_try;;
31324esac
31325eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31326$as_echo "$ac_try_echo"; } >&5
31327  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31328  ac_status=$?
31329  if test -s conftest.err; then
31330    sed '10a\
31331... rest of stderr output deleted ...
31332         10q' conftest.err >conftest.er1
31333    cat conftest.er1 >&5
31334  fi
31335  rm -f conftest.er1 conftest.err
31336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31337  test $ac_status = 0; }
31338done
31339
31340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31341$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31342if ${ac_cv_cxx_compiler_gnu+:} false; then :
31343  $as_echo_n "(cached) " >&6
31344else
31345  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31346/* end confdefs.h.  */
31347
31348int
31349main ()
31350{
31351#ifndef __GNUC__
31352       choke me
31353#endif
31354
31355  ;
31356  return 0;
31357}
31358_ACEOF
31359if ac_fn_cxx_try_compile "$LINENO"; then :
31360  ac_compiler_gnu=yes
31361else
31362  ac_compiler_gnu=no
31363fi
31364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31365ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31366
31367fi
31368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31369$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31370if test $ac_compiler_gnu = yes; then
31371  GXX=yes
31372else
31373  GXX=
31374fi
31375ac_test_CXXFLAGS=${CXXFLAGS+set}
31376ac_save_CXXFLAGS=$CXXFLAGS
31377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31378$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31379if ${ac_cv_prog_cxx_g+:} false; then :
31380  $as_echo_n "(cached) " >&6
31381else
31382  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31383   ac_cxx_werror_flag=yes
31384   ac_cv_prog_cxx_g=no
31385   CXXFLAGS="-g"
31386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31387/* end confdefs.h.  */
31388
31389int
31390main ()
31391{
31392
31393  ;
31394  return 0;
31395}
31396_ACEOF
31397if ac_fn_cxx_try_compile "$LINENO"; then :
31398  ac_cv_prog_cxx_g=yes
31399else
31400  CXXFLAGS=""
31401      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31402/* end confdefs.h.  */
31403
31404int
31405main ()
31406{
31407
31408  ;
31409  return 0;
31410}
31411_ACEOF
31412if ac_fn_cxx_try_compile "$LINENO"; then :
31413
31414else
31415  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31416	 CXXFLAGS="-g"
31417	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31418/* end confdefs.h.  */
31419
31420int
31421main ()
31422{
31423
31424  ;
31425  return 0;
31426}
31427_ACEOF
31428if ac_fn_cxx_try_compile "$LINENO"; then :
31429  ac_cv_prog_cxx_g=yes
31430fi
31431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31432fi
31433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31434fi
31435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31436   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31437fi
31438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31439$as_echo "$ac_cv_prog_cxx_g" >&6; }
31440if test "$ac_test_CXXFLAGS" = set; then
31441  CXXFLAGS=$ac_save_CXXFLAGS
31442elif test $ac_cv_prog_cxx_g = yes; then
31443  if test "$GXX" = yes; then
31444    CXXFLAGS="-g -O2"
31445  else
31446    CXXFLAGS="-g"
31447  fi
31448else
31449  if test "$GXX" = yes; then
31450    CXXFLAGS="-O2"
31451  else
31452    CXXFLAGS=
31453  fi
31454fi
31455ac_ext=cpp
31456ac_cpp='$CXXCPP $CPPFLAGS'
31457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31460
31461
31462  #
31463  # Setup the preprocessor (CPP and CXXCPP)
31464  #
31465  ac_ext=c
31466ac_cpp='$CPP $CPPFLAGS'
31467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31469ac_compiler_gnu=$ac_cv_c_compiler_gnu
31470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31471$as_echo_n "checking how to run the C preprocessor... " >&6; }
31472# On Suns, sometimes $CPP names a directory.
31473if test -n "$CPP" && test -d "$CPP"; then
31474  CPP=
31475fi
31476if test -z "$CPP"; then
31477  if ${ac_cv_prog_CPP+:} false; then :
31478  $as_echo_n "(cached) " >&6
31479else
31480      # Double quotes because CPP needs to be expanded
31481    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31482    do
31483      ac_preproc_ok=false
31484for ac_c_preproc_warn_flag in '' yes
31485do
31486  # Use a header file that comes with gcc, so configuring glibc
31487  # with a fresh cross-compiler works.
31488  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31489  # <limits.h> exists even on freestanding compilers.
31490  # On the NeXT, cc -E runs the code through the compiler's parser,
31491  # not just through cpp. "Syntax error" is here to catch this case.
31492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31493/* end confdefs.h.  */
31494#ifdef __STDC__
31495# include <limits.h>
31496#else
31497# include <assert.h>
31498#endif
31499		     Syntax error
31500_ACEOF
31501if ac_fn_c_try_cpp "$LINENO"; then :
31502
31503else
31504  # Broken: fails on valid input.
31505continue
31506fi
31507rm -f conftest.err conftest.i conftest.$ac_ext
31508
31509  # OK, works on sane cases.  Now check whether nonexistent headers
31510  # can be detected and how.
31511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31512/* end confdefs.h.  */
31513#include <ac_nonexistent.h>
31514_ACEOF
31515if ac_fn_c_try_cpp "$LINENO"; then :
31516  # Broken: success on invalid input.
31517continue
31518else
31519  # Passes both tests.
31520ac_preproc_ok=:
31521break
31522fi
31523rm -f conftest.err conftest.i conftest.$ac_ext
31524
31525done
31526# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31527rm -f conftest.i conftest.err conftest.$ac_ext
31528if $ac_preproc_ok; then :
31529  break
31530fi
31531
31532    done
31533    ac_cv_prog_CPP=$CPP
31534
31535fi
31536  CPP=$ac_cv_prog_CPP
31537else
31538  ac_cv_prog_CPP=$CPP
31539fi
31540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31541$as_echo "$CPP" >&6; }
31542ac_preproc_ok=false
31543for ac_c_preproc_warn_flag in '' yes
31544do
31545  # Use a header file that comes with gcc, so configuring glibc
31546  # with a fresh cross-compiler works.
31547  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31548  # <limits.h> exists even on freestanding compilers.
31549  # On the NeXT, cc -E runs the code through the compiler's parser,
31550  # not just through cpp. "Syntax error" is here to catch this case.
31551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31552/* end confdefs.h.  */
31553#ifdef __STDC__
31554# include <limits.h>
31555#else
31556# include <assert.h>
31557#endif
31558		     Syntax error
31559_ACEOF
31560if ac_fn_c_try_cpp "$LINENO"; then :
31561
31562else
31563  # Broken: fails on valid input.
31564continue
31565fi
31566rm -f conftest.err conftest.i conftest.$ac_ext
31567
31568  # OK, works on sane cases.  Now check whether nonexistent headers
31569  # can be detected and how.
31570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31571/* end confdefs.h.  */
31572#include <ac_nonexistent.h>
31573_ACEOF
31574if ac_fn_c_try_cpp "$LINENO"; then :
31575  # Broken: success on invalid input.
31576continue
31577else
31578  # Passes both tests.
31579ac_preproc_ok=:
31580break
31581fi
31582rm -f conftest.err conftest.i conftest.$ac_ext
31583
31584done
31585# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31586rm -f conftest.i conftest.err conftest.$ac_ext
31587if $ac_preproc_ok; then :
31588
31589else
31590  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31592as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31593See \`config.log' for more details" "$LINENO" 5; }
31594fi
31595
31596ac_ext=cpp
31597ac_cpp='$CXXCPP $CPPFLAGS'
31598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31601
31602
31603  # Only process if variable expands to non-empty
31604
31605  if test "x$CPP" != x; then
31606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31607
31608  # First separate the path from the arguments. This will split at the first
31609  # space.
31610  complete="$CPP"
31611  path="${complete%% *}"
31612  tmp="$complete EOL"
31613  arguments="${tmp#* }"
31614
31615  # Input might be given as Windows format, start by converting to
31616  # unix format.
31617  new_path=`$CYGPATH -u "$path"`
31618
31619  # Now try to locate executable using which
31620  new_path=`$WHICH "$new_path" 2> /dev/null`
31621  # bat and cmd files are not always considered executable in cygwin causing which
31622  # to not find them
31623  if test "x$new_path" = x \
31624      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31625      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31626    new_path=`$CYGPATH -u "$path"`
31627  fi
31628  if test "x$new_path" = x; then
31629    # Oops. Which didn't find the executable.
31630    # The splitting of arguments from the executable at a space might have been incorrect,
31631    # since paths with space are more likely in Windows. Give it another try with the whole
31632    # argument.
31633    path="$complete"
31634    arguments="EOL"
31635    new_path=`$CYGPATH -u "$path"`
31636    new_path=`$WHICH "$new_path" 2> /dev/null`
31637    # bat and cmd files are not always considered executable in cygwin causing which
31638    # to not find them
31639    if test "x$new_path" = x \
31640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31642      new_path=`$CYGPATH -u "$path"`
31643    fi
31644    if test "x$new_path" = x; then
31645      # It's still not found. Now this is an unrecoverable error.
31646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31647$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31648      has_space=`$ECHO "$complete" | $GREP " "`
31649      if test "x$has_space" != x; then
31650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31652      fi
31653      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31654    fi
31655  fi
31656
31657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31660  # "foo.exe" is OK but "foo" is an error.
31661  #
31662  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31663  # It is also a way to make sure we got the proper file name for the real test later on.
31664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31665  if test "x$test_shortpath" = x; then
31666    # Short path failed, file does not exist as specified.
31667    # Try adding .exe or .cmd
31668    if test -f "${new_path}.exe"; then
31669      input_to_shortpath="${new_path}.exe"
31670    elif test -f "${new_path}.cmd"; then
31671      input_to_shortpath="${new_path}.cmd"
31672    else
31673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31674$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31675      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31676$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31677      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31678    fi
31679  else
31680    input_to_shortpath="$new_path"
31681  fi
31682
31683  # Call helper function which possibly converts this using DOS-style short mode.
31684  # If so, the updated path is stored in $new_path.
31685  new_path="$input_to_shortpath"
31686
31687  input_path="$input_to_shortpath"
31688  # Check if we need to convert this using DOS-style short mode. If the path
31689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31690  # take no chances and rewrite it.
31691  # Note: m4 eats our [], so we need to use [ and ] instead.
31692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31693  if test "x$has_forbidden_chars" != x; then
31694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31698      # Going to short mode and back again did indeed matter. Since short mode is
31699      # case insensitive, let's make it lowercase to improve readability.
31700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31701      # Now convert it back to Unix-style (cygpath)
31702      input_path=`$CYGPATH -u "$shortmode_path"`
31703      new_path="$input_path"
31704    fi
31705  fi
31706
31707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31708  if test "x$test_cygdrive_prefix" = x; then
31709    # As a simple fix, exclude /usr/bin since it's not a real path.
31710    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31712      # a path prefixed by /cygdrive for fixpath to work.
31713      new_path="$CYGWIN_ROOT_PATH$input_path"
31714    fi
31715  fi
31716
31717  # remove trailing .exe if any
31718  new_path="${new_path/%.exe/}"
31719
31720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31721
31722  # First separate the path from the arguments. This will split at the first
31723  # space.
31724  complete="$CPP"
31725  path="${complete%% *}"
31726  tmp="$complete EOL"
31727  arguments="${tmp#* }"
31728
31729  # Input might be given as Windows format, start by converting to
31730  # unix format.
31731  new_path="$path"
31732
31733  windows_path="$new_path"
31734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31735    unix_path=`$CYGPATH -u "$windows_path"`
31736    new_path="$unix_path"
31737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31739    new_path="$unix_path"
31740  fi
31741
31742
31743  # Now try to locate executable using which
31744  new_path=`$WHICH "$new_path" 2> /dev/null`
31745
31746  if test "x$new_path" = x; then
31747    # Oops. Which didn't find the executable.
31748    # The splitting of arguments from the executable at a space might have been incorrect,
31749    # since paths with space are more likely in Windows. Give it another try with the whole
31750    # argument.
31751    path="$complete"
31752    arguments="EOL"
31753    new_path="$path"
31754
31755  windows_path="$new_path"
31756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31757    unix_path=`$CYGPATH -u "$windows_path"`
31758    new_path="$unix_path"
31759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31761    new_path="$unix_path"
31762  fi
31763
31764
31765    new_path=`$WHICH "$new_path" 2> /dev/null`
31766    # bat and cmd files are not always considered executable in MSYS causing which
31767    # to not find them
31768    if test "x$new_path" = x \
31769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31771      new_path="$path"
31772
31773  windows_path="$new_path"
31774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31775    unix_path=`$CYGPATH -u "$windows_path"`
31776    new_path="$unix_path"
31777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31779    new_path="$unix_path"
31780  fi
31781
31782    fi
31783
31784    if test "x$new_path" = x; then
31785      # It's still not found. Now this is an unrecoverable error.
31786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31787$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31788      has_space=`$ECHO "$complete" | $GREP " "`
31789      if test "x$has_space" != x; then
31790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31792      fi
31793      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31794    fi
31795  fi
31796
31797  # Now new_path has a complete unix path to the binary
31798  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31799    # Keep paths in /bin as-is, but remove trailing .exe if any
31800    new_path="${new_path/%.exe/}"
31801    # Do not save /bin paths to all_fixpath_prefixes!
31802  else
31803    # Not in mixed or Windows style, start by that.
31804    new_path=`cmd //c echo $new_path`
31805
31806  input_path="$new_path"
31807  # Check if we need to convert this using DOS-style short mode. If the path
31808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31809  # take no chances and rewrite it.
31810  # Note: m4 eats our [], so we need to use [ and ] instead.
31811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31812  if test "x$has_forbidden_chars" != x; then
31813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31815  fi
31816
31817    # Output is in $new_path
31818
31819  windows_path="$new_path"
31820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31821    unix_path=`$CYGPATH -u "$windows_path"`
31822    new_path="$unix_path"
31823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31825    new_path="$unix_path"
31826  fi
31827
31828    # remove trailing .exe if any
31829    new_path="${new_path/%.exe/}"
31830
31831    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31832    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31833  fi
31834
31835    else
31836      # We're on a unix platform. Hooray! :)
31837      # First separate the path from the arguments. This will split at the first
31838      # space.
31839      complete="$CPP"
31840      path="${complete%% *}"
31841      tmp="$complete EOL"
31842      arguments="${tmp#* }"
31843
31844      # Cannot rely on the command "which" here since it doesn't always work.
31845      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31846      if test -z "$is_absolute_path"; then
31847        # Path to executable is not absolute. Find it.
31848        IFS_save="$IFS"
31849        IFS=:
31850        for p in $PATH; do
31851          if test -f "$p/$path" && test -x "$p/$path"; then
31852            new_path="$p/$path"
31853            break
31854          fi
31855        done
31856        IFS="$IFS_save"
31857      else
31858        # This is an absolute path, we can use it without further modifications.
31859        new_path="$path"
31860      fi
31861
31862      if test "x$new_path" = x; then
31863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31864$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31865        has_space=`$ECHO "$complete" | $GREP " "`
31866        if test "x$has_space" != x; then
31867          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31869        fi
31870        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31871      fi
31872    fi
31873
31874    # Now join together the path and the arguments once again
31875    if test "x$arguments" != xEOL; then
31876      new_complete="$new_path ${arguments% *}"
31877    else
31878      new_complete="$new_path"
31879    fi
31880
31881    if test "x$complete" != "x$new_complete"; then
31882      CPP="$new_complete"
31883      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31884$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31885    fi
31886  fi
31887
31888  ac_ext=cpp
31889ac_cpp='$CXXCPP $CPPFLAGS'
31890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31894$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31895if test -z "$CXXCPP"; then
31896  if ${ac_cv_prog_CXXCPP+:} false; then :
31897  $as_echo_n "(cached) " >&6
31898else
31899      # Double quotes because CXXCPP needs to be expanded
31900    for CXXCPP in "$CXX -E" "/lib/cpp"
31901    do
31902      ac_preproc_ok=false
31903for ac_cxx_preproc_warn_flag in '' yes
31904do
31905  # Use a header file that comes with gcc, so configuring glibc
31906  # with a fresh cross-compiler works.
31907  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31908  # <limits.h> exists even on freestanding compilers.
31909  # On the NeXT, cc -E runs the code through the compiler's parser,
31910  # not just through cpp. "Syntax error" is here to catch this case.
31911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31912/* end confdefs.h.  */
31913#ifdef __STDC__
31914# include <limits.h>
31915#else
31916# include <assert.h>
31917#endif
31918		     Syntax error
31919_ACEOF
31920if ac_fn_cxx_try_cpp "$LINENO"; then :
31921
31922else
31923  # Broken: fails on valid input.
31924continue
31925fi
31926rm -f conftest.err conftest.i conftest.$ac_ext
31927
31928  # OK, works on sane cases.  Now check whether nonexistent headers
31929  # can be detected and how.
31930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31931/* end confdefs.h.  */
31932#include <ac_nonexistent.h>
31933_ACEOF
31934if ac_fn_cxx_try_cpp "$LINENO"; then :
31935  # Broken: success on invalid input.
31936continue
31937else
31938  # Passes both tests.
31939ac_preproc_ok=:
31940break
31941fi
31942rm -f conftest.err conftest.i conftest.$ac_ext
31943
31944done
31945# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31946rm -f conftest.i conftest.err conftest.$ac_ext
31947if $ac_preproc_ok; then :
31948  break
31949fi
31950
31951    done
31952    ac_cv_prog_CXXCPP=$CXXCPP
31953
31954fi
31955  CXXCPP=$ac_cv_prog_CXXCPP
31956else
31957  ac_cv_prog_CXXCPP=$CXXCPP
31958fi
31959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31960$as_echo "$CXXCPP" >&6; }
31961ac_preproc_ok=false
31962for ac_cxx_preproc_warn_flag in '' yes
31963do
31964  # Use a header file that comes with gcc, so configuring glibc
31965  # with a fresh cross-compiler works.
31966  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31967  # <limits.h> exists even on freestanding compilers.
31968  # On the NeXT, cc -E runs the code through the compiler's parser,
31969  # not just through cpp. "Syntax error" is here to catch this case.
31970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31971/* end confdefs.h.  */
31972#ifdef __STDC__
31973# include <limits.h>
31974#else
31975# include <assert.h>
31976#endif
31977		     Syntax error
31978_ACEOF
31979if ac_fn_cxx_try_cpp "$LINENO"; then :
31980
31981else
31982  # Broken: fails on valid input.
31983continue
31984fi
31985rm -f conftest.err conftest.i conftest.$ac_ext
31986
31987  # OK, works on sane cases.  Now check whether nonexistent headers
31988  # can be detected and how.
31989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31990/* end confdefs.h.  */
31991#include <ac_nonexistent.h>
31992_ACEOF
31993if ac_fn_cxx_try_cpp "$LINENO"; then :
31994  # Broken: success on invalid input.
31995continue
31996else
31997  # Passes both tests.
31998ac_preproc_ok=:
31999break
32000fi
32001rm -f conftest.err conftest.i conftest.$ac_ext
32002
32003done
32004# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
32005rm -f conftest.i conftest.err conftest.$ac_ext
32006if $ac_preproc_ok; then :
32007
32008else
32009  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32011as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32012See \`config.log' for more details" "$LINENO" 5; }
32013fi
32014
32015ac_ext=cpp
32016ac_cpp='$CXXCPP $CPPFLAGS'
32017ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32018ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32019ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32020
32021
32022  # Only process if variable expands to non-empty
32023
32024  if test "x$CXXCPP" != x; then
32025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32026
32027  # First separate the path from the arguments. This will split at the first
32028  # space.
32029  complete="$CXXCPP"
32030  path="${complete%% *}"
32031  tmp="$complete EOL"
32032  arguments="${tmp#* }"
32033
32034  # Input might be given as Windows format, start by converting to
32035  # unix format.
32036  new_path=`$CYGPATH -u "$path"`
32037
32038  # Now try to locate executable using which
32039  new_path=`$WHICH "$new_path" 2> /dev/null`
32040  # bat and cmd files are not always considered executable in cygwin causing which
32041  # to not find them
32042  if test "x$new_path" = x \
32043      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32044      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32045    new_path=`$CYGPATH -u "$path"`
32046  fi
32047  if test "x$new_path" = x; then
32048    # Oops. Which didn't find the executable.
32049    # The splitting of arguments from the executable at a space might have been incorrect,
32050    # since paths with space are more likely in Windows. Give it another try with the whole
32051    # argument.
32052    path="$complete"
32053    arguments="EOL"
32054    new_path=`$CYGPATH -u "$path"`
32055    new_path=`$WHICH "$new_path" 2> /dev/null`
32056    # bat and cmd files are not always considered executable in cygwin causing which
32057    # to not find them
32058    if test "x$new_path" = x \
32059        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32060        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32061      new_path=`$CYGPATH -u "$path"`
32062    fi
32063    if test "x$new_path" = x; then
32064      # It's still not found. Now this is an unrecoverable error.
32065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32066$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32067      has_space=`$ECHO "$complete" | $GREP " "`
32068      if test "x$has_space" != x; then
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32070$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32071      fi
32072      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32073    fi
32074  fi
32075
32076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32079  # "foo.exe" is OK but "foo" is an error.
32080  #
32081  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32082  # It is also a way to make sure we got the proper file name for the real test later on.
32083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32084  if test "x$test_shortpath" = x; then
32085    # Short path failed, file does not exist as specified.
32086    # Try adding .exe or .cmd
32087    if test -f "${new_path}.exe"; then
32088      input_to_shortpath="${new_path}.exe"
32089    elif test -f "${new_path}.cmd"; then
32090      input_to_shortpath="${new_path}.cmd"
32091    else
32092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32093$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32094      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32095$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32096      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32097    fi
32098  else
32099    input_to_shortpath="$new_path"
32100  fi
32101
32102  # Call helper function which possibly converts this using DOS-style short mode.
32103  # If so, the updated path is stored in $new_path.
32104  new_path="$input_to_shortpath"
32105
32106  input_path="$input_to_shortpath"
32107  # Check if we need to convert this using DOS-style short mode. If the path
32108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32109  # take no chances and rewrite it.
32110  # Note: m4 eats our [], so we need to use [ and ] instead.
32111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32112  if test "x$has_forbidden_chars" != x; then
32113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32117      # Going to short mode and back again did indeed matter. Since short mode is
32118      # case insensitive, let's make it lowercase to improve readability.
32119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32120      # Now convert it back to Unix-style (cygpath)
32121      input_path=`$CYGPATH -u "$shortmode_path"`
32122      new_path="$input_path"
32123    fi
32124  fi
32125
32126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32127  if test "x$test_cygdrive_prefix" = x; then
32128    # As a simple fix, exclude /usr/bin since it's not a real path.
32129    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32131      # a path prefixed by /cygdrive for fixpath to work.
32132      new_path="$CYGWIN_ROOT_PATH$input_path"
32133    fi
32134  fi
32135
32136  # remove trailing .exe if any
32137  new_path="${new_path/%.exe/}"
32138
32139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32140
32141  # First separate the path from the arguments. This will split at the first
32142  # space.
32143  complete="$CXXCPP"
32144  path="${complete%% *}"
32145  tmp="$complete EOL"
32146  arguments="${tmp#* }"
32147
32148  # Input might be given as Windows format, start by converting to
32149  # unix format.
32150  new_path="$path"
32151
32152  windows_path="$new_path"
32153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32154    unix_path=`$CYGPATH -u "$windows_path"`
32155    new_path="$unix_path"
32156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32158    new_path="$unix_path"
32159  fi
32160
32161
32162  # Now try to locate executable using which
32163  new_path=`$WHICH "$new_path" 2> /dev/null`
32164
32165  if test "x$new_path" = x; then
32166    # Oops. Which didn't find the executable.
32167    # The splitting of arguments from the executable at a space might have been incorrect,
32168    # since paths with space are more likely in Windows. Give it another try with the whole
32169    # argument.
32170    path="$complete"
32171    arguments="EOL"
32172    new_path="$path"
32173
32174  windows_path="$new_path"
32175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32176    unix_path=`$CYGPATH -u "$windows_path"`
32177    new_path="$unix_path"
32178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32180    new_path="$unix_path"
32181  fi
32182
32183
32184    new_path=`$WHICH "$new_path" 2> /dev/null`
32185    # bat and cmd files are not always considered executable in MSYS causing which
32186    # to not find them
32187    if test "x$new_path" = x \
32188        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32189        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32190      new_path="$path"
32191
32192  windows_path="$new_path"
32193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32194    unix_path=`$CYGPATH -u "$windows_path"`
32195    new_path="$unix_path"
32196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32198    new_path="$unix_path"
32199  fi
32200
32201    fi
32202
32203    if test "x$new_path" = x; then
32204      # It's still not found. Now this is an unrecoverable error.
32205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32206$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32207      has_space=`$ECHO "$complete" | $GREP " "`
32208      if test "x$has_space" != x; then
32209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32211      fi
32212      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32213    fi
32214  fi
32215
32216  # Now new_path has a complete unix path to the binary
32217  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32218    # Keep paths in /bin as-is, but remove trailing .exe if any
32219    new_path="${new_path/%.exe/}"
32220    # Do not save /bin paths to all_fixpath_prefixes!
32221  else
32222    # Not in mixed or Windows style, start by that.
32223    new_path=`cmd //c echo $new_path`
32224
32225  input_path="$new_path"
32226  # Check if we need to convert this using DOS-style short mode. If the path
32227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32228  # take no chances and rewrite it.
32229  # Note: m4 eats our [], so we need to use [ and ] instead.
32230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32231  if test "x$has_forbidden_chars" != x; then
32232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32234  fi
32235
32236    # Output is in $new_path
32237
32238  windows_path="$new_path"
32239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32240    unix_path=`$CYGPATH -u "$windows_path"`
32241    new_path="$unix_path"
32242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32244    new_path="$unix_path"
32245  fi
32246
32247    # remove trailing .exe if any
32248    new_path="${new_path/%.exe/}"
32249
32250    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32251    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32252  fi
32253
32254    else
32255      # We're on a unix platform. Hooray! :)
32256      # First separate the path from the arguments. This will split at the first
32257      # space.
32258      complete="$CXXCPP"
32259      path="${complete%% *}"
32260      tmp="$complete EOL"
32261      arguments="${tmp#* }"
32262
32263      # Cannot rely on the command "which" here since it doesn't always work.
32264      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32265      if test -z "$is_absolute_path"; then
32266        # Path to executable is not absolute. Find it.
32267        IFS_save="$IFS"
32268        IFS=:
32269        for p in $PATH; do
32270          if test -f "$p/$path" && test -x "$p/$path"; then
32271            new_path="$p/$path"
32272            break
32273          fi
32274        done
32275        IFS="$IFS_save"
32276      else
32277        # This is an absolute path, we can use it without further modifications.
32278        new_path="$path"
32279      fi
32280
32281      if test "x$new_path" = x; then
32282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32283$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32284        has_space=`$ECHO "$complete" | $GREP " "`
32285        if test "x$has_space" != x; then
32286          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32287$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32288        fi
32289        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32290      fi
32291    fi
32292
32293    # Now join together the path and the arguments once again
32294    if test "x$arguments" != xEOL; then
32295      new_complete="$new_path ${arguments% *}"
32296    else
32297      new_complete="$new_path"
32298    fi
32299
32300    if test "x$complete" != "x$new_complete"; then
32301      CXXCPP="$new_complete"
32302      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32303$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32304    fi
32305  fi
32306
32307
32308  #
32309  # Setup the linker (LD)
32310  #
32311  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32312    # In the Microsoft toolchain we have a separate LD command "link".
32313    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32314    # a cygwin program for something completely different.
32315    # Extract the first word of "link", so it can be a program name with args.
32316set dummy link; ac_word=$2
32317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32318$as_echo_n "checking for $ac_word... " >&6; }
32319if ${ac_cv_prog_LD+:} false; then :
32320  $as_echo_n "(cached) " >&6
32321else
32322  if test -n "$LD"; then
32323  ac_cv_prog_LD="$LD" # Let the user override the test.
32324else
32325  ac_prog_rejected=no
32326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32327for as_dir in $PATH
32328do
32329  IFS=$as_save_IFS
32330  test -z "$as_dir" && as_dir=.
32331    for ac_exec_ext in '' $ac_executable_extensions; do
32332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32333    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32334       ac_prog_rejected=yes
32335       continue
32336     fi
32337    ac_cv_prog_LD="link"
32338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32339    break 2
32340  fi
32341done
32342  done
32343IFS=$as_save_IFS
32344
32345if test $ac_prog_rejected = yes; then
32346  # We found a bogon in the path, so make sure we never use it.
32347  set dummy $ac_cv_prog_LD
32348  shift
32349  if test $# != 0; then
32350    # We chose a different compiler from the bogus one.
32351    # However, it has the same basename, so the bogon will be chosen
32352    # first if we set LD to just the basename; use the full file name.
32353    shift
32354    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32355  fi
32356fi
32357fi
32358fi
32359LD=$ac_cv_prog_LD
32360if test -n "$LD"; then
32361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32362$as_echo "$LD" >&6; }
32363else
32364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32365$as_echo "no" >&6; }
32366fi
32367
32368
32369
32370  # Only process if variable expands to non-empty
32371
32372  if test "x$LD" != x; then
32373    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32374
32375  # First separate the path from the arguments. This will split at the first
32376  # space.
32377  complete="$LD"
32378  path="${complete%% *}"
32379  tmp="$complete EOL"
32380  arguments="${tmp#* }"
32381
32382  # Input might be given as Windows format, start by converting to
32383  # unix format.
32384  new_path=`$CYGPATH -u "$path"`
32385
32386  # Now try to locate executable using which
32387  new_path=`$WHICH "$new_path" 2> /dev/null`
32388  # bat and cmd files are not always considered executable in cygwin causing which
32389  # to not find them
32390  if test "x$new_path" = x \
32391      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32392      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32393    new_path=`$CYGPATH -u "$path"`
32394  fi
32395  if test "x$new_path" = x; then
32396    # Oops. Which didn't find the executable.
32397    # The splitting of arguments from the executable at a space might have been incorrect,
32398    # since paths with space are more likely in Windows. Give it another try with the whole
32399    # argument.
32400    path="$complete"
32401    arguments="EOL"
32402    new_path=`$CYGPATH -u "$path"`
32403    new_path=`$WHICH "$new_path" 2> /dev/null`
32404    # bat and cmd files are not always considered executable in cygwin causing which
32405    # to not find them
32406    if test "x$new_path" = x \
32407        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32408        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32409      new_path=`$CYGPATH -u "$path"`
32410    fi
32411    if test "x$new_path" = x; then
32412      # It's still not found. Now this is an unrecoverable error.
32413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32414$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32415      has_space=`$ECHO "$complete" | $GREP " "`
32416      if test "x$has_space" != x; then
32417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32419      fi
32420      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32421    fi
32422  fi
32423
32424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32427  # "foo.exe" is OK but "foo" is an error.
32428  #
32429  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32430  # It is also a way to make sure we got the proper file name for the real test later on.
32431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32432  if test "x$test_shortpath" = x; then
32433    # Short path failed, file does not exist as specified.
32434    # Try adding .exe or .cmd
32435    if test -f "${new_path}.exe"; then
32436      input_to_shortpath="${new_path}.exe"
32437    elif test -f "${new_path}.cmd"; then
32438      input_to_shortpath="${new_path}.cmd"
32439    else
32440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32441$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32442      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32443$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32444      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32445    fi
32446  else
32447    input_to_shortpath="$new_path"
32448  fi
32449
32450  # Call helper function which possibly converts this using DOS-style short mode.
32451  # If so, the updated path is stored in $new_path.
32452  new_path="$input_to_shortpath"
32453
32454  input_path="$input_to_shortpath"
32455  # Check if we need to convert this using DOS-style short mode. If the path
32456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32457  # take no chances and rewrite it.
32458  # Note: m4 eats our [], so we need to use [ and ] instead.
32459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32460  if test "x$has_forbidden_chars" != x; then
32461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32465      # Going to short mode and back again did indeed matter. Since short mode is
32466      # case insensitive, let's make it lowercase to improve readability.
32467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32468      # Now convert it back to Unix-style (cygpath)
32469      input_path=`$CYGPATH -u "$shortmode_path"`
32470      new_path="$input_path"
32471    fi
32472  fi
32473
32474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32475  if test "x$test_cygdrive_prefix" = x; then
32476    # As a simple fix, exclude /usr/bin since it's not a real path.
32477    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32479      # a path prefixed by /cygdrive for fixpath to work.
32480      new_path="$CYGWIN_ROOT_PATH$input_path"
32481    fi
32482  fi
32483
32484  # remove trailing .exe if any
32485  new_path="${new_path/%.exe/}"
32486
32487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32488
32489  # First separate the path from the arguments. This will split at the first
32490  # space.
32491  complete="$LD"
32492  path="${complete%% *}"
32493  tmp="$complete EOL"
32494  arguments="${tmp#* }"
32495
32496  # Input might be given as Windows format, start by converting to
32497  # unix format.
32498  new_path="$path"
32499
32500  windows_path="$new_path"
32501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32502    unix_path=`$CYGPATH -u "$windows_path"`
32503    new_path="$unix_path"
32504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32506    new_path="$unix_path"
32507  fi
32508
32509
32510  # Now try to locate executable using which
32511  new_path=`$WHICH "$new_path" 2> /dev/null`
32512
32513  if test "x$new_path" = x; then
32514    # Oops. Which didn't find the executable.
32515    # The splitting of arguments from the executable at a space might have been incorrect,
32516    # since paths with space are more likely in Windows. Give it another try with the whole
32517    # argument.
32518    path="$complete"
32519    arguments="EOL"
32520    new_path="$path"
32521
32522  windows_path="$new_path"
32523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32524    unix_path=`$CYGPATH -u "$windows_path"`
32525    new_path="$unix_path"
32526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32528    new_path="$unix_path"
32529  fi
32530
32531
32532    new_path=`$WHICH "$new_path" 2> /dev/null`
32533    # bat and cmd files are not always considered executable in MSYS causing which
32534    # to not find them
32535    if test "x$new_path" = x \
32536        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32537        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32538      new_path="$path"
32539
32540  windows_path="$new_path"
32541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32542    unix_path=`$CYGPATH -u "$windows_path"`
32543    new_path="$unix_path"
32544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32546    new_path="$unix_path"
32547  fi
32548
32549    fi
32550
32551    if test "x$new_path" = x; then
32552      # It's still not found. Now this is an unrecoverable error.
32553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32554$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32555      has_space=`$ECHO "$complete" | $GREP " "`
32556      if test "x$has_space" != x; then
32557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32559      fi
32560      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32561    fi
32562  fi
32563
32564  # Now new_path has a complete unix path to the binary
32565  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32566    # Keep paths in /bin as-is, but remove trailing .exe if any
32567    new_path="${new_path/%.exe/}"
32568    # Do not save /bin paths to all_fixpath_prefixes!
32569  else
32570    # Not in mixed or Windows style, start by that.
32571    new_path=`cmd //c echo $new_path`
32572
32573  input_path="$new_path"
32574  # Check if we need to convert this using DOS-style short mode. If the path
32575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32576  # take no chances and rewrite it.
32577  # Note: m4 eats our [], so we need to use [ and ] instead.
32578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32579  if test "x$has_forbidden_chars" != x; then
32580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32582  fi
32583
32584    # Output is in $new_path
32585
32586  windows_path="$new_path"
32587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32588    unix_path=`$CYGPATH -u "$windows_path"`
32589    new_path="$unix_path"
32590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32592    new_path="$unix_path"
32593  fi
32594
32595    # remove trailing .exe if any
32596    new_path="${new_path/%.exe/}"
32597
32598    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32599    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32600  fi
32601
32602    else
32603      # We're on a unix platform. Hooray! :)
32604      # First separate the path from the arguments. This will split at the first
32605      # space.
32606      complete="$LD"
32607      path="${complete%% *}"
32608      tmp="$complete EOL"
32609      arguments="${tmp#* }"
32610
32611      # Cannot rely on the command "which" here since it doesn't always work.
32612      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32613      if test -z "$is_absolute_path"; then
32614        # Path to executable is not absolute. Find it.
32615        IFS_save="$IFS"
32616        IFS=:
32617        for p in $PATH; do
32618          if test -f "$p/$path" && test -x "$p/$path"; then
32619            new_path="$p/$path"
32620            break
32621          fi
32622        done
32623        IFS="$IFS_save"
32624      else
32625        # This is an absolute path, we can use it without further modifications.
32626        new_path="$path"
32627      fi
32628
32629      if test "x$new_path" = x; then
32630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32631$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32632        has_space=`$ECHO "$complete" | $GREP " "`
32633        if test "x$has_space" != x; then
32634          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32635$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32636        fi
32637        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32638      fi
32639    fi
32640
32641    # Now join together the path and the arguments once again
32642    if test "x$arguments" != xEOL; then
32643      new_complete="$new_path ${arguments% *}"
32644    else
32645      new_complete="$new_path"
32646    fi
32647
32648    if test "x$complete" != "x$new_complete"; then
32649      LD="$new_complete"
32650      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32651$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32652    fi
32653  fi
32654
32655    # Verify that we indeed succeeded with this trick.
32656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32657$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32658    "$LD" --version > /dev/null
32659    if test $? -eq 0 ; then
32660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32661$as_echo "no" >&6; }
32662      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32663    else
32664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32665$as_echo "yes" >&6; }
32666    fi
32667    LDCXX="$LD"
32668  else
32669    # All other toolchains use the compiler to link.
32670    LD="$CC"
32671    LDCXX="$CXX"
32672  fi
32673
32674  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32675
32676
32677  #
32678  # Setup the assembler (AS)
32679  #
32680  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32681    # FIXME: should this really be solaris, or solstudio?
32682
32683
32684  # Publish this variable in the help.
32685
32686
32687  if test "x$AS" = x; then
32688    # The variable is not set by user, try to locate tool using the code snippet
32689    for ac_prog in as
32690do
32691  # Extract the first word of "$ac_prog", so it can be a program name with args.
32692set dummy $ac_prog; ac_word=$2
32693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32694$as_echo_n "checking for $ac_word... " >&6; }
32695if ${ac_cv_path_AS+:} false; then :
32696  $as_echo_n "(cached) " >&6
32697else
32698  case $AS in
32699  [\\/]* | ?:[\\/]*)
32700  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32701  ;;
32702  *)
32703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32704for as_dir in $PATH
32705do
32706  IFS=$as_save_IFS
32707  test -z "$as_dir" && as_dir=.
32708    for ac_exec_ext in '' $ac_executable_extensions; do
32709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32710    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32712    break 2
32713  fi
32714done
32715  done
32716IFS=$as_save_IFS
32717
32718  ;;
32719esac
32720fi
32721AS=$ac_cv_path_AS
32722if test -n "$AS"; then
32723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32724$as_echo "$AS" >&6; }
32725else
32726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32727$as_echo "no" >&6; }
32728fi
32729
32730
32731  test -n "$AS" && break
32732done
32733
32734  else
32735    # The variable is set, but is it from the command line or the environment?
32736
32737    # Try to remove the string !AS! from our list.
32738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32740      # If it failed, the variable was not from the command line. Ignore it,
32741      # but warn the user (except for BASH, which is always set by the calling BASH).
32742      if test "xAS" != xBASH; then
32743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32744$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32745      fi
32746      # Try to locate tool using the code snippet
32747      for ac_prog in as
32748do
32749  # Extract the first word of "$ac_prog", so it can be a program name with args.
32750set dummy $ac_prog; ac_word=$2
32751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32752$as_echo_n "checking for $ac_word... " >&6; }
32753if ${ac_cv_path_AS+:} false; then :
32754  $as_echo_n "(cached) " >&6
32755else
32756  case $AS in
32757  [\\/]* | ?:[\\/]*)
32758  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32759  ;;
32760  *)
32761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32762for as_dir in $PATH
32763do
32764  IFS=$as_save_IFS
32765  test -z "$as_dir" && as_dir=.
32766    for ac_exec_ext in '' $ac_executable_extensions; do
32767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32768    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32770    break 2
32771  fi
32772done
32773  done
32774IFS=$as_save_IFS
32775
32776  ;;
32777esac
32778fi
32779AS=$ac_cv_path_AS
32780if test -n "$AS"; then
32781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32782$as_echo "$AS" >&6; }
32783else
32784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32785$as_echo "no" >&6; }
32786fi
32787
32788
32789  test -n "$AS" && break
32790done
32791
32792    else
32793      # If it succeeded, then it was overridden by the user. We will use it
32794      # for the tool.
32795
32796      # First remove it from the list of overridden variables, so we can test
32797      # for unknown variables in the end.
32798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32799
32800      # Check if the provided tool contains a complete path.
32801      tool_specified="$AS"
32802      tool_basename="${tool_specified##*/}"
32803      if test "x$tool_basename" = "x$tool_specified"; then
32804        # A command without a complete path is provided, search $PATH.
32805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32806$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32807        # Extract the first word of "$tool_basename", so it can be a program name with args.
32808set dummy $tool_basename; ac_word=$2
32809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32810$as_echo_n "checking for $ac_word... " >&6; }
32811if ${ac_cv_path_AS+:} false; then :
32812  $as_echo_n "(cached) " >&6
32813else
32814  case $AS in
32815  [\\/]* | ?:[\\/]*)
32816  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32817  ;;
32818  *)
32819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32820for as_dir in $PATH
32821do
32822  IFS=$as_save_IFS
32823  test -z "$as_dir" && as_dir=.
32824    for ac_exec_ext in '' $ac_executable_extensions; do
32825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32826    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32828    break 2
32829  fi
32830done
32831  done
32832IFS=$as_save_IFS
32833
32834  ;;
32835esac
32836fi
32837AS=$ac_cv_path_AS
32838if test -n "$AS"; then
32839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32840$as_echo "$AS" >&6; }
32841else
32842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32843$as_echo "no" >&6; }
32844fi
32845
32846
32847        if test "x$AS" = x; then
32848          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32849        fi
32850      else
32851        # Otherwise we believe it is a complete path. Use it as it is.
32852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32853$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32855$as_echo_n "checking for AS... " >&6; }
32856        if test ! -x "$tool_specified"; then
32857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32858$as_echo "not found" >&6; }
32859          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32860        fi
32861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32862$as_echo "$tool_specified" >&6; }
32863      fi
32864    fi
32865  fi
32866
32867
32868
32869  # Only process if variable expands to non-empty
32870
32871  if test "x$AS" != x; then
32872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32873
32874  # First separate the path from the arguments. This will split at the first
32875  # space.
32876  complete="$AS"
32877  path="${complete%% *}"
32878  tmp="$complete EOL"
32879  arguments="${tmp#* }"
32880
32881  # Input might be given as Windows format, start by converting to
32882  # unix format.
32883  new_path=`$CYGPATH -u "$path"`
32884
32885  # Now try to locate executable using which
32886  new_path=`$WHICH "$new_path" 2> /dev/null`
32887  # bat and cmd files are not always considered executable in cygwin causing which
32888  # to not find them
32889  if test "x$new_path" = x \
32890      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32891      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32892    new_path=`$CYGPATH -u "$path"`
32893  fi
32894  if test "x$new_path" = x; then
32895    # Oops. Which didn't find the executable.
32896    # The splitting of arguments from the executable at a space might have been incorrect,
32897    # since paths with space are more likely in Windows. Give it another try with the whole
32898    # argument.
32899    path="$complete"
32900    arguments="EOL"
32901    new_path=`$CYGPATH -u "$path"`
32902    new_path=`$WHICH "$new_path" 2> /dev/null`
32903    # bat and cmd files are not always considered executable in cygwin causing which
32904    # to not find them
32905    if test "x$new_path" = x \
32906        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32907        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32908      new_path=`$CYGPATH -u "$path"`
32909    fi
32910    if test "x$new_path" = x; then
32911      # It's still not found. Now this is an unrecoverable error.
32912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32913$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32914      has_space=`$ECHO "$complete" | $GREP " "`
32915      if test "x$has_space" != x; then
32916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32918      fi
32919      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32920    fi
32921  fi
32922
32923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32926  # "foo.exe" is OK but "foo" is an error.
32927  #
32928  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32929  # It is also a way to make sure we got the proper file name for the real test later on.
32930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32931  if test "x$test_shortpath" = x; then
32932    # Short path failed, file does not exist as specified.
32933    # Try adding .exe or .cmd
32934    if test -f "${new_path}.exe"; then
32935      input_to_shortpath="${new_path}.exe"
32936    elif test -f "${new_path}.cmd"; then
32937      input_to_shortpath="${new_path}.cmd"
32938    else
32939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32940$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32941      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32942$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32943      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32944    fi
32945  else
32946    input_to_shortpath="$new_path"
32947  fi
32948
32949  # Call helper function which possibly converts this using DOS-style short mode.
32950  # If so, the updated path is stored in $new_path.
32951  new_path="$input_to_shortpath"
32952
32953  input_path="$input_to_shortpath"
32954  # Check if we need to convert this using DOS-style short mode. If the path
32955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32956  # take no chances and rewrite it.
32957  # Note: m4 eats our [], so we need to use [ and ] instead.
32958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32959  if test "x$has_forbidden_chars" != x; then
32960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32964      # Going to short mode and back again did indeed matter. Since short mode is
32965      # case insensitive, let's make it lowercase to improve readability.
32966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32967      # Now convert it back to Unix-style (cygpath)
32968      input_path=`$CYGPATH -u "$shortmode_path"`
32969      new_path="$input_path"
32970    fi
32971  fi
32972
32973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32974  if test "x$test_cygdrive_prefix" = x; then
32975    # As a simple fix, exclude /usr/bin since it's not a real path.
32976    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32978      # a path prefixed by /cygdrive for fixpath to work.
32979      new_path="$CYGWIN_ROOT_PATH$input_path"
32980    fi
32981  fi
32982
32983  # remove trailing .exe if any
32984  new_path="${new_path/%.exe/}"
32985
32986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32987
32988  # First separate the path from the arguments. This will split at the first
32989  # space.
32990  complete="$AS"
32991  path="${complete%% *}"
32992  tmp="$complete EOL"
32993  arguments="${tmp#* }"
32994
32995  # Input might be given as Windows format, start by converting to
32996  # unix format.
32997  new_path="$path"
32998
32999  windows_path="$new_path"
33000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33001    unix_path=`$CYGPATH -u "$windows_path"`
33002    new_path="$unix_path"
33003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33005    new_path="$unix_path"
33006  fi
33007
33008
33009  # Now try to locate executable using which
33010  new_path=`$WHICH "$new_path" 2> /dev/null`
33011
33012  if test "x$new_path" = x; then
33013    # Oops. Which didn't find the executable.
33014    # The splitting of arguments from the executable at a space might have been incorrect,
33015    # since paths with space are more likely in Windows. Give it another try with the whole
33016    # argument.
33017    path="$complete"
33018    arguments="EOL"
33019    new_path="$path"
33020
33021  windows_path="$new_path"
33022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33023    unix_path=`$CYGPATH -u "$windows_path"`
33024    new_path="$unix_path"
33025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33027    new_path="$unix_path"
33028  fi
33029
33030
33031    new_path=`$WHICH "$new_path" 2> /dev/null`
33032    # bat and cmd files are not always considered executable in MSYS causing which
33033    # to not find them
33034    if test "x$new_path" = x \
33035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33037      new_path="$path"
33038
33039  windows_path="$new_path"
33040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33041    unix_path=`$CYGPATH -u "$windows_path"`
33042    new_path="$unix_path"
33043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33045    new_path="$unix_path"
33046  fi
33047
33048    fi
33049
33050    if test "x$new_path" = x; then
33051      # It's still not found. Now this is an unrecoverable error.
33052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33053$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33054      has_space=`$ECHO "$complete" | $GREP " "`
33055      if test "x$has_space" != x; then
33056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33058      fi
33059      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33060    fi
33061  fi
33062
33063  # Now new_path has a complete unix path to the binary
33064  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33065    # Keep paths in /bin as-is, but remove trailing .exe if any
33066    new_path="${new_path/%.exe/}"
33067    # Do not save /bin paths to all_fixpath_prefixes!
33068  else
33069    # Not in mixed or Windows style, start by that.
33070    new_path=`cmd //c echo $new_path`
33071
33072  input_path="$new_path"
33073  # Check if we need to convert this using DOS-style short mode. If the path
33074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33075  # take no chances and rewrite it.
33076  # Note: m4 eats our [], so we need to use [ and ] instead.
33077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33078  if test "x$has_forbidden_chars" != x; then
33079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33081  fi
33082
33083    # Output is in $new_path
33084
33085  windows_path="$new_path"
33086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33087    unix_path=`$CYGPATH -u "$windows_path"`
33088    new_path="$unix_path"
33089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33091    new_path="$unix_path"
33092  fi
33093
33094    # remove trailing .exe if any
33095    new_path="${new_path/%.exe/}"
33096
33097    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33098    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33099  fi
33100
33101    else
33102      # We're on a unix platform. Hooray! :)
33103      # First separate the path from the arguments. This will split at the first
33104      # space.
33105      complete="$AS"
33106      path="${complete%% *}"
33107      tmp="$complete EOL"
33108      arguments="${tmp#* }"
33109
33110      # Cannot rely on the command "which" here since it doesn't always work.
33111      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33112      if test -z "$is_absolute_path"; then
33113        # Path to executable is not absolute. Find it.
33114        IFS_save="$IFS"
33115        IFS=:
33116        for p in $PATH; do
33117          if test -f "$p/$path" && test -x "$p/$path"; then
33118            new_path="$p/$path"
33119            break
33120          fi
33121        done
33122        IFS="$IFS_save"
33123      else
33124        # This is an absolute path, we can use it without further modifications.
33125        new_path="$path"
33126      fi
33127
33128      if test "x$new_path" = x; then
33129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33130$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33131        has_space=`$ECHO "$complete" | $GREP " "`
33132        if test "x$has_space" != x; then
33133          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33134$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33135        fi
33136        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33137      fi
33138    fi
33139
33140    # Now join together the path and the arguments once again
33141    if test "x$arguments" != xEOL; then
33142      new_complete="$new_path ${arguments% *}"
33143    else
33144      new_complete="$new_path"
33145    fi
33146
33147    if test "x$complete" != "x$new_complete"; then
33148      AS="$new_complete"
33149      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33150$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33151    fi
33152  fi
33153
33154  else
33155    # FIXME: is this correct for microsoft?
33156    AS="$CC -c"
33157  fi
33158
33159
33160  #
33161  # Setup the archiver (AR)
33162  #
33163  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33164    # The corresponding ar tool is lib.exe (used to create static libraries)
33165    # Extract the first word of "lib", so it can be a program name with args.
33166set dummy lib; ac_word=$2
33167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33168$as_echo_n "checking for $ac_word... " >&6; }
33169if ${ac_cv_prog_AR+:} false; then :
33170  $as_echo_n "(cached) " >&6
33171else
33172  if test -n "$AR"; then
33173  ac_cv_prog_AR="$AR" # Let the user override the test.
33174else
33175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33176for as_dir in $PATH
33177do
33178  IFS=$as_save_IFS
33179  test -z "$as_dir" && as_dir=.
33180    for ac_exec_ext in '' $ac_executable_extensions; do
33181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33182    ac_cv_prog_AR="lib"
33183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33184    break 2
33185  fi
33186done
33187  done
33188IFS=$as_save_IFS
33189
33190fi
33191fi
33192AR=$ac_cv_prog_AR
33193if test -n "$AR"; then
33194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33195$as_echo "$AR" >&6; }
33196else
33197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33198$as_echo "no" >&6; }
33199fi
33200
33201
33202  else
33203
33204
33205  # Publish this variable in the help.
33206
33207
33208  if test "x$AR" = x; then
33209    # The variable is not set by user, try to locate tool using the code snippet
33210    if test -n "$ac_tool_prefix"; then
33211  for ac_prog in ar
33212  do
33213    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33214set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33216$as_echo_n "checking for $ac_word... " >&6; }
33217if ${ac_cv_prog_AR+:} false; then :
33218  $as_echo_n "(cached) " >&6
33219else
33220  if test -n "$AR"; then
33221  ac_cv_prog_AR="$AR" # Let the user override the test.
33222else
33223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33224for as_dir in $PATH
33225do
33226  IFS=$as_save_IFS
33227  test -z "$as_dir" && as_dir=.
33228    for ac_exec_ext in '' $ac_executable_extensions; do
33229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33230    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33232    break 2
33233  fi
33234done
33235  done
33236IFS=$as_save_IFS
33237
33238fi
33239fi
33240AR=$ac_cv_prog_AR
33241if test -n "$AR"; then
33242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33243$as_echo "$AR" >&6; }
33244else
33245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33246$as_echo "no" >&6; }
33247fi
33248
33249
33250    test -n "$AR" && break
33251  done
33252fi
33253if test -z "$AR"; then
33254  ac_ct_AR=$AR
33255  for ac_prog in ar
33256do
33257  # Extract the first word of "$ac_prog", so it can be a program name with args.
33258set dummy $ac_prog; ac_word=$2
33259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33260$as_echo_n "checking for $ac_word... " >&6; }
33261if ${ac_cv_prog_ac_ct_AR+:} false; then :
33262  $as_echo_n "(cached) " >&6
33263else
33264  if test -n "$ac_ct_AR"; then
33265  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33266else
33267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33268for as_dir in $PATH
33269do
33270  IFS=$as_save_IFS
33271  test -z "$as_dir" && as_dir=.
33272    for ac_exec_ext in '' $ac_executable_extensions; do
33273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33274    ac_cv_prog_ac_ct_AR="$ac_prog"
33275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33276    break 2
33277  fi
33278done
33279  done
33280IFS=$as_save_IFS
33281
33282fi
33283fi
33284ac_ct_AR=$ac_cv_prog_ac_ct_AR
33285if test -n "$ac_ct_AR"; then
33286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33287$as_echo "$ac_ct_AR" >&6; }
33288else
33289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33290$as_echo "no" >&6; }
33291fi
33292
33293
33294  test -n "$ac_ct_AR" && break
33295done
33296
33297  if test "x$ac_ct_AR" = x; then
33298    AR=""
33299  else
33300    case $cross_compiling:$ac_tool_warned in
33301yes:)
33302{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33303$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33304ac_tool_warned=yes ;;
33305esac
33306    AR=$ac_ct_AR
33307  fi
33308fi
33309
33310  else
33311    # The variable is set, but is it from the command line or the environment?
33312
33313    # Try to remove the string !AR! from our list.
33314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33316      # If it failed, the variable was not from the command line. Ignore it,
33317      # but warn the user (except for BASH, which is always set by the calling BASH).
33318      if test "xAR" != xBASH; then
33319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33320$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33321      fi
33322      # Try to locate tool using the code snippet
33323      if test -n "$ac_tool_prefix"; then
33324  for ac_prog in ar
33325  do
33326    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33327set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33329$as_echo_n "checking for $ac_word... " >&6; }
33330if ${ac_cv_prog_AR+:} false; then :
33331  $as_echo_n "(cached) " >&6
33332else
33333  if test -n "$AR"; then
33334  ac_cv_prog_AR="$AR" # Let the user override the test.
33335else
33336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33337for as_dir in $PATH
33338do
33339  IFS=$as_save_IFS
33340  test -z "$as_dir" && as_dir=.
33341    for ac_exec_ext in '' $ac_executable_extensions; do
33342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33343    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33345    break 2
33346  fi
33347done
33348  done
33349IFS=$as_save_IFS
33350
33351fi
33352fi
33353AR=$ac_cv_prog_AR
33354if test -n "$AR"; then
33355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33356$as_echo "$AR" >&6; }
33357else
33358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33359$as_echo "no" >&6; }
33360fi
33361
33362
33363    test -n "$AR" && break
33364  done
33365fi
33366if test -z "$AR"; then
33367  ac_ct_AR=$AR
33368  for ac_prog in ar
33369do
33370  # Extract the first word of "$ac_prog", so it can be a program name with args.
33371set dummy $ac_prog; ac_word=$2
33372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33373$as_echo_n "checking for $ac_word... " >&6; }
33374if ${ac_cv_prog_ac_ct_AR+:} false; then :
33375  $as_echo_n "(cached) " >&6
33376else
33377  if test -n "$ac_ct_AR"; then
33378  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33379else
33380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33381for as_dir in $PATH
33382do
33383  IFS=$as_save_IFS
33384  test -z "$as_dir" && as_dir=.
33385    for ac_exec_ext in '' $ac_executable_extensions; do
33386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33387    ac_cv_prog_ac_ct_AR="$ac_prog"
33388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33389    break 2
33390  fi
33391done
33392  done
33393IFS=$as_save_IFS
33394
33395fi
33396fi
33397ac_ct_AR=$ac_cv_prog_ac_ct_AR
33398if test -n "$ac_ct_AR"; then
33399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33400$as_echo "$ac_ct_AR" >&6; }
33401else
33402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33403$as_echo "no" >&6; }
33404fi
33405
33406
33407  test -n "$ac_ct_AR" && break
33408done
33409
33410  if test "x$ac_ct_AR" = x; then
33411    AR=""
33412  else
33413    case $cross_compiling:$ac_tool_warned in
33414yes:)
33415{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33416$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33417ac_tool_warned=yes ;;
33418esac
33419    AR=$ac_ct_AR
33420  fi
33421fi
33422
33423    else
33424      # If it succeeded, then it was overridden by the user. We will use it
33425      # for the tool.
33426
33427      # First remove it from the list of overridden variables, so we can test
33428      # for unknown variables in the end.
33429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33430
33431      # Check if the provided tool contains a complete path.
33432      tool_specified="$AR"
33433      tool_basename="${tool_specified##*/}"
33434      if test "x$tool_basename" = "x$tool_specified"; then
33435        # A command without a complete path is provided, search $PATH.
33436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33437$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33438        # Extract the first word of "$tool_basename", so it can be a program name with args.
33439set dummy $tool_basename; ac_word=$2
33440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33441$as_echo_n "checking for $ac_word... " >&6; }
33442if ${ac_cv_path_AR+:} false; then :
33443  $as_echo_n "(cached) " >&6
33444else
33445  case $AR in
33446  [\\/]* | ?:[\\/]*)
33447  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33448  ;;
33449  *)
33450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33451for as_dir in $PATH
33452do
33453  IFS=$as_save_IFS
33454  test -z "$as_dir" && as_dir=.
33455    for ac_exec_ext in '' $ac_executable_extensions; do
33456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33457    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33459    break 2
33460  fi
33461done
33462  done
33463IFS=$as_save_IFS
33464
33465  ;;
33466esac
33467fi
33468AR=$ac_cv_path_AR
33469if test -n "$AR"; then
33470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33471$as_echo "$AR" >&6; }
33472else
33473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33474$as_echo "no" >&6; }
33475fi
33476
33477
33478        if test "x$AR" = x; then
33479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33480        fi
33481      else
33482        # Otherwise we believe it is a complete path. Use it as it is.
33483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33484$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33486$as_echo_n "checking for AR... " >&6; }
33487        if test ! -x "$tool_specified"; then
33488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33489$as_echo "not found" >&6; }
33490          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33491        fi
33492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33493$as_echo "$tool_specified" >&6; }
33494      fi
33495    fi
33496  fi
33497
33498
33499  fi
33500
33501  # Only process if variable expands to non-empty
33502
33503  if test "x$AR" != x; then
33504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33505
33506  # First separate the path from the arguments. This will split at the first
33507  # space.
33508  complete="$AR"
33509  path="${complete%% *}"
33510  tmp="$complete EOL"
33511  arguments="${tmp#* }"
33512
33513  # Input might be given as Windows format, start by converting to
33514  # unix format.
33515  new_path=`$CYGPATH -u "$path"`
33516
33517  # Now try to locate executable using which
33518  new_path=`$WHICH "$new_path" 2> /dev/null`
33519  # bat and cmd files are not always considered executable in cygwin causing which
33520  # to not find them
33521  if test "x$new_path" = x \
33522      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33523      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33524    new_path=`$CYGPATH -u "$path"`
33525  fi
33526  if test "x$new_path" = x; then
33527    # Oops. Which didn't find the executable.
33528    # The splitting of arguments from the executable at a space might have been incorrect,
33529    # since paths with space are more likely in Windows. Give it another try with the whole
33530    # argument.
33531    path="$complete"
33532    arguments="EOL"
33533    new_path=`$CYGPATH -u "$path"`
33534    new_path=`$WHICH "$new_path" 2> /dev/null`
33535    # bat and cmd files are not always considered executable in cygwin causing which
33536    # to not find them
33537    if test "x$new_path" = x \
33538        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33539        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33540      new_path=`$CYGPATH -u "$path"`
33541    fi
33542    if test "x$new_path" = x; then
33543      # It's still not found. Now this is an unrecoverable error.
33544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33545$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33546      has_space=`$ECHO "$complete" | $GREP " "`
33547      if test "x$has_space" != x; then
33548        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33549$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33550      fi
33551      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33552    fi
33553  fi
33554
33555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33558  # "foo.exe" is OK but "foo" is an error.
33559  #
33560  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33561  # It is also a way to make sure we got the proper file name for the real test later on.
33562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33563  if test "x$test_shortpath" = x; then
33564    # Short path failed, file does not exist as specified.
33565    # Try adding .exe or .cmd
33566    if test -f "${new_path}.exe"; then
33567      input_to_shortpath="${new_path}.exe"
33568    elif test -f "${new_path}.cmd"; then
33569      input_to_shortpath="${new_path}.cmd"
33570    else
33571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33572$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33573      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33574$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33575      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33576    fi
33577  else
33578    input_to_shortpath="$new_path"
33579  fi
33580
33581  # Call helper function which possibly converts this using DOS-style short mode.
33582  # If so, the updated path is stored in $new_path.
33583  new_path="$input_to_shortpath"
33584
33585  input_path="$input_to_shortpath"
33586  # Check if we need to convert this using DOS-style short mode. If the path
33587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33588  # take no chances and rewrite it.
33589  # Note: m4 eats our [], so we need to use [ and ] instead.
33590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33591  if test "x$has_forbidden_chars" != x; then
33592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33596      # Going to short mode and back again did indeed matter. Since short mode is
33597      # case insensitive, let's make it lowercase to improve readability.
33598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33599      # Now convert it back to Unix-style (cygpath)
33600      input_path=`$CYGPATH -u "$shortmode_path"`
33601      new_path="$input_path"
33602    fi
33603  fi
33604
33605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33606  if test "x$test_cygdrive_prefix" = x; then
33607    # As a simple fix, exclude /usr/bin since it's not a real path.
33608    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33610      # a path prefixed by /cygdrive for fixpath to work.
33611      new_path="$CYGWIN_ROOT_PATH$input_path"
33612    fi
33613  fi
33614
33615  # remove trailing .exe if any
33616  new_path="${new_path/%.exe/}"
33617
33618    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33619
33620  # First separate the path from the arguments. This will split at the first
33621  # space.
33622  complete="$AR"
33623  path="${complete%% *}"
33624  tmp="$complete EOL"
33625  arguments="${tmp#* }"
33626
33627  # Input might be given as Windows format, start by converting to
33628  # unix format.
33629  new_path="$path"
33630
33631  windows_path="$new_path"
33632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33633    unix_path=`$CYGPATH -u "$windows_path"`
33634    new_path="$unix_path"
33635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33637    new_path="$unix_path"
33638  fi
33639
33640
33641  # Now try to locate executable using which
33642  new_path=`$WHICH "$new_path" 2> /dev/null`
33643
33644  if test "x$new_path" = x; then
33645    # Oops. Which didn't find the executable.
33646    # The splitting of arguments from the executable at a space might have been incorrect,
33647    # since paths with space are more likely in Windows. Give it another try with the whole
33648    # argument.
33649    path="$complete"
33650    arguments="EOL"
33651    new_path="$path"
33652
33653  windows_path="$new_path"
33654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33655    unix_path=`$CYGPATH -u "$windows_path"`
33656    new_path="$unix_path"
33657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33659    new_path="$unix_path"
33660  fi
33661
33662
33663    new_path=`$WHICH "$new_path" 2> /dev/null`
33664    # bat and cmd files are not always considered executable in MSYS causing which
33665    # to not find them
33666    if test "x$new_path" = x \
33667        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33668        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33669      new_path="$path"
33670
33671  windows_path="$new_path"
33672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33673    unix_path=`$CYGPATH -u "$windows_path"`
33674    new_path="$unix_path"
33675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33677    new_path="$unix_path"
33678  fi
33679
33680    fi
33681
33682    if test "x$new_path" = x; then
33683      # It's still not found. Now this is an unrecoverable error.
33684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33685$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33686      has_space=`$ECHO "$complete" | $GREP " "`
33687      if test "x$has_space" != x; then
33688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33690      fi
33691      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33692    fi
33693  fi
33694
33695  # Now new_path has a complete unix path to the binary
33696  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33697    # Keep paths in /bin as-is, but remove trailing .exe if any
33698    new_path="${new_path/%.exe/}"
33699    # Do not save /bin paths to all_fixpath_prefixes!
33700  else
33701    # Not in mixed or Windows style, start by that.
33702    new_path=`cmd //c echo $new_path`
33703
33704  input_path="$new_path"
33705  # Check if we need to convert this using DOS-style short mode. If the path
33706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33707  # take no chances and rewrite it.
33708  # Note: m4 eats our [], so we need to use [ and ] instead.
33709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33710  if test "x$has_forbidden_chars" != x; then
33711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33713  fi
33714
33715    # Output is in $new_path
33716
33717  windows_path="$new_path"
33718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33719    unix_path=`$CYGPATH -u "$windows_path"`
33720    new_path="$unix_path"
33721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33723    new_path="$unix_path"
33724  fi
33725
33726    # remove trailing .exe if any
33727    new_path="${new_path/%.exe/}"
33728
33729    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33730    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33731  fi
33732
33733    else
33734      # We're on a unix platform. Hooray! :)
33735      # First separate the path from the arguments. This will split at the first
33736      # space.
33737      complete="$AR"
33738      path="${complete%% *}"
33739      tmp="$complete EOL"
33740      arguments="${tmp#* }"
33741
33742      # Cannot rely on the command "which" here since it doesn't always work.
33743      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33744      if test -z "$is_absolute_path"; then
33745        # Path to executable is not absolute. Find it.
33746        IFS_save="$IFS"
33747        IFS=:
33748        for p in $PATH; do
33749          if test -f "$p/$path" && test -x "$p/$path"; then
33750            new_path="$p/$path"
33751            break
33752          fi
33753        done
33754        IFS="$IFS_save"
33755      else
33756        # This is an absolute path, we can use it without further modifications.
33757        new_path="$path"
33758      fi
33759
33760      if test "x$new_path" = x; then
33761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33762$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33763        has_space=`$ECHO "$complete" | $GREP " "`
33764        if test "x$has_space" != x; then
33765          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33767        fi
33768        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33769      fi
33770    fi
33771
33772    # Now join together the path and the arguments once again
33773    if test "x$arguments" != xEOL; then
33774      new_complete="$new_path ${arguments% *}"
33775    else
33776      new_complete="$new_path"
33777    fi
33778
33779    if test "x$complete" != "x$new_complete"; then
33780      AR="$new_complete"
33781      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33782$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33783    fi
33784  fi
33785
33786
33787
33788  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33789
33790
33791  # Publish this variable in the help.
33792
33793
33794  if test "x$LIPO" = x; then
33795    # The variable is not set by user, try to locate tool using the code snippet
33796    for ac_prog in lipo
33797do
33798  # Extract the first word of "$ac_prog", so it can be a program name with args.
33799set dummy $ac_prog; ac_word=$2
33800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33801$as_echo_n "checking for $ac_word... " >&6; }
33802if ${ac_cv_path_LIPO+:} false; then :
33803  $as_echo_n "(cached) " >&6
33804else
33805  case $LIPO in
33806  [\\/]* | ?:[\\/]*)
33807  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33808  ;;
33809  *)
33810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33811for as_dir in $PATH
33812do
33813  IFS=$as_save_IFS
33814  test -z "$as_dir" && as_dir=.
33815    for ac_exec_ext in '' $ac_executable_extensions; do
33816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33817    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33819    break 2
33820  fi
33821done
33822  done
33823IFS=$as_save_IFS
33824
33825  ;;
33826esac
33827fi
33828LIPO=$ac_cv_path_LIPO
33829if test -n "$LIPO"; then
33830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33831$as_echo "$LIPO" >&6; }
33832else
33833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33834$as_echo "no" >&6; }
33835fi
33836
33837
33838  test -n "$LIPO" && break
33839done
33840
33841  else
33842    # The variable is set, but is it from the command line or the environment?
33843
33844    # Try to remove the string !LIPO! from our list.
33845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33847      # If it failed, the variable was not from the command line. Ignore it,
33848      # but warn the user (except for BASH, which is always set by the calling BASH).
33849      if test "xLIPO" != xBASH; then
33850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33851$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33852      fi
33853      # Try to locate tool using the code snippet
33854      for ac_prog in lipo
33855do
33856  # Extract the first word of "$ac_prog", so it can be a program name with args.
33857set dummy $ac_prog; ac_word=$2
33858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33859$as_echo_n "checking for $ac_word... " >&6; }
33860if ${ac_cv_path_LIPO+:} false; then :
33861  $as_echo_n "(cached) " >&6
33862else
33863  case $LIPO in
33864  [\\/]* | ?:[\\/]*)
33865  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33866  ;;
33867  *)
33868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33869for as_dir in $PATH
33870do
33871  IFS=$as_save_IFS
33872  test -z "$as_dir" && as_dir=.
33873    for ac_exec_ext in '' $ac_executable_extensions; do
33874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33875    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33877    break 2
33878  fi
33879done
33880  done
33881IFS=$as_save_IFS
33882
33883  ;;
33884esac
33885fi
33886LIPO=$ac_cv_path_LIPO
33887if test -n "$LIPO"; then
33888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33889$as_echo "$LIPO" >&6; }
33890else
33891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33892$as_echo "no" >&6; }
33893fi
33894
33895
33896  test -n "$LIPO" && break
33897done
33898
33899    else
33900      # If it succeeded, then it was overridden by the user. We will use it
33901      # for the tool.
33902
33903      # First remove it from the list of overridden variables, so we can test
33904      # for unknown variables in the end.
33905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33906
33907      # Check if the provided tool contains a complete path.
33908      tool_specified="$LIPO"
33909      tool_basename="${tool_specified##*/}"
33910      if test "x$tool_basename" = "x$tool_specified"; then
33911        # A command without a complete path is provided, search $PATH.
33912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33913$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33914        # Extract the first word of "$tool_basename", so it can be a program name with args.
33915set dummy $tool_basename; ac_word=$2
33916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33917$as_echo_n "checking for $ac_word... " >&6; }
33918if ${ac_cv_path_LIPO+:} false; then :
33919  $as_echo_n "(cached) " >&6
33920else
33921  case $LIPO in
33922  [\\/]* | ?:[\\/]*)
33923  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33924  ;;
33925  *)
33926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33927for as_dir in $PATH
33928do
33929  IFS=$as_save_IFS
33930  test -z "$as_dir" && as_dir=.
33931    for ac_exec_ext in '' $ac_executable_extensions; do
33932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33933    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33935    break 2
33936  fi
33937done
33938  done
33939IFS=$as_save_IFS
33940
33941  ;;
33942esac
33943fi
33944LIPO=$ac_cv_path_LIPO
33945if test -n "$LIPO"; then
33946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33947$as_echo "$LIPO" >&6; }
33948else
33949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33950$as_echo "no" >&6; }
33951fi
33952
33953
33954        if test "x$LIPO" = x; then
33955          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33956        fi
33957      else
33958        # Otherwise we believe it is a complete path. Use it as it is.
33959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33960$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33962$as_echo_n "checking for LIPO... " >&6; }
33963        if test ! -x "$tool_specified"; then
33964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33965$as_echo "not found" >&6; }
33966          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33967        fi
33968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33969$as_echo "$tool_specified" >&6; }
33970      fi
33971    fi
33972  fi
33973
33974
33975
33976  # Only process if variable expands to non-empty
33977
33978  if test "x$LIPO" != x; then
33979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33980
33981  # First separate the path from the arguments. This will split at the first
33982  # space.
33983  complete="$LIPO"
33984  path="${complete%% *}"
33985  tmp="$complete EOL"
33986  arguments="${tmp#* }"
33987
33988  # Input might be given as Windows format, start by converting to
33989  # unix format.
33990  new_path=`$CYGPATH -u "$path"`
33991
33992  # Now try to locate executable using which
33993  new_path=`$WHICH "$new_path" 2> /dev/null`
33994  # bat and cmd files are not always considered executable in cygwin causing which
33995  # to not find them
33996  if test "x$new_path" = x \
33997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33999    new_path=`$CYGPATH -u "$path"`
34000  fi
34001  if test "x$new_path" = x; then
34002    # Oops. Which didn't find the executable.
34003    # The splitting of arguments from the executable at a space might have been incorrect,
34004    # since paths with space are more likely in Windows. Give it another try with the whole
34005    # argument.
34006    path="$complete"
34007    arguments="EOL"
34008    new_path=`$CYGPATH -u "$path"`
34009    new_path=`$WHICH "$new_path" 2> /dev/null`
34010    # bat and cmd files are not always considered executable in cygwin causing which
34011    # to not find them
34012    if test "x$new_path" = x \
34013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34015      new_path=`$CYGPATH -u "$path"`
34016    fi
34017    if test "x$new_path" = x; then
34018      # It's still not found. Now this is an unrecoverable error.
34019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34020$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34021      has_space=`$ECHO "$complete" | $GREP " "`
34022      if test "x$has_space" != x; then
34023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34025      fi
34026      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34027    fi
34028  fi
34029
34030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34033  # "foo.exe" is OK but "foo" is an error.
34034  #
34035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34036  # It is also a way to make sure we got the proper file name for the real test later on.
34037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34038  if test "x$test_shortpath" = x; then
34039    # Short path failed, file does not exist as specified.
34040    # Try adding .exe or .cmd
34041    if test -f "${new_path}.exe"; then
34042      input_to_shortpath="${new_path}.exe"
34043    elif test -f "${new_path}.cmd"; then
34044      input_to_shortpath="${new_path}.cmd"
34045    else
34046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34047$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34050      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34051    fi
34052  else
34053    input_to_shortpath="$new_path"
34054  fi
34055
34056  # Call helper function which possibly converts this using DOS-style short mode.
34057  # If so, the updated path is stored in $new_path.
34058  new_path="$input_to_shortpath"
34059
34060  input_path="$input_to_shortpath"
34061  # Check if we need to convert this using DOS-style short mode. If the path
34062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34063  # take no chances and rewrite it.
34064  # Note: m4 eats our [], so we need to use [ and ] instead.
34065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34066  if test "x$has_forbidden_chars" != x; then
34067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34071      # Going to short mode and back again did indeed matter. Since short mode is
34072      # case insensitive, let's make it lowercase to improve readability.
34073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34074      # Now convert it back to Unix-style (cygpath)
34075      input_path=`$CYGPATH -u "$shortmode_path"`
34076      new_path="$input_path"
34077    fi
34078  fi
34079
34080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34081  if test "x$test_cygdrive_prefix" = x; then
34082    # As a simple fix, exclude /usr/bin since it's not a real path.
34083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34085      # a path prefixed by /cygdrive for fixpath to work.
34086      new_path="$CYGWIN_ROOT_PATH$input_path"
34087    fi
34088  fi
34089
34090  # remove trailing .exe if any
34091  new_path="${new_path/%.exe/}"
34092
34093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34094
34095  # First separate the path from the arguments. This will split at the first
34096  # space.
34097  complete="$LIPO"
34098  path="${complete%% *}"
34099  tmp="$complete EOL"
34100  arguments="${tmp#* }"
34101
34102  # Input might be given as Windows format, start by converting to
34103  # unix format.
34104  new_path="$path"
34105
34106  windows_path="$new_path"
34107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34108    unix_path=`$CYGPATH -u "$windows_path"`
34109    new_path="$unix_path"
34110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34112    new_path="$unix_path"
34113  fi
34114
34115
34116  # Now try to locate executable using which
34117  new_path=`$WHICH "$new_path" 2> /dev/null`
34118
34119  if test "x$new_path" = x; then
34120    # Oops. Which didn't find the executable.
34121    # The splitting of arguments from the executable at a space might have been incorrect,
34122    # since paths with space are more likely in Windows. Give it another try with the whole
34123    # argument.
34124    path="$complete"
34125    arguments="EOL"
34126    new_path="$path"
34127
34128  windows_path="$new_path"
34129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34130    unix_path=`$CYGPATH -u "$windows_path"`
34131    new_path="$unix_path"
34132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34134    new_path="$unix_path"
34135  fi
34136
34137
34138    new_path=`$WHICH "$new_path" 2> /dev/null`
34139    # bat and cmd files are not always considered executable in MSYS causing which
34140    # to not find them
34141    if test "x$new_path" = x \
34142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34144      new_path="$path"
34145
34146  windows_path="$new_path"
34147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34148    unix_path=`$CYGPATH -u "$windows_path"`
34149    new_path="$unix_path"
34150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34152    new_path="$unix_path"
34153  fi
34154
34155    fi
34156
34157    if test "x$new_path" = x; then
34158      # It's still not found. Now this is an unrecoverable error.
34159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34160$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34161      has_space=`$ECHO "$complete" | $GREP " "`
34162      if test "x$has_space" != x; then
34163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34165      fi
34166      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34167    fi
34168  fi
34169
34170  # Now new_path has a complete unix path to the binary
34171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34172    # Keep paths in /bin as-is, but remove trailing .exe if any
34173    new_path="${new_path/%.exe/}"
34174    # Do not save /bin paths to all_fixpath_prefixes!
34175  else
34176    # Not in mixed or Windows style, start by that.
34177    new_path=`cmd //c echo $new_path`
34178
34179  input_path="$new_path"
34180  # Check if we need to convert this using DOS-style short mode. If the path
34181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34182  # take no chances and rewrite it.
34183  # Note: m4 eats our [], so we need to use [ and ] instead.
34184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34185  if test "x$has_forbidden_chars" != x; then
34186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34188  fi
34189
34190    # Output is in $new_path
34191
34192  windows_path="$new_path"
34193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34194    unix_path=`$CYGPATH -u "$windows_path"`
34195    new_path="$unix_path"
34196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34198    new_path="$unix_path"
34199  fi
34200
34201    # remove trailing .exe if any
34202    new_path="${new_path/%.exe/}"
34203
34204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34206  fi
34207
34208    else
34209      # We're on a unix platform. Hooray! :)
34210      # First separate the path from the arguments. This will split at the first
34211      # space.
34212      complete="$LIPO"
34213      path="${complete%% *}"
34214      tmp="$complete EOL"
34215      arguments="${tmp#* }"
34216
34217      # Cannot rely on the command "which" here since it doesn't always work.
34218      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34219      if test -z "$is_absolute_path"; then
34220        # Path to executable is not absolute. Find it.
34221        IFS_save="$IFS"
34222        IFS=:
34223        for p in $PATH; do
34224          if test -f "$p/$path" && test -x "$p/$path"; then
34225            new_path="$p/$path"
34226            break
34227          fi
34228        done
34229        IFS="$IFS_save"
34230      else
34231        # This is an absolute path, we can use it without further modifications.
34232        new_path="$path"
34233      fi
34234
34235      if test "x$new_path" = x; then
34236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34237$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34238        has_space=`$ECHO "$complete" | $GREP " "`
34239        if test "x$has_space" != x; then
34240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34242        fi
34243        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34244      fi
34245    fi
34246
34247    # Now join together the path and the arguments once again
34248    if test "x$arguments" != xEOL; then
34249      new_complete="$new_path ${arguments% *}"
34250    else
34251      new_complete="$new_path"
34252    fi
34253
34254    if test "x$complete" != "x$new_complete"; then
34255      LIPO="$new_complete"
34256      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34257$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34258    fi
34259  fi
34260
34261  fi
34262
34263  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34264    # Extract the first word of "mt", so it can be a program name with args.
34265set dummy mt; ac_word=$2
34266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34267$as_echo_n "checking for $ac_word... " >&6; }
34268if ${ac_cv_prog_MT+:} false; then :
34269  $as_echo_n "(cached) " >&6
34270else
34271  if test -n "$MT"; then
34272  ac_cv_prog_MT="$MT" # Let the user override the test.
34273else
34274  ac_prog_rejected=no
34275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34276for as_dir in $PATH
34277do
34278  IFS=$as_save_IFS
34279  test -z "$as_dir" && as_dir=.
34280    for ac_exec_ext in '' $ac_executable_extensions; do
34281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34282    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34283       ac_prog_rejected=yes
34284       continue
34285     fi
34286    ac_cv_prog_MT="mt"
34287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34288    break 2
34289  fi
34290done
34291  done
34292IFS=$as_save_IFS
34293
34294if test $ac_prog_rejected = yes; then
34295  # We found a bogon in the path, so make sure we never use it.
34296  set dummy $ac_cv_prog_MT
34297  shift
34298  if test $# != 0; then
34299    # We chose a different compiler from the bogus one.
34300    # However, it has the same basename, so the bogon will be chosen
34301    # first if we set MT to just the basename; use the full file name.
34302    shift
34303    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34304  fi
34305fi
34306fi
34307fi
34308MT=$ac_cv_prog_MT
34309if test -n "$MT"; then
34310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34311$as_echo "$MT" >&6; }
34312else
34313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34314$as_echo "no" >&6; }
34315fi
34316
34317
34318
34319  # Only process if variable expands to non-empty
34320
34321  if test "x$MT" != x; then
34322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34323
34324  # First separate the path from the arguments. This will split at the first
34325  # space.
34326  complete="$MT"
34327  path="${complete%% *}"
34328  tmp="$complete EOL"
34329  arguments="${tmp#* }"
34330
34331  # Input might be given as Windows format, start by converting to
34332  # unix format.
34333  new_path=`$CYGPATH -u "$path"`
34334
34335  # Now try to locate executable using which
34336  new_path=`$WHICH "$new_path" 2> /dev/null`
34337  # bat and cmd files are not always considered executable in cygwin causing which
34338  # to not find them
34339  if test "x$new_path" = x \
34340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34342    new_path=`$CYGPATH -u "$path"`
34343  fi
34344  if test "x$new_path" = x; then
34345    # Oops. Which didn't find the executable.
34346    # The splitting of arguments from the executable at a space might have been incorrect,
34347    # since paths with space are more likely in Windows. Give it another try with the whole
34348    # argument.
34349    path="$complete"
34350    arguments="EOL"
34351    new_path=`$CYGPATH -u "$path"`
34352    new_path=`$WHICH "$new_path" 2> /dev/null`
34353    # bat and cmd files are not always considered executable in cygwin causing which
34354    # to not find them
34355    if test "x$new_path" = x \
34356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34358      new_path=`$CYGPATH -u "$path"`
34359    fi
34360    if test "x$new_path" = x; then
34361      # It's still not found. Now this is an unrecoverable error.
34362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34363$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34364      has_space=`$ECHO "$complete" | $GREP " "`
34365      if test "x$has_space" != x; then
34366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34368      fi
34369      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34370    fi
34371  fi
34372
34373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34376  # "foo.exe" is OK but "foo" is an error.
34377  #
34378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34379  # It is also a way to make sure we got the proper file name for the real test later on.
34380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34381  if test "x$test_shortpath" = x; then
34382    # Short path failed, file does not exist as specified.
34383    # Try adding .exe or .cmd
34384    if test -f "${new_path}.exe"; then
34385      input_to_shortpath="${new_path}.exe"
34386    elif test -f "${new_path}.cmd"; then
34387      input_to_shortpath="${new_path}.cmd"
34388    else
34389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34390$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34393      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34394    fi
34395  else
34396    input_to_shortpath="$new_path"
34397  fi
34398
34399  # Call helper function which possibly converts this using DOS-style short mode.
34400  # If so, the updated path is stored in $new_path.
34401  new_path="$input_to_shortpath"
34402
34403  input_path="$input_to_shortpath"
34404  # Check if we need to convert this using DOS-style short mode. If the path
34405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34406  # take no chances and rewrite it.
34407  # Note: m4 eats our [], so we need to use [ and ] instead.
34408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34409  if test "x$has_forbidden_chars" != x; then
34410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34414      # Going to short mode and back again did indeed matter. Since short mode is
34415      # case insensitive, let's make it lowercase to improve readability.
34416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34417      # Now convert it back to Unix-style (cygpath)
34418      input_path=`$CYGPATH -u "$shortmode_path"`
34419      new_path="$input_path"
34420    fi
34421  fi
34422
34423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34424  if test "x$test_cygdrive_prefix" = x; then
34425    # As a simple fix, exclude /usr/bin since it's not a real path.
34426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34428      # a path prefixed by /cygdrive for fixpath to work.
34429      new_path="$CYGWIN_ROOT_PATH$input_path"
34430    fi
34431  fi
34432
34433  # remove trailing .exe if any
34434  new_path="${new_path/%.exe/}"
34435
34436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34437
34438  # First separate the path from the arguments. This will split at the first
34439  # space.
34440  complete="$MT"
34441  path="${complete%% *}"
34442  tmp="$complete EOL"
34443  arguments="${tmp#* }"
34444
34445  # Input might be given as Windows format, start by converting to
34446  # unix format.
34447  new_path="$path"
34448
34449  windows_path="$new_path"
34450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34451    unix_path=`$CYGPATH -u "$windows_path"`
34452    new_path="$unix_path"
34453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34455    new_path="$unix_path"
34456  fi
34457
34458
34459  # Now try to locate executable using which
34460  new_path=`$WHICH "$new_path" 2> /dev/null`
34461
34462  if test "x$new_path" = x; then
34463    # Oops. Which didn't find the executable.
34464    # The splitting of arguments from the executable at a space might have been incorrect,
34465    # since paths with space are more likely in Windows. Give it another try with the whole
34466    # argument.
34467    path="$complete"
34468    arguments="EOL"
34469    new_path="$path"
34470
34471  windows_path="$new_path"
34472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34473    unix_path=`$CYGPATH -u "$windows_path"`
34474    new_path="$unix_path"
34475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34477    new_path="$unix_path"
34478  fi
34479
34480
34481    new_path=`$WHICH "$new_path" 2> /dev/null`
34482    # bat and cmd files are not always considered executable in MSYS causing which
34483    # to not find them
34484    if test "x$new_path" = x \
34485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34487      new_path="$path"
34488
34489  windows_path="$new_path"
34490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34491    unix_path=`$CYGPATH -u "$windows_path"`
34492    new_path="$unix_path"
34493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34495    new_path="$unix_path"
34496  fi
34497
34498    fi
34499
34500    if test "x$new_path" = x; then
34501      # It's still not found. Now this is an unrecoverable error.
34502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34503$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34504      has_space=`$ECHO "$complete" | $GREP " "`
34505      if test "x$has_space" != x; then
34506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34508      fi
34509      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34510    fi
34511  fi
34512
34513  # Now new_path has a complete unix path to the binary
34514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34515    # Keep paths in /bin as-is, but remove trailing .exe if any
34516    new_path="${new_path/%.exe/}"
34517    # Do not save /bin paths to all_fixpath_prefixes!
34518  else
34519    # Not in mixed or Windows style, start by that.
34520    new_path=`cmd //c echo $new_path`
34521
34522  input_path="$new_path"
34523  # Check if we need to convert this using DOS-style short mode. If the path
34524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34525  # take no chances and rewrite it.
34526  # Note: m4 eats our [], so we need to use [ and ] instead.
34527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34528  if test "x$has_forbidden_chars" != x; then
34529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34531  fi
34532
34533    # Output is in $new_path
34534
34535  windows_path="$new_path"
34536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34537    unix_path=`$CYGPATH -u "$windows_path"`
34538    new_path="$unix_path"
34539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34541    new_path="$unix_path"
34542  fi
34543
34544    # remove trailing .exe if any
34545    new_path="${new_path/%.exe/}"
34546
34547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34549  fi
34550
34551    else
34552      # We're on a unix platform. Hooray! :)
34553      # First separate the path from the arguments. This will split at the first
34554      # space.
34555      complete="$MT"
34556      path="${complete%% *}"
34557      tmp="$complete EOL"
34558      arguments="${tmp#* }"
34559
34560      # Cannot rely on the command "which" here since it doesn't always work.
34561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34562      if test -z "$is_absolute_path"; then
34563        # Path to executable is not absolute. Find it.
34564        IFS_save="$IFS"
34565        IFS=:
34566        for p in $PATH; do
34567          if test -f "$p/$path" && test -x "$p/$path"; then
34568            new_path="$p/$path"
34569            break
34570          fi
34571        done
34572        IFS="$IFS_save"
34573      else
34574        # This is an absolute path, we can use it without further modifications.
34575        new_path="$path"
34576      fi
34577
34578      if test "x$new_path" = x; then
34579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34580$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34581        has_space=`$ECHO "$complete" | $GREP " "`
34582        if test "x$has_space" != x; then
34583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34585        fi
34586        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34587      fi
34588    fi
34589
34590    # Now join together the path and the arguments once again
34591    if test "x$arguments" != xEOL; then
34592      new_complete="$new_path ${arguments% *}"
34593    else
34594      new_complete="$new_path"
34595    fi
34596
34597    if test "x$complete" != "x$new_complete"; then
34598      MT="$new_complete"
34599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34600$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34601    fi
34602  fi
34603
34604    # Setup the resource compiler (RC)
34605    # Extract the first word of "rc", so it can be a program name with args.
34606set dummy rc; ac_word=$2
34607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34608$as_echo_n "checking for $ac_word... " >&6; }
34609if ${ac_cv_prog_RC+:} false; then :
34610  $as_echo_n "(cached) " >&6
34611else
34612  if test -n "$RC"; then
34613  ac_cv_prog_RC="$RC" # Let the user override the test.
34614else
34615  ac_prog_rejected=no
34616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34617for as_dir in $PATH
34618do
34619  IFS=$as_save_IFS
34620  test -z "$as_dir" && as_dir=.
34621    for ac_exec_ext in '' $ac_executable_extensions; do
34622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34623    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34624       ac_prog_rejected=yes
34625       continue
34626     fi
34627    ac_cv_prog_RC="rc"
34628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34629    break 2
34630  fi
34631done
34632  done
34633IFS=$as_save_IFS
34634
34635if test $ac_prog_rejected = yes; then
34636  # We found a bogon in the path, so make sure we never use it.
34637  set dummy $ac_cv_prog_RC
34638  shift
34639  if test $# != 0; then
34640    # We chose a different compiler from the bogus one.
34641    # However, it has the same basename, so the bogon will be chosen
34642    # first if we set RC to just the basename; use the full file name.
34643    shift
34644    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34645  fi
34646fi
34647fi
34648fi
34649RC=$ac_cv_prog_RC
34650if test -n "$RC"; then
34651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34652$as_echo "$RC" >&6; }
34653else
34654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34655$as_echo "no" >&6; }
34656fi
34657
34658
34659
34660  # Only process if variable expands to non-empty
34661
34662  if test "x$RC" != x; then
34663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34664
34665  # First separate the path from the arguments. This will split at the first
34666  # space.
34667  complete="$RC"
34668  path="${complete%% *}"
34669  tmp="$complete EOL"
34670  arguments="${tmp#* }"
34671
34672  # Input might be given as Windows format, start by converting to
34673  # unix format.
34674  new_path=`$CYGPATH -u "$path"`
34675
34676  # Now try to locate executable using which
34677  new_path=`$WHICH "$new_path" 2> /dev/null`
34678  # bat and cmd files are not always considered executable in cygwin causing which
34679  # to not find them
34680  if test "x$new_path" = x \
34681      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34682      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34683    new_path=`$CYGPATH -u "$path"`
34684  fi
34685  if test "x$new_path" = x; then
34686    # Oops. Which didn't find the executable.
34687    # The splitting of arguments from the executable at a space might have been incorrect,
34688    # since paths with space are more likely in Windows. Give it another try with the whole
34689    # argument.
34690    path="$complete"
34691    arguments="EOL"
34692    new_path=`$CYGPATH -u "$path"`
34693    new_path=`$WHICH "$new_path" 2> /dev/null`
34694    # bat and cmd files are not always considered executable in cygwin causing which
34695    # to not find them
34696    if test "x$new_path" = x \
34697        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34698        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34699      new_path=`$CYGPATH -u "$path"`
34700    fi
34701    if test "x$new_path" = x; then
34702      # It's still not found. Now this is an unrecoverable error.
34703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34704$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34705      has_space=`$ECHO "$complete" | $GREP " "`
34706      if test "x$has_space" != x; then
34707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34709      fi
34710      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34711    fi
34712  fi
34713
34714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34717  # "foo.exe" is OK but "foo" is an error.
34718  #
34719  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34720  # It is also a way to make sure we got the proper file name for the real test later on.
34721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34722  if test "x$test_shortpath" = x; then
34723    # Short path failed, file does not exist as specified.
34724    # Try adding .exe or .cmd
34725    if test -f "${new_path}.exe"; then
34726      input_to_shortpath="${new_path}.exe"
34727    elif test -f "${new_path}.cmd"; then
34728      input_to_shortpath="${new_path}.cmd"
34729    else
34730      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34731$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34732      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34733$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34734      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34735    fi
34736  else
34737    input_to_shortpath="$new_path"
34738  fi
34739
34740  # Call helper function which possibly converts this using DOS-style short mode.
34741  # If so, the updated path is stored in $new_path.
34742  new_path="$input_to_shortpath"
34743
34744  input_path="$input_to_shortpath"
34745  # Check if we need to convert this using DOS-style short mode. If the path
34746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34747  # take no chances and rewrite it.
34748  # Note: m4 eats our [], so we need to use [ and ] instead.
34749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34750  if test "x$has_forbidden_chars" != x; then
34751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34755      # Going to short mode and back again did indeed matter. Since short mode is
34756      # case insensitive, let's make it lowercase to improve readability.
34757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34758      # Now convert it back to Unix-style (cygpath)
34759      input_path=`$CYGPATH -u "$shortmode_path"`
34760      new_path="$input_path"
34761    fi
34762  fi
34763
34764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34765  if test "x$test_cygdrive_prefix" = x; then
34766    # As a simple fix, exclude /usr/bin since it's not a real path.
34767    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34769      # a path prefixed by /cygdrive for fixpath to work.
34770      new_path="$CYGWIN_ROOT_PATH$input_path"
34771    fi
34772  fi
34773
34774  # remove trailing .exe if any
34775  new_path="${new_path/%.exe/}"
34776
34777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34778
34779  # First separate the path from the arguments. This will split at the first
34780  # space.
34781  complete="$RC"
34782  path="${complete%% *}"
34783  tmp="$complete EOL"
34784  arguments="${tmp#* }"
34785
34786  # Input might be given as Windows format, start by converting to
34787  # unix format.
34788  new_path="$path"
34789
34790  windows_path="$new_path"
34791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34792    unix_path=`$CYGPATH -u "$windows_path"`
34793    new_path="$unix_path"
34794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34796    new_path="$unix_path"
34797  fi
34798
34799
34800  # Now try to locate executable using which
34801  new_path=`$WHICH "$new_path" 2> /dev/null`
34802
34803  if test "x$new_path" = x; then
34804    # Oops. Which didn't find the executable.
34805    # The splitting of arguments from the executable at a space might have been incorrect,
34806    # since paths with space are more likely in Windows. Give it another try with the whole
34807    # argument.
34808    path="$complete"
34809    arguments="EOL"
34810    new_path="$path"
34811
34812  windows_path="$new_path"
34813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34814    unix_path=`$CYGPATH -u "$windows_path"`
34815    new_path="$unix_path"
34816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34818    new_path="$unix_path"
34819  fi
34820
34821
34822    new_path=`$WHICH "$new_path" 2> /dev/null`
34823    # bat and cmd files are not always considered executable in MSYS causing which
34824    # to not find them
34825    if test "x$new_path" = x \
34826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34828      new_path="$path"
34829
34830  windows_path="$new_path"
34831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34832    unix_path=`$CYGPATH -u "$windows_path"`
34833    new_path="$unix_path"
34834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34836    new_path="$unix_path"
34837  fi
34838
34839    fi
34840
34841    if test "x$new_path" = x; then
34842      # It's still not found. Now this is an unrecoverable error.
34843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34844$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34845      has_space=`$ECHO "$complete" | $GREP " "`
34846      if test "x$has_space" != x; then
34847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34849      fi
34850      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34851    fi
34852  fi
34853
34854  # Now new_path has a complete unix path to the binary
34855  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34856    # Keep paths in /bin as-is, but remove trailing .exe if any
34857    new_path="${new_path/%.exe/}"
34858    # Do not save /bin paths to all_fixpath_prefixes!
34859  else
34860    # Not in mixed or Windows style, start by that.
34861    new_path=`cmd //c echo $new_path`
34862
34863  input_path="$new_path"
34864  # Check if we need to convert this using DOS-style short mode. If the path
34865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34866  # take no chances and rewrite it.
34867  # Note: m4 eats our [], so we need to use [ and ] instead.
34868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34869  if test "x$has_forbidden_chars" != x; then
34870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34871    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34872  fi
34873
34874    # Output is in $new_path
34875
34876  windows_path="$new_path"
34877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34878    unix_path=`$CYGPATH -u "$windows_path"`
34879    new_path="$unix_path"
34880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34882    new_path="$unix_path"
34883  fi
34884
34885    # remove trailing .exe if any
34886    new_path="${new_path/%.exe/}"
34887
34888    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34889    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34890  fi
34891
34892    else
34893      # We're on a unix platform. Hooray! :)
34894      # First separate the path from the arguments. This will split at the first
34895      # space.
34896      complete="$RC"
34897      path="${complete%% *}"
34898      tmp="$complete EOL"
34899      arguments="${tmp#* }"
34900
34901      # Cannot rely on the command "which" here since it doesn't always work.
34902      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34903      if test -z "$is_absolute_path"; then
34904        # Path to executable is not absolute. Find it.
34905        IFS_save="$IFS"
34906        IFS=:
34907        for p in $PATH; do
34908          if test -f "$p/$path" && test -x "$p/$path"; then
34909            new_path="$p/$path"
34910            break
34911          fi
34912        done
34913        IFS="$IFS_save"
34914      else
34915        # This is an absolute path, we can use it without further modifications.
34916        new_path="$path"
34917      fi
34918
34919      if test "x$new_path" = x; then
34920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34921$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34922        has_space=`$ECHO "$complete" | $GREP " "`
34923        if test "x$has_space" != x; then
34924          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34925$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34926        fi
34927        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34928      fi
34929    fi
34930
34931    # Now join together the path and the arguments once again
34932    if test "x$arguments" != xEOL; then
34933      new_complete="$new_path ${arguments% *}"
34934    else
34935      new_complete="$new_path"
34936    fi
34937
34938    if test "x$complete" != "x$new_complete"; then
34939      RC="$new_complete"
34940      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34941$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34942    fi
34943  fi
34944
34945    # Extract the first word of "dumpbin", so it can be a program name with args.
34946set dummy dumpbin; ac_word=$2
34947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34948$as_echo_n "checking for $ac_word... " >&6; }
34949if ${ac_cv_prog_DUMPBIN+:} false; then :
34950  $as_echo_n "(cached) " >&6
34951else
34952  if test -n "$DUMPBIN"; then
34953  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34954else
34955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34956for as_dir in $PATH
34957do
34958  IFS=$as_save_IFS
34959  test -z "$as_dir" && as_dir=.
34960    for ac_exec_ext in '' $ac_executable_extensions; do
34961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34962    ac_cv_prog_DUMPBIN="dumpbin"
34963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34964    break 2
34965  fi
34966done
34967  done
34968IFS=$as_save_IFS
34969
34970fi
34971fi
34972DUMPBIN=$ac_cv_prog_DUMPBIN
34973if test -n "$DUMPBIN"; then
34974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34975$as_echo "$DUMPBIN" >&6; }
34976else
34977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34978$as_echo "no" >&6; }
34979fi
34980
34981
34982
34983  # Only process if variable expands to non-empty
34984
34985  if test "x$DUMPBIN" != x; then
34986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34987
34988  # First separate the path from the arguments. This will split at the first
34989  # space.
34990  complete="$DUMPBIN"
34991  path="${complete%% *}"
34992  tmp="$complete EOL"
34993  arguments="${tmp#* }"
34994
34995  # Input might be given as Windows format, start by converting to
34996  # unix format.
34997  new_path=`$CYGPATH -u "$path"`
34998
34999  # Now try to locate executable using which
35000  new_path=`$WHICH "$new_path" 2> /dev/null`
35001  # bat and cmd files are not always considered executable in cygwin causing which
35002  # to not find them
35003  if test "x$new_path" = x \
35004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35006    new_path=`$CYGPATH -u "$path"`
35007  fi
35008  if test "x$new_path" = x; then
35009    # Oops. Which didn't find the executable.
35010    # The splitting of arguments from the executable at a space might have been incorrect,
35011    # since paths with space are more likely in Windows. Give it another try with the whole
35012    # argument.
35013    path="$complete"
35014    arguments="EOL"
35015    new_path=`$CYGPATH -u "$path"`
35016    new_path=`$WHICH "$new_path" 2> /dev/null`
35017    # bat and cmd files are not always considered executable in cygwin causing which
35018    # to not find them
35019    if test "x$new_path" = x \
35020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35022      new_path=`$CYGPATH -u "$path"`
35023    fi
35024    if test "x$new_path" = x; then
35025      # It's still not found. Now this is an unrecoverable error.
35026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35027$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35028      has_space=`$ECHO "$complete" | $GREP " "`
35029      if test "x$has_space" != x; then
35030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35032      fi
35033      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35034    fi
35035  fi
35036
35037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35040  # "foo.exe" is OK but "foo" is an error.
35041  #
35042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35043  # It is also a way to make sure we got the proper file name for the real test later on.
35044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35045  if test "x$test_shortpath" = x; then
35046    # Short path failed, file does not exist as specified.
35047    # Try adding .exe or .cmd
35048    if test -f "${new_path}.exe"; then
35049      input_to_shortpath="${new_path}.exe"
35050    elif test -f "${new_path}.cmd"; then
35051      input_to_shortpath="${new_path}.cmd"
35052    else
35053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35054$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35057      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35058    fi
35059  else
35060    input_to_shortpath="$new_path"
35061  fi
35062
35063  # Call helper function which possibly converts this using DOS-style short mode.
35064  # If so, the updated path is stored in $new_path.
35065  new_path="$input_to_shortpath"
35066
35067  input_path="$input_to_shortpath"
35068  # Check if we need to convert this using DOS-style short mode. If the path
35069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35070  # take no chances and rewrite it.
35071  # Note: m4 eats our [], so we need to use [ and ] instead.
35072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35073  if test "x$has_forbidden_chars" != x; then
35074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35078      # Going to short mode and back again did indeed matter. Since short mode is
35079      # case insensitive, let's make it lowercase to improve readability.
35080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35081      # Now convert it back to Unix-style (cygpath)
35082      input_path=`$CYGPATH -u "$shortmode_path"`
35083      new_path="$input_path"
35084    fi
35085  fi
35086
35087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35088  if test "x$test_cygdrive_prefix" = x; then
35089    # As a simple fix, exclude /usr/bin since it's not a real path.
35090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35092      # a path prefixed by /cygdrive for fixpath to work.
35093      new_path="$CYGWIN_ROOT_PATH$input_path"
35094    fi
35095  fi
35096
35097  # remove trailing .exe if any
35098  new_path="${new_path/%.exe/}"
35099
35100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35101
35102  # First separate the path from the arguments. This will split at the first
35103  # space.
35104  complete="$DUMPBIN"
35105  path="${complete%% *}"
35106  tmp="$complete EOL"
35107  arguments="${tmp#* }"
35108
35109  # Input might be given as Windows format, start by converting to
35110  # unix format.
35111  new_path="$path"
35112
35113  windows_path="$new_path"
35114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35115    unix_path=`$CYGPATH -u "$windows_path"`
35116    new_path="$unix_path"
35117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35119    new_path="$unix_path"
35120  fi
35121
35122
35123  # Now try to locate executable using which
35124  new_path=`$WHICH "$new_path" 2> /dev/null`
35125
35126  if test "x$new_path" = x; then
35127    # Oops. Which didn't find the executable.
35128    # The splitting of arguments from the executable at a space might have been incorrect,
35129    # since paths with space are more likely in Windows. Give it another try with the whole
35130    # argument.
35131    path="$complete"
35132    arguments="EOL"
35133    new_path="$path"
35134
35135  windows_path="$new_path"
35136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35137    unix_path=`$CYGPATH -u "$windows_path"`
35138    new_path="$unix_path"
35139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35141    new_path="$unix_path"
35142  fi
35143
35144
35145    new_path=`$WHICH "$new_path" 2> /dev/null`
35146    # bat and cmd files are not always considered executable in MSYS causing which
35147    # to not find them
35148    if test "x$new_path" = x \
35149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35151      new_path="$path"
35152
35153  windows_path="$new_path"
35154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35155    unix_path=`$CYGPATH -u "$windows_path"`
35156    new_path="$unix_path"
35157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35159    new_path="$unix_path"
35160  fi
35161
35162    fi
35163
35164    if test "x$new_path" = x; then
35165      # It's still not found. Now this is an unrecoverable error.
35166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35167$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35168      has_space=`$ECHO "$complete" | $GREP " "`
35169      if test "x$has_space" != x; then
35170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35172      fi
35173      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35174    fi
35175  fi
35176
35177  # Now new_path has a complete unix path to the binary
35178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35179    # Keep paths in /bin as-is, but remove trailing .exe if any
35180    new_path="${new_path/%.exe/}"
35181    # Do not save /bin paths to all_fixpath_prefixes!
35182  else
35183    # Not in mixed or Windows style, start by that.
35184    new_path=`cmd //c echo $new_path`
35185
35186  input_path="$new_path"
35187  # Check if we need to convert this using DOS-style short mode. If the path
35188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35189  # take no chances and rewrite it.
35190  # Note: m4 eats our [], so we need to use [ and ] instead.
35191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35192  if test "x$has_forbidden_chars" != x; then
35193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35195  fi
35196
35197    # Output is in $new_path
35198
35199  windows_path="$new_path"
35200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35201    unix_path=`$CYGPATH -u "$windows_path"`
35202    new_path="$unix_path"
35203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35205    new_path="$unix_path"
35206  fi
35207
35208    # remove trailing .exe if any
35209    new_path="${new_path/%.exe/}"
35210
35211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35213  fi
35214
35215    else
35216      # We're on a unix platform. Hooray! :)
35217      # First separate the path from the arguments. This will split at the first
35218      # space.
35219      complete="$DUMPBIN"
35220      path="${complete%% *}"
35221      tmp="$complete EOL"
35222      arguments="${tmp#* }"
35223
35224      # Cannot rely on the command "which" here since it doesn't always work.
35225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35226      if test -z "$is_absolute_path"; then
35227        # Path to executable is not absolute. Find it.
35228        IFS_save="$IFS"
35229        IFS=:
35230        for p in $PATH; do
35231          if test -f "$p/$path" && test -x "$p/$path"; then
35232            new_path="$p/$path"
35233            break
35234          fi
35235        done
35236        IFS="$IFS_save"
35237      else
35238        # This is an absolute path, we can use it without further modifications.
35239        new_path="$path"
35240      fi
35241
35242      if test "x$new_path" = x; then
35243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35244$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35245        has_space=`$ECHO "$complete" | $GREP " "`
35246        if test "x$has_space" != x; then
35247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35249        fi
35250        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35251      fi
35252    fi
35253
35254    # Now join together the path and the arguments once again
35255    if test "x$arguments" != xEOL; then
35256      new_complete="$new_path ${arguments% *}"
35257    else
35258      new_complete="$new_path"
35259    fi
35260
35261    if test "x$complete" != "x$new_complete"; then
35262      DUMPBIN="$new_complete"
35263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35264$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35265    fi
35266  fi
35267
35268    # We need to check for 'msbuild.exe' because at the place where we expect to
35269    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35270    # won't find the 'msbuild.exe' executable in that case (and the
35271    # 'ac_executable_extensions' is unusable due to performance reasons).
35272    # Notice that we intentionally don't fix up the path to MSBUILD because we
35273    # will call it in a DOS shell during freetype detection on Windows (see
35274    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35275    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35276set dummy msbuild.exe; ac_word=$2
35277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35278$as_echo_n "checking for $ac_word... " >&6; }
35279if ${ac_cv_prog_MSBUILD+:} false; then :
35280  $as_echo_n "(cached) " >&6
35281else
35282  if test -n "$MSBUILD"; then
35283  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35284else
35285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35286for as_dir in $PATH
35287do
35288  IFS=$as_save_IFS
35289  test -z "$as_dir" && as_dir=.
35290    for ac_exec_ext in '' $ac_executable_extensions; do
35291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35292    ac_cv_prog_MSBUILD="msbuild.exe"
35293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35294    break 2
35295  fi
35296done
35297  done
35298IFS=$as_save_IFS
35299
35300fi
35301fi
35302MSBUILD=$ac_cv_prog_MSBUILD
35303if test -n "$MSBUILD"; then
35304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35305$as_echo "$MSBUILD" >&6; }
35306else
35307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35308$as_echo "no" >&6; }
35309fi
35310
35311
35312  fi
35313
35314  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35315
35316
35317  # Publish this variable in the help.
35318
35319
35320  if test "x$STRIP" = x; then
35321    # The variable is not set by user, try to locate tool using the code snippet
35322    for ac_prog in strip
35323do
35324  # Extract the first word of "$ac_prog", so it can be a program name with args.
35325set dummy $ac_prog; ac_word=$2
35326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35327$as_echo_n "checking for $ac_word... " >&6; }
35328if ${ac_cv_path_STRIP+:} false; then :
35329  $as_echo_n "(cached) " >&6
35330else
35331  case $STRIP in
35332  [\\/]* | ?:[\\/]*)
35333  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35334  ;;
35335  *)
35336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35337for as_dir in $PATH
35338do
35339  IFS=$as_save_IFS
35340  test -z "$as_dir" && as_dir=.
35341    for ac_exec_ext in '' $ac_executable_extensions; do
35342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35343    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35345    break 2
35346  fi
35347done
35348  done
35349IFS=$as_save_IFS
35350
35351  ;;
35352esac
35353fi
35354STRIP=$ac_cv_path_STRIP
35355if test -n "$STRIP"; then
35356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35357$as_echo "$STRIP" >&6; }
35358else
35359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35360$as_echo "no" >&6; }
35361fi
35362
35363
35364  test -n "$STRIP" && break
35365done
35366
35367  else
35368    # The variable is set, but is it from the command line or the environment?
35369
35370    # Try to remove the string !STRIP! from our list.
35371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35373      # If it failed, the variable was not from the command line. Ignore it,
35374      # but warn the user (except for BASH, which is always set by the calling BASH).
35375      if test "xSTRIP" != xBASH; then
35376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35377$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35378      fi
35379      # Try to locate tool using the code snippet
35380      for ac_prog in strip
35381do
35382  # Extract the first word of "$ac_prog", so it can be a program name with args.
35383set dummy $ac_prog; ac_word=$2
35384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35385$as_echo_n "checking for $ac_word... " >&6; }
35386if ${ac_cv_path_STRIP+:} false; then :
35387  $as_echo_n "(cached) " >&6
35388else
35389  case $STRIP in
35390  [\\/]* | ?:[\\/]*)
35391  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35392  ;;
35393  *)
35394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35395for as_dir in $PATH
35396do
35397  IFS=$as_save_IFS
35398  test -z "$as_dir" && as_dir=.
35399    for ac_exec_ext in '' $ac_executable_extensions; do
35400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35401    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35403    break 2
35404  fi
35405done
35406  done
35407IFS=$as_save_IFS
35408
35409  ;;
35410esac
35411fi
35412STRIP=$ac_cv_path_STRIP
35413if test -n "$STRIP"; then
35414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35415$as_echo "$STRIP" >&6; }
35416else
35417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35418$as_echo "no" >&6; }
35419fi
35420
35421
35422  test -n "$STRIP" && break
35423done
35424
35425    else
35426      # If it succeeded, then it was overridden by the user. We will use it
35427      # for the tool.
35428
35429      # First remove it from the list of overridden variables, so we can test
35430      # for unknown variables in the end.
35431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35432
35433      # Check if the provided tool contains a complete path.
35434      tool_specified="$STRIP"
35435      tool_basename="${tool_specified##*/}"
35436      if test "x$tool_basename" = "x$tool_specified"; then
35437        # A command without a complete path is provided, search $PATH.
35438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35439$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35440        # Extract the first word of "$tool_basename", so it can be a program name with args.
35441set dummy $tool_basename; ac_word=$2
35442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35443$as_echo_n "checking for $ac_word... " >&6; }
35444if ${ac_cv_path_STRIP+:} false; then :
35445  $as_echo_n "(cached) " >&6
35446else
35447  case $STRIP in
35448  [\\/]* | ?:[\\/]*)
35449  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35450  ;;
35451  *)
35452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35453for as_dir in $PATH
35454do
35455  IFS=$as_save_IFS
35456  test -z "$as_dir" && as_dir=.
35457    for ac_exec_ext in '' $ac_executable_extensions; do
35458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35459    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35461    break 2
35462  fi
35463done
35464  done
35465IFS=$as_save_IFS
35466
35467  ;;
35468esac
35469fi
35470STRIP=$ac_cv_path_STRIP
35471if test -n "$STRIP"; then
35472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35473$as_echo "$STRIP" >&6; }
35474else
35475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35476$as_echo "no" >&6; }
35477fi
35478
35479
35480        if test "x$STRIP" = x; then
35481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35482        fi
35483      else
35484        # Otherwise we believe it is a complete path. Use it as it is.
35485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35486$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35488$as_echo_n "checking for STRIP... " >&6; }
35489        if test ! -x "$tool_specified"; then
35490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35491$as_echo "not found" >&6; }
35492          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35493        fi
35494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35495$as_echo "$tool_specified" >&6; }
35496      fi
35497    fi
35498  fi
35499
35500
35501
35502  # Only process if variable expands to non-empty
35503
35504  if test "x$STRIP" != x; then
35505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35506
35507  # First separate the path from the arguments. This will split at the first
35508  # space.
35509  complete="$STRIP"
35510  path="${complete%% *}"
35511  tmp="$complete EOL"
35512  arguments="${tmp#* }"
35513
35514  # Input might be given as Windows format, start by converting to
35515  # unix format.
35516  new_path=`$CYGPATH -u "$path"`
35517
35518  # Now try to locate executable using which
35519  new_path=`$WHICH "$new_path" 2> /dev/null`
35520  # bat and cmd files are not always considered executable in cygwin causing which
35521  # to not find them
35522  if test "x$new_path" = x \
35523      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35524      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35525    new_path=`$CYGPATH -u "$path"`
35526  fi
35527  if test "x$new_path" = x; then
35528    # Oops. Which didn't find the executable.
35529    # The splitting of arguments from the executable at a space might have been incorrect,
35530    # since paths with space are more likely in Windows. Give it another try with the whole
35531    # argument.
35532    path="$complete"
35533    arguments="EOL"
35534    new_path=`$CYGPATH -u "$path"`
35535    new_path=`$WHICH "$new_path" 2> /dev/null`
35536    # bat and cmd files are not always considered executable in cygwin causing which
35537    # to not find them
35538    if test "x$new_path" = x \
35539        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35540        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35541      new_path=`$CYGPATH -u "$path"`
35542    fi
35543    if test "x$new_path" = x; then
35544      # It's still not found. Now this is an unrecoverable error.
35545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35546$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35547      has_space=`$ECHO "$complete" | $GREP " "`
35548      if test "x$has_space" != x; then
35549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35551      fi
35552      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35553    fi
35554  fi
35555
35556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35559  # "foo.exe" is OK but "foo" is an error.
35560  #
35561  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35562  # It is also a way to make sure we got the proper file name for the real test later on.
35563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35564  if test "x$test_shortpath" = x; then
35565    # Short path failed, file does not exist as specified.
35566    # Try adding .exe or .cmd
35567    if test -f "${new_path}.exe"; then
35568      input_to_shortpath="${new_path}.exe"
35569    elif test -f "${new_path}.cmd"; then
35570      input_to_shortpath="${new_path}.cmd"
35571    else
35572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35573$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35574      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35575$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35576      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35577    fi
35578  else
35579    input_to_shortpath="$new_path"
35580  fi
35581
35582  # Call helper function which possibly converts this using DOS-style short mode.
35583  # If so, the updated path is stored in $new_path.
35584  new_path="$input_to_shortpath"
35585
35586  input_path="$input_to_shortpath"
35587  # Check if we need to convert this using DOS-style short mode. If the path
35588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35589  # take no chances and rewrite it.
35590  # Note: m4 eats our [], so we need to use [ and ] instead.
35591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35592  if test "x$has_forbidden_chars" != x; then
35593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35597      # Going to short mode and back again did indeed matter. Since short mode is
35598      # case insensitive, let's make it lowercase to improve readability.
35599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35600      # Now convert it back to Unix-style (cygpath)
35601      input_path=`$CYGPATH -u "$shortmode_path"`
35602      new_path="$input_path"
35603    fi
35604  fi
35605
35606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35607  if test "x$test_cygdrive_prefix" = x; then
35608    # As a simple fix, exclude /usr/bin since it's not a real path.
35609    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35611      # a path prefixed by /cygdrive for fixpath to work.
35612      new_path="$CYGWIN_ROOT_PATH$input_path"
35613    fi
35614  fi
35615
35616  # remove trailing .exe if any
35617  new_path="${new_path/%.exe/}"
35618
35619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35620
35621  # First separate the path from the arguments. This will split at the first
35622  # space.
35623  complete="$STRIP"
35624  path="${complete%% *}"
35625  tmp="$complete EOL"
35626  arguments="${tmp#* }"
35627
35628  # Input might be given as Windows format, start by converting to
35629  # unix format.
35630  new_path="$path"
35631
35632  windows_path="$new_path"
35633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35634    unix_path=`$CYGPATH -u "$windows_path"`
35635    new_path="$unix_path"
35636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35638    new_path="$unix_path"
35639  fi
35640
35641
35642  # Now try to locate executable using which
35643  new_path=`$WHICH "$new_path" 2> /dev/null`
35644
35645  if test "x$new_path" = x; then
35646    # Oops. Which didn't find the executable.
35647    # The splitting of arguments from the executable at a space might have been incorrect,
35648    # since paths with space are more likely in Windows. Give it another try with the whole
35649    # argument.
35650    path="$complete"
35651    arguments="EOL"
35652    new_path="$path"
35653
35654  windows_path="$new_path"
35655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35656    unix_path=`$CYGPATH -u "$windows_path"`
35657    new_path="$unix_path"
35658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35660    new_path="$unix_path"
35661  fi
35662
35663
35664    new_path=`$WHICH "$new_path" 2> /dev/null`
35665    # bat and cmd files are not always considered executable in MSYS causing which
35666    # to not find them
35667    if test "x$new_path" = x \
35668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35670      new_path="$path"
35671
35672  windows_path="$new_path"
35673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35674    unix_path=`$CYGPATH -u "$windows_path"`
35675    new_path="$unix_path"
35676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35678    new_path="$unix_path"
35679  fi
35680
35681    fi
35682
35683    if test "x$new_path" = x; then
35684      # It's still not found. Now this is an unrecoverable error.
35685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35686$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35687      has_space=`$ECHO "$complete" | $GREP " "`
35688      if test "x$has_space" != x; then
35689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35691      fi
35692      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35693    fi
35694  fi
35695
35696  # Now new_path has a complete unix path to the binary
35697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35698    # Keep paths in /bin as-is, but remove trailing .exe if any
35699    new_path="${new_path/%.exe/}"
35700    # Do not save /bin paths to all_fixpath_prefixes!
35701  else
35702    # Not in mixed or Windows style, start by that.
35703    new_path=`cmd //c echo $new_path`
35704
35705  input_path="$new_path"
35706  # Check if we need to convert this using DOS-style short mode. If the path
35707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35708  # take no chances and rewrite it.
35709  # Note: m4 eats our [], so we need to use [ and ] instead.
35710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35711  if test "x$has_forbidden_chars" != x; then
35712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35714  fi
35715
35716    # Output is in $new_path
35717
35718  windows_path="$new_path"
35719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35720    unix_path=`$CYGPATH -u "$windows_path"`
35721    new_path="$unix_path"
35722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35724    new_path="$unix_path"
35725  fi
35726
35727    # remove trailing .exe if any
35728    new_path="${new_path/%.exe/}"
35729
35730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35732  fi
35733
35734    else
35735      # We're on a unix platform. Hooray! :)
35736      # First separate the path from the arguments. This will split at the first
35737      # space.
35738      complete="$STRIP"
35739      path="${complete%% *}"
35740      tmp="$complete EOL"
35741      arguments="${tmp#* }"
35742
35743      # Cannot rely on the command "which" here since it doesn't always work.
35744      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35745      if test -z "$is_absolute_path"; then
35746        # Path to executable is not absolute. Find it.
35747        IFS_save="$IFS"
35748        IFS=:
35749        for p in $PATH; do
35750          if test -f "$p/$path" && test -x "$p/$path"; then
35751            new_path="$p/$path"
35752            break
35753          fi
35754        done
35755        IFS="$IFS_save"
35756      else
35757        # This is an absolute path, we can use it without further modifications.
35758        new_path="$path"
35759      fi
35760
35761      if test "x$new_path" = x; then
35762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35763$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35764        has_space=`$ECHO "$complete" | $GREP " "`
35765        if test "x$has_space" != x; then
35766          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35767$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35768        fi
35769        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35770      fi
35771    fi
35772
35773    # Now join together the path and the arguments once again
35774    if test "x$arguments" != xEOL; then
35775      new_complete="$new_path ${arguments% *}"
35776    else
35777      new_complete="$new_path"
35778    fi
35779
35780    if test "x$complete" != "x$new_complete"; then
35781      STRIP="$new_complete"
35782      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35783$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35784    fi
35785  fi
35786
35787
35788
35789  # Publish this variable in the help.
35790
35791
35792  if test "x$NM" = x; then
35793    # The variable is not set by user, try to locate tool using the code snippet
35794    for ac_prog in nm
35795do
35796  # Extract the first word of "$ac_prog", so it can be a program name with args.
35797set dummy $ac_prog; ac_word=$2
35798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35799$as_echo_n "checking for $ac_word... " >&6; }
35800if ${ac_cv_path_NM+:} false; then :
35801  $as_echo_n "(cached) " >&6
35802else
35803  case $NM in
35804  [\\/]* | ?:[\\/]*)
35805  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35806  ;;
35807  *)
35808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35809for as_dir in $PATH
35810do
35811  IFS=$as_save_IFS
35812  test -z "$as_dir" && as_dir=.
35813    for ac_exec_ext in '' $ac_executable_extensions; do
35814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35815    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35817    break 2
35818  fi
35819done
35820  done
35821IFS=$as_save_IFS
35822
35823  ;;
35824esac
35825fi
35826NM=$ac_cv_path_NM
35827if test -n "$NM"; then
35828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35829$as_echo "$NM" >&6; }
35830else
35831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35832$as_echo "no" >&6; }
35833fi
35834
35835
35836  test -n "$NM" && break
35837done
35838
35839  else
35840    # The variable is set, but is it from the command line or the environment?
35841
35842    # Try to remove the string !NM! from our list.
35843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35845      # If it failed, the variable was not from the command line. Ignore it,
35846      # but warn the user (except for BASH, which is always set by the calling BASH).
35847      if test "xNM" != xBASH; then
35848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35849$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35850      fi
35851      # Try to locate tool using the code snippet
35852      for ac_prog in nm
35853do
35854  # Extract the first word of "$ac_prog", so it can be a program name with args.
35855set dummy $ac_prog; ac_word=$2
35856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35857$as_echo_n "checking for $ac_word... " >&6; }
35858if ${ac_cv_path_NM+:} false; then :
35859  $as_echo_n "(cached) " >&6
35860else
35861  case $NM in
35862  [\\/]* | ?:[\\/]*)
35863  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35864  ;;
35865  *)
35866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35867for as_dir in $PATH
35868do
35869  IFS=$as_save_IFS
35870  test -z "$as_dir" && as_dir=.
35871    for ac_exec_ext in '' $ac_executable_extensions; do
35872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35873    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35875    break 2
35876  fi
35877done
35878  done
35879IFS=$as_save_IFS
35880
35881  ;;
35882esac
35883fi
35884NM=$ac_cv_path_NM
35885if test -n "$NM"; then
35886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35887$as_echo "$NM" >&6; }
35888else
35889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35890$as_echo "no" >&6; }
35891fi
35892
35893
35894  test -n "$NM" && break
35895done
35896
35897    else
35898      # If it succeeded, then it was overridden by the user. We will use it
35899      # for the tool.
35900
35901      # First remove it from the list of overridden variables, so we can test
35902      # for unknown variables in the end.
35903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35904
35905      # Check if the provided tool contains a complete path.
35906      tool_specified="$NM"
35907      tool_basename="${tool_specified##*/}"
35908      if test "x$tool_basename" = "x$tool_specified"; then
35909        # A command without a complete path is provided, search $PATH.
35910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35911$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35912        # Extract the first word of "$tool_basename", so it can be a program name with args.
35913set dummy $tool_basename; ac_word=$2
35914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35915$as_echo_n "checking for $ac_word... " >&6; }
35916if ${ac_cv_path_NM+:} false; then :
35917  $as_echo_n "(cached) " >&6
35918else
35919  case $NM in
35920  [\\/]* | ?:[\\/]*)
35921  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35922  ;;
35923  *)
35924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35925for as_dir in $PATH
35926do
35927  IFS=$as_save_IFS
35928  test -z "$as_dir" && as_dir=.
35929    for ac_exec_ext in '' $ac_executable_extensions; do
35930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35931    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35933    break 2
35934  fi
35935done
35936  done
35937IFS=$as_save_IFS
35938
35939  ;;
35940esac
35941fi
35942NM=$ac_cv_path_NM
35943if test -n "$NM"; then
35944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35945$as_echo "$NM" >&6; }
35946else
35947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35948$as_echo "no" >&6; }
35949fi
35950
35951
35952        if test "x$NM" = x; then
35953          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35954        fi
35955      else
35956        # Otherwise we believe it is a complete path. Use it as it is.
35957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35958$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35960$as_echo_n "checking for NM... " >&6; }
35961        if test ! -x "$tool_specified"; then
35962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35963$as_echo "not found" >&6; }
35964          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35965        fi
35966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35967$as_echo "$tool_specified" >&6; }
35968      fi
35969    fi
35970  fi
35971
35972
35973
35974  # Only process if variable expands to non-empty
35975
35976  if test "x$NM" != x; then
35977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35978
35979  # First separate the path from the arguments. This will split at the first
35980  # space.
35981  complete="$NM"
35982  path="${complete%% *}"
35983  tmp="$complete EOL"
35984  arguments="${tmp#* }"
35985
35986  # Input might be given as Windows format, start by converting to
35987  # unix format.
35988  new_path=`$CYGPATH -u "$path"`
35989
35990  # Now try to locate executable using which
35991  new_path=`$WHICH "$new_path" 2> /dev/null`
35992  # bat and cmd files are not always considered executable in cygwin causing which
35993  # to not find them
35994  if test "x$new_path" = x \
35995      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35996      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35997    new_path=`$CYGPATH -u "$path"`
35998  fi
35999  if test "x$new_path" = x; then
36000    # Oops. Which didn't find the executable.
36001    # The splitting of arguments from the executable at a space might have been incorrect,
36002    # since paths with space are more likely in Windows. Give it another try with the whole
36003    # argument.
36004    path="$complete"
36005    arguments="EOL"
36006    new_path=`$CYGPATH -u "$path"`
36007    new_path=`$WHICH "$new_path" 2> /dev/null`
36008    # bat and cmd files are not always considered executable in cygwin causing which
36009    # to not find them
36010    if test "x$new_path" = x \
36011        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36012        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36013      new_path=`$CYGPATH -u "$path"`
36014    fi
36015    if test "x$new_path" = x; then
36016      # It's still not found. Now this is an unrecoverable error.
36017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36018$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36019      has_space=`$ECHO "$complete" | $GREP " "`
36020      if test "x$has_space" != x; then
36021        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36022$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36023      fi
36024      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36025    fi
36026  fi
36027
36028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36031  # "foo.exe" is OK but "foo" is an error.
36032  #
36033  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36034  # It is also a way to make sure we got the proper file name for the real test later on.
36035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36036  if test "x$test_shortpath" = x; then
36037    # Short path failed, file does not exist as specified.
36038    # Try adding .exe or .cmd
36039    if test -f "${new_path}.exe"; then
36040      input_to_shortpath="${new_path}.exe"
36041    elif test -f "${new_path}.cmd"; then
36042      input_to_shortpath="${new_path}.cmd"
36043    else
36044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36045$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36046      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36047$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36048      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36049    fi
36050  else
36051    input_to_shortpath="$new_path"
36052  fi
36053
36054  # Call helper function which possibly converts this using DOS-style short mode.
36055  # If so, the updated path is stored in $new_path.
36056  new_path="$input_to_shortpath"
36057
36058  input_path="$input_to_shortpath"
36059  # Check if we need to convert this using DOS-style short mode. If the path
36060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36061  # take no chances and rewrite it.
36062  # Note: m4 eats our [], so we need to use [ and ] instead.
36063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36064  if test "x$has_forbidden_chars" != x; then
36065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36069      # Going to short mode and back again did indeed matter. Since short mode is
36070      # case insensitive, let's make it lowercase to improve readability.
36071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36072      # Now convert it back to Unix-style (cygpath)
36073      input_path=`$CYGPATH -u "$shortmode_path"`
36074      new_path="$input_path"
36075    fi
36076  fi
36077
36078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36079  if test "x$test_cygdrive_prefix" = x; then
36080    # As a simple fix, exclude /usr/bin since it's not a real path.
36081    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36083      # a path prefixed by /cygdrive for fixpath to work.
36084      new_path="$CYGWIN_ROOT_PATH$input_path"
36085    fi
36086  fi
36087
36088  # remove trailing .exe if any
36089  new_path="${new_path/%.exe/}"
36090
36091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36092
36093  # First separate the path from the arguments. This will split at the first
36094  # space.
36095  complete="$NM"
36096  path="${complete%% *}"
36097  tmp="$complete EOL"
36098  arguments="${tmp#* }"
36099
36100  # Input might be given as Windows format, start by converting to
36101  # unix format.
36102  new_path="$path"
36103
36104  windows_path="$new_path"
36105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36106    unix_path=`$CYGPATH -u "$windows_path"`
36107    new_path="$unix_path"
36108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36110    new_path="$unix_path"
36111  fi
36112
36113
36114  # Now try to locate executable using which
36115  new_path=`$WHICH "$new_path" 2> /dev/null`
36116
36117  if test "x$new_path" = x; then
36118    # Oops. Which didn't find the executable.
36119    # The splitting of arguments from the executable at a space might have been incorrect,
36120    # since paths with space are more likely in Windows. Give it another try with the whole
36121    # argument.
36122    path="$complete"
36123    arguments="EOL"
36124    new_path="$path"
36125
36126  windows_path="$new_path"
36127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36128    unix_path=`$CYGPATH -u "$windows_path"`
36129    new_path="$unix_path"
36130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36132    new_path="$unix_path"
36133  fi
36134
36135
36136    new_path=`$WHICH "$new_path" 2> /dev/null`
36137    # bat and cmd files are not always considered executable in MSYS causing which
36138    # to not find them
36139    if test "x$new_path" = x \
36140        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36141        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36142      new_path="$path"
36143
36144  windows_path="$new_path"
36145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36146    unix_path=`$CYGPATH -u "$windows_path"`
36147    new_path="$unix_path"
36148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36150    new_path="$unix_path"
36151  fi
36152
36153    fi
36154
36155    if test "x$new_path" = x; then
36156      # It's still not found. Now this is an unrecoverable error.
36157      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36158$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36159      has_space=`$ECHO "$complete" | $GREP " "`
36160      if test "x$has_space" != x; then
36161        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36162$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36163      fi
36164      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36165    fi
36166  fi
36167
36168  # Now new_path has a complete unix path to the binary
36169  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36170    # Keep paths in /bin as-is, but remove trailing .exe if any
36171    new_path="${new_path/%.exe/}"
36172    # Do not save /bin paths to all_fixpath_prefixes!
36173  else
36174    # Not in mixed or Windows style, start by that.
36175    new_path=`cmd //c echo $new_path`
36176
36177  input_path="$new_path"
36178  # Check if we need to convert this using DOS-style short mode. If the path
36179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36180  # take no chances and rewrite it.
36181  # Note: m4 eats our [], so we need to use [ and ] instead.
36182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36183  if test "x$has_forbidden_chars" != x; then
36184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36186  fi
36187
36188    # Output is in $new_path
36189
36190  windows_path="$new_path"
36191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36192    unix_path=`$CYGPATH -u "$windows_path"`
36193    new_path="$unix_path"
36194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36196    new_path="$unix_path"
36197  fi
36198
36199    # remove trailing .exe if any
36200    new_path="${new_path/%.exe/}"
36201
36202    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36203    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36204  fi
36205
36206    else
36207      # We're on a unix platform. Hooray! :)
36208      # First separate the path from the arguments. This will split at the first
36209      # space.
36210      complete="$NM"
36211      path="${complete%% *}"
36212      tmp="$complete EOL"
36213      arguments="${tmp#* }"
36214
36215      # Cannot rely on the command "which" here since it doesn't always work.
36216      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36217      if test -z "$is_absolute_path"; then
36218        # Path to executable is not absolute. Find it.
36219        IFS_save="$IFS"
36220        IFS=:
36221        for p in $PATH; do
36222          if test -f "$p/$path" && test -x "$p/$path"; then
36223            new_path="$p/$path"
36224            break
36225          fi
36226        done
36227        IFS="$IFS_save"
36228      else
36229        # This is an absolute path, we can use it without further modifications.
36230        new_path="$path"
36231      fi
36232
36233      if test "x$new_path" = x; then
36234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36235$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36236        has_space=`$ECHO "$complete" | $GREP " "`
36237        if test "x$has_space" != x; then
36238          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36239$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36240        fi
36241        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36242      fi
36243    fi
36244
36245    # Now join together the path and the arguments once again
36246    if test "x$arguments" != xEOL; then
36247      new_complete="$new_path ${arguments% *}"
36248    else
36249      new_complete="$new_path"
36250    fi
36251
36252    if test "x$complete" != "x$new_complete"; then
36253      NM="$new_complete"
36254      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36255$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36256    fi
36257  fi
36258
36259
36260
36261  # Publish this variable in the help.
36262
36263
36264  if test "x$GNM" = x; then
36265    # The variable is not set by user, try to locate tool using the code snippet
36266    for ac_prog in gnm
36267do
36268  # Extract the first word of "$ac_prog", so it can be a program name with args.
36269set dummy $ac_prog; ac_word=$2
36270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36271$as_echo_n "checking for $ac_word... " >&6; }
36272if ${ac_cv_path_GNM+:} false; then :
36273  $as_echo_n "(cached) " >&6
36274else
36275  case $GNM in
36276  [\\/]* | ?:[\\/]*)
36277  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36278  ;;
36279  *)
36280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36281for as_dir in $PATH
36282do
36283  IFS=$as_save_IFS
36284  test -z "$as_dir" && as_dir=.
36285    for ac_exec_ext in '' $ac_executable_extensions; do
36286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36287    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36289    break 2
36290  fi
36291done
36292  done
36293IFS=$as_save_IFS
36294
36295  ;;
36296esac
36297fi
36298GNM=$ac_cv_path_GNM
36299if test -n "$GNM"; then
36300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36301$as_echo "$GNM" >&6; }
36302else
36303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36304$as_echo "no" >&6; }
36305fi
36306
36307
36308  test -n "$GNM" && break
36309done
36310
36311  else
36312    # The variable is set, but is it from the command line or the environment?
36313
36314    # Try to remove the string !GNM! from our list.
36315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36317      # If it failed, the variable was not from the command line. Ignore it,
36318      # but warn the user (except for BASH, which is always set by the calling BASH).
36319      if test "xGNM" != xBASH; then
36320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36321$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36322      fi
36323      # Try to locate tool using the code snippet
36324      for ac_prog in gnm
36325do
36326  # Extract the first word of "$ac_prog", so it can be a program name with args.
36327set dummy $ac_prog; ac_word=$2
36328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36329$as_echo_n "checking for $ac_word... " >&6; }
36330if ${ac_cv_path_GNM+:} false; then :
36331  $as_echo_n "(cached) " >&6
36332else
36333  case $GNM in
36334  [\\/]* | ?:[\\/]*)
36335  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36336  ;;
36337  *)
36338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36339for as_dir in $PATH
36340do
36341  IFS=$as_save_IFS
36342  test -z "$as_dir" && as_dir=.
36343    for ac_exec_ext in '' $ac_executable_extensions; do
36344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36345    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36347    break 2
36348  fi
36349done
36350  done
36351IFS=$as_save_IFS
36352
36353  ;;
36354esac
36355fi
36356GNM=$ac_cv_path_GNM
36357if test -n "$GNM"; then
36358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36359$as_echo "$GNM" >&6; }
36360else
36361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36362$as_echo "no" >&6; }
36363fi
36364
36365
36366  test -n "$GNM" && break
36367done
36368
36369    else
36370      # If it succeeded, then it was overridden by the user. We will use it
36371      # for the tool.
36372
36373      # First remove it from the list of overridden variables, so we can test
36374      # for unknown variables in the end.
36375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36376
36377      # Check if the provided tool contains a complete path.
36378      tool_specified="$GNM"
36379      tool_basename="${tool_specified##*/}"
36380      if test "x$tool_basename" = "x$tool_specified"; then
36381        # A command without a complete path is provided, search $PATH.
36382        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36383$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36384        # Extract the first word of "$tool_basename", so it can be a program name with args.
36385set dummy $tool_basename; ac_word=$2
36386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36387$as_echo_n "checking for $ac_word... " >&6; }
36388if ${ac_cv_path_GNM+:} false; then :
36389  $as_echo_n "(cached) " >&6
36390else
36391  case $GNM in
36392  [\\/]* | ?:[\\/]*)
36393  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36394  ;;
36395  *)
36396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36397for as_dir in $PATH
36398do
36399  IFS=$as_save_IFS
36400  test -z "$as_dir" && as_dir=.
36401    for ac_exec_ext in '' $ac_executable_extensions; do
36402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36403    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36405    break 2
36406  fi
36407done
36408  done
36409IFS=$as_save_IFS
36410
36411  ;;
36412esac
36413fi
36414GNM=$ac_cv_path_GNM
36415if test -n "$GNM"; then
36416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36417$as_echo "$GNM" >&6; }
36418else
36419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36420$as_echo "no" >&6; }
36421fi
36422
36423
36424        if test "x$GNM" = x; then
36425          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36426        fi
36427      else
36428        # Otherwise we believe it is a complete path. Use it as it is.
36429        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36430$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36432$as_echo_n "checking for GNM... " >&6; }
36433        if test ! -x "$tool_specified"; then
36434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36435$as_echo "not found" >&6; }
36436          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36437        fi
36438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36439$as_echo "$tool_specified" >&6; }
36440      fi
36441    fi
36442  fi
36443
36444
36445
36446  # Only process if variable expands to non-empty
36447
36448  if test "x$GNM" != x; then
36449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36450
36451  # First separate the path from the arguments. This will split at the first
36452  # space.
36453  complete="$GNM"
36454  path="${complete%% *}"
36455  tmp="$complete EOL"
36456  arguments="${tmp#* }"
36457
36458  # Input might be given as Windows format, start by converting to
36459  # unix format.
36460  new_path=`$CYGPATH -u "$path"`
36461
36462  # Now try to locate executable using which
36463  new_path=`$WHICH "$new_path" 2> /dev/null`
36464  # bat and cmd files are not always considered executable in cygwin causing which
36465  # to not find them
36466  if test "x$new_path" = x \
36467      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36468      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36469    new_path=`$CYGPATH -u "$path"`
36470  fi
36471  if test "x$new_path" = x; then
36472    # Oops. Which didn't find the executable.
36473    # The splitting of arguments from the executable at a space might have been incorrect,
36474    # since paths with space are more likely in Windows. Give it another try with the whole
36475    # argument.
36476    path="$complete"
36477    arguments="EOL"
36478    new_path=`$CYGPATH -u "$path"`
36479    new_path=`$WHICH "$new_path" 2> /dev/null`
36480    # bat and cmd files are not always considered executable in cygwin causing which
36481    # to not find them
36482    if test "x$new_path" = x \
36483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36485      new_path=`$CYGPATH -u "$path"`
36486    fi
36487    if test "x$new_path" = x; then
36488      # It's still not found. Now this is an unrecoverable error.
36489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36490$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36491      has_space=`$ECHO "$complete" | $GREP " "`
36492      if test "x$has_space" != x; then
36493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36495      fi
36496      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36497    fi
36498  fi
36499
36500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36503  # "foo.exe" is OK but "foo" is an error.
36504  #
36505  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36506  # It is also a way to make sure we got the proper file name for the real test later on.
36507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36508  if test "x$test_shortpath" = x; then
36509    # Short path failed, file does not exist as specified.
36510    # Try adding .exe or .cmd
36511    if test -f "${new_path}.exe"; then
36512      input_to_shortpath="${new_path}.exe"
36513    elif test -f "${new_path}.cmd"; then
36514      input_to_shortpath="${new_path}.cmd"
36515    else
36516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36517$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36520      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36521    fi
36522  else
36523    input_to_shortpath="$new_path"
36524  fi
36525
36526  # Call helper function which possibly converts this using DOS-style short mode.
36527  # If so, the updated path is stored in $new_path.
36528  new_path="$input_to_shortpath"
36529
36530  input_path="$input_to_shortpath"
36531  # Check if we need to convert this using DOS-style short mode. If the path
36532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36533  # take no chances and rewrite it.
36534  # Note: m4 eats our [], so we need to use [ and ] instead.
36535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36536  if test "x$has_forbidden_chars" != x; then
36537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36541      # Going to short mode and back again did indeed matter. Since short mode is
36542      # case insensitive, let's make it lowercase to improve readability.
36543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36544      # Now convert it back to Unix-style (cygpath)
36545      input_path=`$CYGPATH -u "$shortmode_path"`
36546      new_path="$input_path"
36547    fi
36548  fi
36549
36550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36551  if test "x$test_cygdrive_prefix" = x; then
36552    # As a simple fix, exclude /usr/bin since it's not a real path.
36553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36555      # a path prefixed by /cygdrive for fixpath to work.
36556      new_path="$CYGWIN_ROOT_PATH$input_path"
36557    fi
36558  fi
36559
36560  # remove trailing .exe if any
36561  new_path="${new_path/%.exe/}"
36562
36563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36564
36565  # First separate the path from the arguments. This will split at the first
36566  # space.
36567  complete="$GNM"
36568  path="${complete%% *}"
36569  tmp="$complete EOL"
36570  arguments="${tmp#* }"
36571
36572  # Input might be given as Windows format, start by converting to
36573  # unix format.
36574  new_path="$path"
36575
36576  windows_path="$new_path"
36577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36578    unix_path=`$CYGPATH -u "$windows_path"`
36579    new_path="$unix_path"
36580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36582    new_path="$unix_path"
36583  fi
36584
36585
36586  # Now try to locate executable using which
36587  new_path=`$WHICH "$new_path" 2> /dev/null`
36588
36589  if test "x$new_path" = x; then
36590    # Oops. Which didn't find the executable.
36591    # The splitting of arguments from the executable at a space might have been incorrect,
36592    # since paths with space are more likely in Windows. Give it another try with the whole
36593    # argument.
36594    path="$complete"
36595    arguments="EOL"
36596    new_path="$path"
36597
36598  windows_path="$new_path"
36599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36600    unix_path=`$CYGPATH -u "$windows_path"`
36601    new_path="$unix_path"
36602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36604    new_path="$unix_path"
36605  fi
36606
36607
36608    new_path=`$WHICH "$new_path" 2> /dev/null`
36609    # bat and cmd files are not always considered executable in MSYS causing which
36610    # to not find them
36611    if test "x$new_path" = x \
36612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36614      new_path="$path"
36615
36616  windows_path="$new_path"
36617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36618    unix_path=`$CYGPATH -u "$windows_path"`
36619    new_path="$unix_path"
36620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36622    new_path="$unix_path"
36623  fi
36624
36625    fi
36626
36627    if test "x$new_path" = x; then
36628      # It's still not found. Now this is an unrecoverable error.
36629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36630$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36631      has_space=`$ECHO "$complete" | $GREP " "`
36632      if test "x$has_space" != x; then
36633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36635      fi
36636      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36637    fi
36638  fi
36639
36640  # Now new_path has a complete unix path to the binary
36641  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36642    # Keep paths in /bin as-is, but remove trailing .exe if any
36643    new_path="${new_path/%.exe/}"
36644    # Do not save /bin paths to all_fixpath_prefixes!
36645  else
36646    # Not in mixed or Windows style, start by that.
36647    new_path=`cmd //c echo $new_path`
36648
36649  input_path="$new_path"
36650  # Check if we need to convert this using DOS-style short mode. If the path
36651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36652  # take no chances and rewrite it.
36653  # Note: m4 eats our [], so we need to use [ and ] instead.
36654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36655  if test "x$has_forbidden_chars" != x; then
36656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36658  fi
36659
36660    # Output is in $new_path
36661
36662  windows_path="$new_path"
36663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36664    unix_path=`$CYGPATH -u "$windows_path"`
36665    new_path="$unix_path"
36666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36668    new_path="$unix_path"
36669  fi
36670
36671    # remove trailing .exe if any
36672    new_path="${new_path/%.exe/}"
36673
36674    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36675    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36676  fi
36677
36678    else
36679      # We're on a unix platform. Hooray! :)
36680      # First separate the path from the arguments. This will split at the first
36681      # space.
36682      complete="$GNM"
36683      path="${complete%% *}"
36684      tmp="$complete EOL"
36685      arguments="${tmp#* }"
36686
36687      # Cannot rely on the command "which" here since it doesn't always work.
36688      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36689      if test -z "$is_absolute_path"; then
36690        # Path to executable is not absolute. Find it.
36691        IFS_save="$IFS"
36692        IFS=:
36693        for p in $PATH; do
36694          if test -f "$p/$path" && test -x "$p/$path"; then
36695            new_path="$p/$path"
36696            break
36697          fi
36698        done
36699        IFS="$IFS_save"
36700      else
36701        # This is an absolute path, we can use it without further modifications.
36702        new_path="$path"
36703      fi
36704
36705      if test "x$new_path" = x; then
36706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36707$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36708        has_space=`$ECHO "$complete" | $GREP " "`
36709        if test "x$has_space" != x; then
36710          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36711$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36712        fi
36713        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36714      fi
36715    fi
36716
36717    # Now join together the path and the arguments once again
36718    if test "x$arguments" != xEOL; then
36719      new_complete="$new_path ${arguments% *}"
36720    else
36721      new_complete="$new_path"
36722    fi
36723
36724    if test "x$complete" != "x$new_complete"; then
36725      GNM="$new_complete"
36726      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36727$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36728    fi
36729  fi
36730
36731  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36732    # FIXME: we should unify this with the solaris case above.
36733
36734
36735  # Publish this variable in the help.
36736
36737
36738  if test "x$STRIP" = x; then
36739    # The variable is not set by user, try to locate tool using the code snippet
36740    if test -n "$ac_tool_prefix"; then
36741  for ac_prog in strip
36742  do
36743    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36744set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36746$as_echo_n "checking for $ac_word... " >&6; }
36747if ${ac_cv_prog_STRIP+:} false; then :
36748  $as_echo_n "(cached) " >&6
36749else
36750  if test -n "$STRIP"; then
36751  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36752else
36753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36754for as_dir in $PATH
36755do
36756  IFS=$as_save_IFS
36757  test -z "$as_dir" && as_dir=.
36758    for ac_exec_ext in '' $ac_executable_extensions; do
36759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36760    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36762    break 2
36763  fi
36764done
36765  done
36766IFS=$as_save_IFS
36767
36768fi
36769fi
36770STRIP=$ac_cv_prog_STRIP
36771if test -n "$STRIP"; then
36772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36773$as_echo "$STRIP" >&6; }
36774else
36775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36776$as_echo "no" >&6; }
36777fi
36778
36779
36780    test -n "$STRIP" && break
36781  done
36782fi
36783if test -z "$STRIP"; then
36784  ac_ct_STRIP=$STRIP
36785  for ac_prog in strip
36786do
36787  # Extract the first word of "$ac_prog", so it can be a program name with args.
36788set dummy $ac_prog; ac_word=$2
36789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36790$as_echo_n "checking for $ac_word... " >&6; }
36791if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36792  $as_echo_n "(cached) " >&6
36793else
36794  if test -n "$ac_ct_STRIP"; then
36795  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36796else
36797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36798for as_dir in $PATH
36799do
36800  IFS=$as_save_IFS
36801  test -z "$as_dir" && as_dir=.
36802    for ac_exec_ext in '' $ac_executable_extensions; do
36803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36804    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36806    break 2
36807  fi
36808done
36809  done
36810IFS=$as_save_IFS
36811
36812fi
36813fi
36814ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36815if test -n "$ac_ct_STRIP"; then
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36817$as_echo "$ac_ct_STRIP" >&6; }
36818else
36819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36820$as_echo "no" >&6; }
36821fi
36822
36823
36824  test -n "$ac_ct_STRIP" && break
36825done
36826
36827  if test "x$ac_ct_STRIP" = x; then
36828    STRIP=""
36829  else
36830    case $cross_compiling:$ac_tool_warned in
36831yes:)
36832{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36833$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36834ac_tool_warned=yes ;;
36835esac
36836    STRIP=$ac_ct_STRIP
36837  fi
36838fi
36839
36840  else
36841    # The variable is set, but is it from the command line or the environment?
36842
36843    # Try to remove the string !STRIP! from our list.
36844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36846      # If it failed, the variable was not from the command line. Ignore it,
36847      # but warn the user (except for BASH, which is always set by the calling BASH).
36848      if test "xSTRIP" != xBASH; then
36849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36850$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36851      fi
36852      # Try to locate tool using the code snippet
36853      if test -n "$ac_tool_prefix"; then
36854  for ac_prog in strip
36855  do
36856    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36857set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36859$as_echo_n "checking for $ac_word... " >&6; }
36860if ${ac_cv_prog_STRIP+:} false; then :
36861  $as_echo_n "(cached) " >&6
36862else
36863  if test -n "$STRIP"; then
36864  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36865else
36866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36867for as_dir in $PATH
36868do
36869  IFS=$as_save_IFS
36870  test -z "$as_dir" && as_dir=.
36871    for ac_exec_ext in '' $ac_executable_extensions; do
36872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36873    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36875    break 2
36876  fi
36877done
36878  done
36879IFS=$as_save_IFS
36880
36881fi
36882fi
36883STRIP=$ac_cv_prog_STRIP
36884if test -n "$STRIP"; then
36885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36886$as_echo "$STRIP" >&6; }
36887else
36888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36889$as_echo "no" >&6; }
36890fi
36891
36892
36893    test -n "$STRIP" && break
36894  done
36895fi
36896if test -z "$STRIP"; then
36897  ac_ct_STRIP=$STRIP
36898  for ac_prog in strip
36899do
36900  # Extract the first word of "$ac_prog", so it can be a program name with args.
36901set dummy $ac_prog; ac_word=$2
36902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36903$as_echo_n "checking for $ac_word... " >&6; }
36904if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36905  $as_echo_n "(cached) " >&6
36906else
36907  if test -n "$ac_ct_STRIP"; then
36908  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36909else
36910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36911for as_dir in $PATH
36912do
36913  IFS=$as_save_IFS
36914  test -z "$as_dir" && as_dir=.
36915    for ac_exec_ext in '' $ac_executable_extensions; do
36916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36917    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36919    break 2
36920  fi
36921done
36922  done
36923IFS=$as_save_IFS
36924
36925fi
36926fi
36927ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36928if test -n "$ac_ct_STRIP"; then
36929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36930$as_echo "$ac_ct_STRIP" >&6; }
36931else
36932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36933$as_echo "no" >&6; }
36934fi
36935
36936
36937  test -n "$ac_ct_STRIP" && break
36938done
36939
36940  if test "x$ac_ct_STRIP" = x; then
36941    STRIP=""
36942  else
36943    case $cross_compiling:$ac_tool_warned in
36944yes:)
36945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36947ac_tool_warned=yes ;;
36948esac
36949    STRIP=$ac_ct_STRIP
36950  fi
36951fi
36952
36953    else
36954      # If it succeeded, then it was overridden by the user. We will use it
36955      # for the tool.
36956
36957      # First remove it from the list of overridden variables, so we can test
36958      # for unknown variables in the end.
36959      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36960
36961      # Check if the provided tool contains a complete path.
36962      tool_specified="$STRIP"
36963      tool_basename="${tool_specified##*/}"
36964      if test "x$tool_basename" = "x$tool_specified"; then
36965        # A command without a complete path is provided, search $PATH.
36966        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36967$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36968        # Extract the first word of "$tool_basename", so it can be a program name with args.
36969set dummy $tool_basename; ac_word=$2
36970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36971$as_echo_n "checking for $ac_word... " >&6; }
36972if ${ac_cv_path_STRIP+:} false; then :
36973  $as_echo_n "(cached) " >&6
36974else
36975  case $STRIP in
36976  [\\/]* | ?:[\\/]*)
36977  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36978  ;;
36979  *)
36980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36981for as_dir in $PATH
36982do
36983  IFS=$as_save_IFS
36984  test -z "$as_dir" && as_dir=.
36985    for ac_exec_ext in '' $ac_executable_extensions; do
36986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36987    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36989    break 2
36990  fi
36991done
36992  done
36993IFS=$as_save_IFS
36994
36995  ;;
36996esac
36997fi
36998STRIP=$ac_cv_path_STRIP
36999if test -n "$STRIP"; then
37000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37001$as_echo "$STRIP" >&6; }
37002else
37003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37004$as_echo "no" >&6; }
37005fi
37006
37007
37008        if test "x$STRIP" = x; then
37009          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37010        fi
37011      else
37012        # Otherwise we believe it is a complete path. Use it as it is.
37013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37014$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37016$as_echo_n "checking for STRIP... " >&6; }
37017        if test ! -x "$tool_specified"; then
37018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37019$as_echo "not found" >&6; }
37020          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37021        fi
37022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37023$as_echo "$tool_specified" >&6; }
37024      fi
37025    fi
37026  fi
37027
37028
37029
37030  # Only process if variable expands to non-empty
37031
37032  if test "x$STRIP" != x; then
37033    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37034
37035  # First separate the path from the arguments. This will split at the first
37036  # space.
37037  complete="$STRIP"
37038  path="${complete%% *}"
37039  tmp="$complete EOL"
37040  arguments="${tmp#* }"
37041
37042  # Input might be given as Windows format, start by converting to
37043  # unix format.
37044  new_path=`$CYGPATH -u "$path"`
37045
37046  # Now try to locate executable using which
37047  new_path=`$WHICH "$new_path" 2> /dev/null`
37048  # bat and cmd files are not always considered executable in cygwin causing which
37049  # to not find them
37050  if test "x$new_path" = x \
37051      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37052      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37053    new_path=`$CYGPATH -u "$path"`
37054  fi
37055  if test "x$new_path" = x; then
37056    # Oops. Which didn't find the executable.
37057    # The splitting of arguments from the executable at a space might have been incorrect,
37058    # since paths with space are more likely in Windows. Give it another try with the whole
37059    # argument.
37060    path="$complete"
37061    arguments="EOL"
37062    new_path=`$CYGPATH -u "$path"`
37063    new_path=`$WHICH "$new_path" 2> /dev/null`
37064    # bat and cmd files are not always considered executable in cygwin causing which
37065    # to not find them
37066    if test "x$new_path" = x \
37067        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37068        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37069      new_path=`$CYGPATH -u "$path"`
37070    fi
37071    if test "x$new_path" = x; then
37072      # It's still not found. Now this is an unrecoverable error.
37073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37074$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37075      has_space=`$ECHO "$complete" | $GREP " "`
37076      if test "x$has_space" != x; then
37077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37079      fi
37080      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37081    fi
37082  fi
37083
37084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37087  # "foo.exe" is OK but "foo" is an error.
37088  #
37089  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37090  # It is also a way to make sure we got the proper file name for the real test later on.
37091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37092  if test "x$test_shortpath" = x; then
37093    # Short path failed, file does not exist as specified.
37094    # Try adding .exe or .cmd
37095    if test -f "${new_path}.exe"; then
37096      input_to_shortpath="${new_path}.exe"
37097    elif test -f "${new_path}.cmd"; then
37098      input_to_shortpath="${new_path}.cmd"
37099    else
37100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37101$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37104      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37105    fi
37106  else
37107    input_to_shortpath="$new_path"
37108  fi
37109
37110  # Call helper function which possibly converts this using DOS-style short mode.
37111  # If so, the updated path is stored in $new_path.
37112  new_path="$input_to_shortpath"
37113
37114  input_path="$input_to_shortpath"
37115  # Check if we need to convert this using DOS-style short mode. If the path
37116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37117  # take no chances and rewrite it.
37118  # Note: m4 eats our [], so we need to use [ and ] instead.
37119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37120  if test "x$has_forbidden_chars" != x; then
37121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37125      # Going to short mode and back again did indeed matter. Since short mode is
37126      # case insensitive, let's make it lowercase to improve readability.
37127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37128      # Now convert it back to Unix-style (cygpath)
37129      input_path=`$CYGPATH -u "$shortmode_path"`
37130      new_path="$input_path"
37131    fi
37132  fi
37133
37134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37135  if test "x$test_cygdrive_prefix" = x; then
37136    # As a simple fix, exclude /usr/bin since it's not a real path.
37137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37139      # a path prefixed by /cygdrive for fixpath to work.
37140      new_path="$CYGWIN_ROOT_PATH$input_path"
37141    fi
37142  fi
37143
37144  # remove trailing .exe if any
37145  new_path="${new_path/%.exe/}"
37146
37147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37148
37149  # First separate the path from the arguments. This will split at the first
37150  # space.
37151  complete="$STRIP"
37152  path="${complete%% *}"
37153  tmp="$complete EOL"
37154  arguments="${tmp#* }"
37155
37156  # Input might be given as Windows format, start by converting to
37157  # unix format.
37158  new_path="$path"
37159
37160  windows_path="$new_path"
37161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37162    unix_path=`$CYGPATH -u "$windows_path"`
37163    new_path="$unix_path"
37164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37166    new_path="$unix_path"
37167  fi
37168
37169
37170  # Now try to locate executable using which
37171  new_path=`$WHICH "$new_path" 2> /dev/null`
37172
37173  if test "x$new_path" = x; then
37174    # Oops. Which didn't find the executable.
37175    # The splitting of arguments from the executable at a space might have been incorrect,
37176    # since paths with space are more likely in Windows. Give it another try with the whole
37177    # argument.
37178    path="$complete"
37179    arguments="EOL"
37180    new_path="$path"
37181
37182  windows_path="$new_path"
37183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37184    unix_path=`$CYGPATH -u "$windows_path"`
37185    new_path="$unix_path"
37186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37188    new_path="$unix_path"
37189  fi
37190
37191
37192    new_path=`$WHICH "$new_path" 2> /dev/null`
37193    # bat and cmd files are not always considered executable in MSYS causing which
37194    # to not find them
37195    if test "x$new_path" = x \
37196        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37197        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37198      new_path="$path"
37199
37200  windows_path="$new_path"
37201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37202    unix_path=`$CYGPATH -u "$windows_path"`
37203    new_path="$unix_path"
37204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37206    new_path="$unix_path"
37207  fi
37208
37209    fi
37210
37211    if test "x$new_path" = x; then
37212      # It's still not found. Now this is an unrecoverable error.
37213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37214$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37215      has_space=`$ECHO "$complete" | $GREP " "`
37216      if test "x$has_space" != x; then
37217        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37218$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37219      fi
37220      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37221    fi
37222  fi
37223
37224  # Now new_path has a complete unix path to the binary
37225  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37226    # Keep paths in /bin as-is, but remove trailing .exe if any
37227    new_path="${new_path/%.exe/}"
37228    # Do not save /bin paths to all_fixpath_prefixes!
37229  else
37230    # Not in mixed or Windows style, start by that.
37231    new_path=`cmd //c echo $new_path`
37232
37233  input_path="$new_path"
37234  # Check if we need to convert this using DOS-style short mode. If the path
37235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37236  # take no chances and rewrite it.
37237  # Note: m4 eats our [], so we need to use [ and ] instead.
37238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37239  if test "x$has_forbidden_chars" != x; then
37240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37242  fi
37243
37244    # Output is in $new_path
37245
37246  windows_path="$new_path"
37247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37248    unix_path=`$CYGPATH -u "$windows_path"`
37249    new_path="$unix_path"
37250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37252    new_path="$unix_path"
37253  fi
37254
37255    # remove trailing .exe if any
37256    new_path="${new_path/%.exe/}"
37257
37258    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37259    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37260  fi
37261
37262    else
37263      # We're on a unix platform. Hooray! :)
37264      # First separate the path from the arguments. This will split at the first
37265      # space.
37266      complete="$STRIP"
37267      path="${complete%% *}"
37268      tmp="$complete EOL"
37269      arguments="${tmp#* }"
37270
37271      # Cannot rely on the command "which" here since it doesn't always work.
37272      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37273      if test -z "$is_absolute_path"; then
37274        # Path to executable is not absolute. Find it.
37275        IFS_save="$IFS"
37276        IFS=:
37277        for p in $PATH; do
37278          if test -f "$p/$path" && test -x "$p/$path"; then
37279            new_path="$p/$path"
37280            break
37281          fi
37282        done
37283        IFS="$IFS_save"
37284      else
37285        # This is an absolute path, we can use it without further modifications.
37286        new_path="$path"
37287      fi
37288
37289      if test "x$new_path" = x; then
37290        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37291$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37292        has_space=`$ECHO "$complete" | $GREP " "`
37293        if test "x$has_space" != x; then
37294          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37295$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37296        fi
37297        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37298      fi
37299    fi
37300
37301    # Now join together the path and the arguments once again
37302    if test "x$arguments" != xEOL; then
37303      new_complete="$new_path ${arguments% *}"
37304    else
37305      new_complete="$new_path"
37306    fi
37307
37308    if test "x$complete" != "x$new_complete"; then
37309      STRIP="$new_complete"
37310      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37311$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37312    fi
37313  fi
37314
37315
37316
37317  # Publish this variable in the help.
37318
37319
37320  if test "x$NM" = x; then
37321    # The variable is not set by user, try to locate tool using the code snippet
37322    if test -n "$ac_tool_prefix"; then
37323  for ac_prog in nm
37324  do
37325    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37326set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37328$as_echo_n "checking for $ac_word... " >&6; }
37329if ${ac_cv_prog_NM+:} false; then :
37330  $as_echo_n "(cached) " >&6
37331else
37332  if test -n "$NM"; then
37333  ac_cv_prog_NM="$NM" # Let the user override the test.
37334else
37335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37336for as_dir in $PATH
37337do
37338  IFS=$as_save_IFS
37339  test -z "$as_dir" && as_dir=.
37340    for ac_exec_ext in '' $ac_executable_extensions; do
37341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37342    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37344    break 2
37345  fi
37346done
37347  done
37348IFS=$as_save_IFS
37349
37350fi
37351fi
37352NM=$ac_cv_prog_NM
37353if test -n "$NM"; then
37354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37355$as_echo "$NM" >&6; }
37356else
37357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37358$as_echo "no" >&6; }
37359fi
37360
37361
37362    test -n "$NM" && break
37363  done
37364fi
37365if test -z "$NM"; then
37366  ac_ct_NM=$NM
37367  for ac_prog in nm
37368do
37369  # Extract the first word of "$ac_prog", so it can be a program name with args.
37370set dummy $ac_prog; ac_word=$2
37371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37372$as_echo_n "checking for $ac_word... " >&6; }
37373if ${ac_cv_prog_ac_ct_NM+:} false; then :
37374  $as_echo_n "(cached) " >&6
37375else
37376  if test -n "$ac_ct_NM"; then
37377  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37378else
37379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37380for as_dir in $PATH
37381do
37382  IFS=$as_save_IFS
37383  test -z "$as_dir" && as_dir=.
37384    for ac_exec_ext in '' $ac_executable_extensions; do
37385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37386    ac_cv_prog_ac_ct_NM="$ac_prog"
37387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37388    break 2
37389  fi
37390done
37391  done
37392IFS=$as_save_IFS
37393
37394fi
37395fi
37396ac_ct_NM=$ac_cv_prog_ac_ct_NM
37397if test -n "$ac_ct_NM"; then
37398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37399$as_echo "$ac_ct_NM" >&6; }
37400else
37401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37402$as_echo "no" >&6; }
37403fi
37404
37405
37406  test -n "$ac_ct_NM" && break
37407done
37408
37409  if test "x$ac_ct_NM" = x; then
37410    NM=""
37411  else
37412    case $cross_compiling:$ac_tool_warned in
37413yes:)
37414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37416ac_tool_warned=yes ;;
37417esac
37418    NM=$ac_ct_NM
37419  fi
37420fi
37421
37422  else
37423    # The variable is set, but is it from the command line or the environment?
37424
37425    # Try to remove the string !NM! from our list.
37426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37428      # If it failed, the variable was not from the command line. Ignore it,
37429      # but warn the user (except for BASH, which is always set by the calling BASH).
37430      if test "xNM" != xBASH; then
37431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37432$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37433      fi
37434      # Try to locate tool using the code snippet
37435      if test -n "$ac_tool_prefix"; then
37436  for ac_prog in nm
37437  do
37438    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37439set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37441$as_echo_n "checking for $ac_word... " >&6; }
37442if ${ac_cv_prog_NM+:} false; then :
37443  $as_echo_n "(cached) " >&6
37444else
37445  if test -n "$NM"; then
37446  ac_cv_prog_NM="$NM" # Let the user override the test.
37447else
37448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37449for as_dir in $PATH
37450do
37451  IFS=$as_save_IFS
37452  test -z "$as_dir" && as_dir=.
37453    for ac_exec_ext in '' $ac_executable_extensions; do
37454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37455    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37457    break 2
37458  fi
37459done
37460  done
37461IFS=$as_save_IFS
37462
37463fi
37464fi
37465NM=$ac_cv_prog_NM
37466if test -n "$NM"; then
37467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37468$as_echo "$NM" >&6; }
37469else
37470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37471$as_echo "no" >&6; }
37472fi
37473
37474
37475    test -n "$NM" && break
37476  done
37477fi
37478if test -z "$NM"; then
37479  ac_ct_NM=$NM
37480  for ac_prog in nm
37481do
37482  # Extract the first word of "$ac_prog", so it can be a program name with args.
37483set dummy $ac_prog; ac_word=$2
37484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37485$as_echo_n "checking for $ac_word... " >&6; }
37486if ${ac_cv_prog_ac_ct_NM+:} false; then :
37487  $as_echo_n "(cached) " >&6
37488else
37489  if test -n "$ac_ct_NM"; then
37490  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37491else
37492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37493for as_dir in $PATH
37494do
37495  IFS=$as_save_IFS
37496  test -z "$as_dir" && as_dir=.
37497    for ac_exec_ext in '' $ac_executable_extensions; do
37498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37499    ac_cv_prog_ac_ct_NM="$ac_prog"
37500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37501    break 2
37502  fi
37503done
37504  done
37505IFS=$as_save_IFS
37506
37507fi
37508fi
37509ac_ct_NM=$ac_cv_prog_ac_ct_NM
37510if test -n "$ac_ct_NM"; then
37511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37512$as_echo "$ac_ct_NM" >&6; }
37513else
37514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37515$as_echo "no" >&6; }
37516fi
37517
37518
37519  test -n "$ac_ct_NM" && break
37520done
37521
37522  if test "x$ac_ct_NM" = x; then
37523    NM=""
37524  else
37525    case $cross_compiling:$ac_tool_warned in
37526yes:)
37527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37529ac_tool_warned=yes ;;
37530esac
37531    NM=$ac_ct_NM
37532  fi
37533fi
37534
37535    else
37536      # If it succeeded, then it was overridden by the user. We will use it
37537      # for the tool.
37538
37539      # First remove it from the list of overridden variables, so we can test
37540      # for unknown variables in the end.
37541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37542
37543      # Check if the provided tool contains a complete path.
37544      tool_specified="$NM"
37545      tool_basename="${tool_specified##*/}"
37546      if test "x$tool_basename" = "x$tool_specified"; then
37547        # A command without a complete path is provided, search $PATH.
37548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37549$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37550        # Extract the first word of "$tool_basename", so it can be a program name with args.
37551set dummy $tool_basename; ac_word=$2
37552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37553$as_echo_n "checking for $ac_word... " >&6; }
37554if ${ac_cv_path_NM+:} false; then :
37555  $as_echo_n "(cached) " >&6
37556else
37557  case $NM in
37558  [\\/]* | ?:[\\/]*)
37559  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37560  ;;
37561  *)
37562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37563for as_dir in $PATH
37564do
37565  IFS=$as_save_IFS
37566  test -z "$as_dir" && as_dir=.
37567    for ac_exec_ext in '' $ac_executable_extensions; do
37568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37569    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37571    break 2
37572  fi
37573done
37574  done
37575IFS=$as_save_IFS
37576
37577  ;;
37578esac
37579fi
37580NM=$ac_cv_path_NM
37581if test -n "$NM"; then
37582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37583$as_echo "$NM" >&6; }
37584else
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37586$as_echo "no" >&6; }
37587fi
37588
37589
37590        if test "x$NM" = x; then
37591          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37592        fi
37593      else
37594        # Otherwise we believe it is a complete path. Use it as it is.
37595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37596$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37598$as_echo_n "checking for NM... " >&6; }
37599        if test ! -x "$tool_specified"; then
37600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37601$as_echo "not found" >&6; }
37602          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37603        fi
37604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37605$as_echo "$tool_specified" >&6; }
37606      fi
37607    fi
37608  fi
37609
37610
37611
37612  # Only process if variable expands to non-empty
37613
37614  if test "x$NM" != x; then
37615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37616
37617  # First separate the path from the arguments. This will split at the first
37618  # space.
37619  complete="$NM"
37620  path="${complete%% *}"
37621  tmp="$complete EOL"
37622  arguments="${tmp#* }"
37623
37624  # Input might be given as Windows format, start by converting to
37625  # unix format.
37626  new_path=`$CYGPATH -u "$path"`
37627
37628  # Now try to locate executable using which
37629  new_path=`$WHICH "$new_path" 2> /dev/null`
37630  # bat and cmd files are not always considered executable in cygwin causing which
37631  # to not find them
37632  if test "x$new_path" = x \
37633      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37634      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37635    new_path=`$CYGPATH -u "$path"`
37636  fi
37637  if test "x$new_path" = x; then
37638    # Oops. Which didn't find the executable.
37639    # The splitting of arguments from the executable at a space might have been incorrect,
37640    # since paths with space are more likely in Windows. Give it another try with the whole
37641    # argument.
37642    path="$complete"
37643    arguments="EOL"
37644    new_path=`$CYGPATH -u "$path"`
37645    new_path=`$WHICH "$new_path" 2> /dev/null`
37646    # bat and cmd files are not always considered executable in cygwin causing which
37647    # to not find them
37648    if test "x$new_path" = x \
37649        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37650        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37651      new_path=`$CYGPATH -u "$path"`
37652    fi
37653    if test "x$new_path" = x; then
37654      # It's still not found. Now this is an unrecoverable error.
37655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37656$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37657      has_space=`$ECHO "$complete" | $GREP " "`
37658      if test "x$has_space" != x; then
37659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37661      fi
37662      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37663    fi
37664  fi
37665
37666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37669  # "foo.exe" is OK but "foo" is an error.
37670  #
37671  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37672  # It is also a way to make sure we got the proper file name for the real test later on.
37673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37674  if test "x$test_shortpath" = x; then
37675    # Short path failed, file does not exist as specified.
37676    # Try adding .exe or .cmd
37677    if test -f "${new_path}.exe"; then
37678      input_to_shortpath="${new_path}.exe"
37679    elif test -f "${new_path}.cmd"; then
37680      input_to_shortpath="${new_path}.cmd"
37681    else
37682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37683$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37686      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37687    fi
37688  else
37689    input_to_shortpath="$new_path"
37690  fi
37691
37692  # Call helper function which possibly converts this using DOS-style short mode.
37693  # If so, the updated path is stored in $new_path.
37694  new_path="$input_to_shortpath"
37695
37696  input_path="$input_to_shortpath"
37697  # Check if we need to convert this using DOS-style short mode. If the path
37698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37699  # take no chances and rewrite it.
37700  # Note: m4 eats our [], so we need to use [ and ] instead.
37701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37702  if test "x$has_forbidden_chars" != x; then
37703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37707      # Going to short mode and back again did indeed matter. Since short mode is
37708      # case insensitive, let's make it lowercase to improve readability.
37709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37710      # Now convert it back to Unix-style (cygpath)
37711      input_path=`$CYGPATH -u "$shortmode_path"`
37712      new_path="$input_path"
37713    fi
37714  fi
37715
37716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37717  if test "x$test_cygdrive_prefix" = x; then
37718    # As a simple fix, exclude /usr/bin since it's not a real path.
37719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37721      # a path prefixed by /cygdrive for fixpath to work.
37722      new_path="$CYGWIN_ROOT_PATH$input_path"
37723    fi
37724  fi
37725
37726  # remove trailing .exe if any
37727  new_path="${new_path/%.exe/}"
37728
37729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37730
37731  # First separate the path from the arguments. This will split at the first
37732  # space.
37733  complete="$NM"
37734  path="${complete%% *}"
37735  tmp="$complete EOL"
37736  arguments="${tmp#* }"
37737
37738  # Input might be given as Windows format, start by converting to
37739  # unix format.
37740  new_path="$path"
37741
37742  windows_path="$new_path"
37743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37744    unix_path=`$CYGPATH -u "$windows_path"`
37745    new_path="$unix_path"
37746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37748    new_path="$unix_path"
37749  fi
37750
37751
37752  # Now try to locate executable using which
37753  new_path=`$WHICH "$new_path" 2> /dev/null`
37754
37755  if test "x$new_path" = x; then
37756    # Oops. Which didn't find the executable.
37757    # The splitting of arguments from the executable at a space might have been incorrect,
37758    # since paths with space are more likely in Windows. Give it another try with the whole
37759    # argument.
37760    path="$complete"
37761    arguments="EOL"
37762    new_path="$path"
37763
37764  windows_path="$new_path"
37765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37766    unix_path=`$CYGPATH -u "$windows_path"`
37767    new_path="$unix_path"
37768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37770    new_path="$unix_path"
37771  fi
37772
37773
37774    new_path=`$WHICH "$new_path" 2> /dev/null`
37775    # bat and cmd files are not always considered executable in MSYS causing which
37776    # to not find them
37777    if test "x$new_path" = x \
37778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37780      new_path="$path"
37781
37782  windows_path="$new_path"
37783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37784    unix_path=`$CYGPATH -u "$windows_path"`
37785    new_path="$unix_path"
37786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37788    new_path="$unix_path"
37789  fi
37790
37791    fi
37792
37793    if test "x$new_path" = x; then
37794      # It's still not found. Now this is an unrecoverable error.
37795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37796$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37797      has_space=`$ECHO "$complete" | $GREP " "`
37798      if test "x$has_space" != x; then
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37801      fi
37802      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37803    fi
37804  fi
37805
37806  # Now new_path has a complete unix path to the binary
37807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37808    # Keep paths in /bin as-is, but remove trailing .exe if any
37809    new_path="${new_path/%.exe/}"
37810    # Do not save /bin paths to all_fixpath_prefixes!
37811  else
37812    # Not in mixed or Windows style, start by that.
37813    new_path=`cmd //c echo $new_path`
37814
37815  input_path="$new_path"
37816  # Check if we need to convert this using DOS-style short mode. If the path
37817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37818  # take no chances and rewrite it.
37819  # Note: m4 eats our [], so we need to use [ and ] instead.
37820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37821  if test "x$has_forbidden_chars" != x; then
37822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37824  fi
37825
37826    # Output is in $new_path
37827
37828  windows_path="$new_path"
37829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37830    unix_path=`$CYGPATH -u "$windows_path"`
37831    new_path="$unix_path"
37832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37834    new_path="$unix_path"
37835  fi
37836
37837    # remove trailing .exe if any
37838    new_path="${new_path/%.exe/}"
37839
37840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37842  fi
37843
37844    else
37845      # We're on a unix platform. Hooray! :)
37846      # First separate the path from the arguments. This will split at the first
37847      # space.
37848      complete="$NM"
37849      path="${complete%% *}"
37850      tmp="$complete EOL"
37851      arguments="${tmp#* }"
37852
37853      # Cannot rely on the command "which" here since it doesn't always work.
37854      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37855      if test -z "$is_absolute_path"; then
37856        # Path to executable is not absolute. Find it.
37857        IFS_save="$IFS"
37858        IFS=:
37859        for p in $PATH; do
37860          if test -f "$p/$path" && test -x "$p/$path"; then
37861            new_path="$p/$path"
37862            break
37863          fi
37864        done
37865        IFS="$IFS_save"
37866      else
37867        # This is an absolute path, we can use it without further modifications.
37868        new_path="$path"
37869      fi
37870
37871      if test "x$new_path" = x; then
37872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37873$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37874        has_space=`$ECHO "$complete" | $GREP " "`
37875        if test "x$has_space" != x; then
37876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37878        fi
37879        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37880      fi
37881    fi
37882
37883    # Now join together the path and the arguments once again
37884    if test "x$arguments" != xEOL; then
37885      new_complete="$new_path ${arguments% *}"
37886    else
37887      new_complete="$new_path"
37888    fi
37889
37890    if test "x$complete" != "x$new_complete"; then
37891      NM="$new_complete"
37892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37893$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37894    fi
37895  fi
37896
37897    GNM="$NM"
37898
37899  fi
37900
37901  # objcopy is used for moving debug symbols to separate files when
37902  # full debug symbols are enabled.
37903  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37904
37905
37906  # Publish this variable in the help.
37907
37908
37909  if test "x$OBJCOPY" = x; then
37910    # The variable is not set by user, try to locate tool using the code snippet
37911    if test -n "$ac_tool_prefix"; then
37912  for ac_prog in gobjcopy objcopy
37913  do
37914    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37915set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37917$as_echo_n "checking for $ac_word... " >&6; }
37918if ${ac_cv_prog_OBJCOPY+:} false; then :
37919  $as_echo_n "(cached) " >&6
37920else
37921  if test -n "$OBJCOPY"; then
37922  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37923else
37924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37925for as_dir in $PATH
37926do
37927  IFS=$as_save_IFS
37928  test -z "$as_dir" && as_dir=.
37929    for ac_exec_ext in '' $ac_executable_extensions; do
37930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37931    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37933    break 2
37934  fi
37935done
37936  done
37937IFS=$as_save_IFS
37938
37939fi
37940fi
37941OBJCOPY=$ac_cv_prog_OBJCOPY
37942if test -n "$OBJCOPY"; then
37943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37944$as_echo "$OBJCOPY" >&6; }
37945else
37946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37947$as_echo "no" >&6; }
37948fi
37949
37950
37951    test -n "$OBJCOPY" && break
37952  done
37953fi
37954if test -z "$OBJCOPY"; then
37955  ac_ct_OBJCOPY=$OBJCOPY
37956  for ac_prog in gobjcopy objcopy
37957do
37958  # Extract the first word of "$ac_prog", so it can be a program name with args.
37959set dummy $ac_prog; ac_word=$2
37960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37961$as_echo_n "checking for $ac_word... " >&6; }
37962if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37963  $as_echo_n "(cached) " >&6
37964else
37965  if test -n "$ac_ct_OBJCOPY"; then
37966  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37967else
37968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37969for as_dir in $PATH
37970do
37971  IFS=$as_save_IFS
37972  test -z "$as_dir" && as_dir=.
37973    for ac_exec_ext in '' $ac_executable_extensions; do
37974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37975    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37977    break 2
37978  fi
37979done
37980  done
37981IFS=$as_save_IFS
37982
37983fi
37984fi
37985ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37986if test -n "$ac_ct_OBJCOPY"; then
37987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37988$as_echo "$ac_ct_OBJCOPY" >&6; }
37989else
37990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37991$as_echo "no" >&6; }
37992fi
37993
37994
37995  test -n "$ac_ct_OBJCOPY" && break
37996done
37997
37998  if test "x$ac_ct_OBJCOPY" = x; then
37999    OBJCOPY=""
38000  else
38001    case $cross_compiling:$ac_tool_warned in
38002yes:)
38003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38005ac_tool_warned=yes ;;
38006esac
38007    OBJCOPY=$ac_ct_OBJCOPY
38008  fi
38009fi
38010
38011  else
38012    # The variable is set, but is it from the command line or the environment?
38013
38014    # Try to remove the string !OBJCOPY! from our list.
38015    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38016    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38017      # If it failed, the variable was not from the command line. Ignore it,
38018      # but warn the user (except for BASH, which is always set by the calling BASH).
38019      if test "xOBJCOPY" != xBASH; then
38020        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38021$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38022      fi
38023      # Try to locate tool using the code snippet
38024      if test -n "$ac_tool_prefix"; then
38025  for ac_prog in gobjcopy objcopy
38026  do
38027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38030$as_echo_n "checking for $ac_word... " >&6; }
38031if ${ac_cv_prog_OBJCOPY+:} false; then :
38032  $as_echo_n "(cached) " >&6
38033else
38034  if test -n "$OBJCOPY"; then
38035  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38036else
38037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38038for as_dir in $PATH
38039do
38040  IFS=$as_save_IFS
38041  test -z "$as_dir" && as_dir=.
38042    for ac_exec_ext in '' $ac_executable_extensions; do
38043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38044    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38046    break 2
38047  fi
38048done
38049  done
38050IFS=$as_save_IFS
38051
38052fi
38053fi
38054OBJCOPY=$ac_cv_prog_OBJCOPY
38055if test -n "$OBJCOPY"; then
38056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38057$as_echo "$OBJCOPY" >&6; }
38058else
38059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38060$as_echo "no" >&6; }
38061fi
38062
38063
38064    test -n "$OBJCOPY" && break
38065  done
38066fi
38067if test -z "$OBJCOPY"; then
38068  ac_ct_OBJCOPY=$OBJCOPY
38069  for ac_prog in gobjcopy objcopy
38070do
38071  # Extract the first word of "$ac_prog", so it can be a program name with args.
38072set dummy $ac_prog; ac_word=$2
38073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38074$as_echo_n "checking for $ac_word... " >&6; }
38075if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38076  $as_echo_n "(cached) " >&6
38077else
38078  if test -n "$ac_ct_OBJCOPY"; then
38079  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38080else
38081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38082for as_dir in $PATH
38083do
38084  IFS=$as_save_IFS
38085  test -z "$as_dir" && as_dir=.
38086    for ac_exec_ext in '' $ac_executable_extensions; do
38087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38088    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38090    break 2
38091  fi
38092done
38093  done
38094IFS=$as_save_IFS
38095
38096fi
38097fi
38098ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38099if test -n "$ac_ct_OBJCOPY"; then
38100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38101$as_echo "$ac_ct_OBJCOPY" >&6; }
38102else
38103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38104$as_echo "no" >&6; }
38105fi
38106
38107
38108  test -n "$ac_ct_OBJCOPY" && break
38109done
38110
38111  if test "x$ac_ct_OBJCOPY" = x; then
38112    OBJCOPY=""
38113  else
38114    case $cross_compiling:$ac_tool_warned in
38115yes:)
38116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38118ac_tool_warned=yes ;;
38119esac
38120    OBJCOPY=$ac_ct_OBJCOPY
38121  fi
38122fi
38123
38124    else
38125      # If it succeeded, then it was overridden by the user. We will use it
38126      # for the tool.
38127
38128      # First remove it from the list of overridden variables, so we can test
38129      # for unknown variables in the end.
38130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38131
38132      # Check if the provided tool contains a complete path.
38133      tool_specified="$OBJCOPY"
38134      tool_basename="${tool_specified##*/}"
38135      if test "x$tool_basename" = "x$tool_specified"; then
38136        # A command without a complete path is provided, search $PATH.
38137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38138$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38139        # Extract the first word of "$tool_basename", so it can be a program name with args.
38140set dummy $tool_basename; ac_word=$2
38141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38142$as_echo_n "checking for $ac_word... " >&6; }
38143if ${ac_cv_path_OBJCOPY+:} false; then :
38144  $as_echo_n "(cached) " >&6
38145else
38146  case $OBJCOPY in
38147  [\\/]* | ?:[\\/]*)
38148  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38149  ;;
38150  *)
38151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38152for as_dir in $PATH
38153do
38154  IFS=$as_save_IFS
38155  test -z "$as_dir" && as_dir=.
38156    for ac_exec_ext in '' $ac_executable_extensions; do
38157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38158    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38160    break 2
38161  fi
38162done
38163  done
38164IFS=$as_save_IFS
38165
38166  ;;
38167esac
38168fi
38169OBJCOPY=$ac_cv_path_OBJCOPY
38170if test -n "$OBJCOPY"; then
38171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38172$as_echo "$OBJCOPY" >&6; }
38173else
38174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38175$as_echo "no" >&6; }
38176fi
38177
38178
38179        if test "x$OBJCOPY" = x; then
38180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38181        fi
38182      else
38183        # Otherwise we believe it is a complete path. Use it as it is.
38184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38185$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38187$as_echo_n "checking for OBJCOPY... " >&6; }
38188        if test ! -x "$tool_specified"; then
38189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38190$as_echo "not found" >&6; }
38191          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38192        fi
38193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38194$as_echo "$tool_specified" >&6; }
38195      fi
38196    fi
38197  fi
38198
38199
38200    # Only call fixup if objcopy was found.
38201    if test -n "$OBJCOPY"; then
38202
38203  # Only process if variable expands to non-empty
38204
38205  if test "x$OBJCOPY" != x; then
38206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38207
38208  # First separate the path from the arguments. This will split at the first
38209  # space.
38210  complete="$OBJCOPY"
38211  path="${complete%% *}"
38212  tmp="$complete EOL"
38213  arguments="${tmp#* }"
38214
38215  # Input might be given as Windows format, start by converting to
38216  # unix format.
38217  new_path=`$CYGPATH -u "$path"`
38218
38219  # Now try to locate executable using which
38220  new_path=`$WHICH "$new_path" 2> /dev/null`
38221  # bat and cmd files are not always considered executable in cygwin causing which
38222  # to not find them
38223  if test "x$new_path" = x \
38224      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38225      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38226    new_path=`$CYGPATH -u "$path"`
38227  fi
38228  if test "x$new_path" = x; then
38229    # Oops. Which didn't find the executable.
38230    # The splitting of arguments from the executable at a space might have been incorrect,
38231    # since paths with space are more likely in Windows. Give it another try with the whole
38232    # argument.
38233    path="$complete"
38234    arguments="EOL"
38235    new_path=`$CYGPATH -u "$path"`
38236    new_path=`$WHICH "$new_path" 2> /dev/null`
38237    # bat and cmd files are not always considered executable in cygwin causing which
38238    # to not find them
38239    if test "x$new_path" = x \
38240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38242      new_path=`$CYGPATH -u "$path"`
38243    fi
38244    if test "x$new_path" = x; then
38245      # It's still not found. Now this is an unrecoverable error.
38246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38247$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38248      has_space=`$ECHO "$complete" | $GREP " "`
38249      if test "x$has_space" != x; then
38250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38252      fi
38253      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38254    fi
38255  fi
38256
38257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38260  # "foo.exe" is OK but "foo" is an error.
38261  #
38262  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38263  # It is also a way to make sure we got the proper file name for the real test later on.
38264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38265  if test "x$test_shortpath" = x; then
38266    # Short path failed, file does not exist as specified.
38267    # Try adding .exe or .cmd
38268    if test -f "${new_path}.exe"; then
38269      input_to_shortpath="${new_path}.exe"
38270    elif test -f "${new_path}.cmd"; then
38271      input_to_shortpath="${new_path}.cmd"
38272    else
38273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38274$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38277      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38278    fi
38279  else
38280    input_to_shortpath="$new_path"
38281  fi
38282
38283  # Call helper function which possibly converts this using DOS-style short mode.
38284  # If so, the updated path is stored in $new_path.
38285  new_path="$input_to_shortpath"
38286
38287  input_path="$input_to_shortpath"
38288  # Check if we need to convert this using DOS-style short mode. If the path
38289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38290  # take no chances and rewrite it.
38291  # Note: m4 eats our [], so we need to use [ and ] instead.
38292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38293  if test "x$has_forbidden_chars" != x; then
38294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38298      # Going to short mode and back again did indeed matter. Since short mode is
38299      # case insensitive, let's make it lowercase to improve readability.
38300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38301      # Now convert it back to Unix-style (cygpath)
38302      input_path=`$CYGPATH -u "$shortmode_path"`
38303      new_path="$input_path"
38304    fi
38305  fi
38306
38307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38308  if test "x$test_cygdrive_prefix" = x; then
38309    # As a simple fix, exclude /usr/bin since it's not a real path.
38310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38312      # a path prefixed by /cygdrive for fixpath to work.
38313      new_path="$CYGWIN_ROOT_PATH$input_path"
38314    fi
38315  fi
38316
38317  # remove trailing .exe if any
38318  new_path="${new_path/%.exe/}"
38319
38320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38321
38322  # First separate the path from the arguments. This will split at the first
38323  # space.
38324  complete="$OBJCOPY"
38325  path="${complete%% *}"
38326  tmp="$complete EOL"
38327  arguments="${tmp#* }"
38328
38329  # Input might be given as Windows format, start by converting to
38330  # unix format.
38331  new_path="$path"
38332
38333  windows_path="$new_path"
38334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38335    unix_path=`$CYGPATH -u "$windows_path"`
38336    new_path="$unix_path"
38337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38339    new_path="$unix_path"
38340  fi
38341
38342
38343  # Now try to locate executable using which
38344  new_path=`$WHICH "$new_path" 2> /dev/null`
38345
38346  if test "x$new_path" = x; then
38347    # Oops. Which didn't find the executable.
38348    # The splitting of arguments from the executable at a space might have been incorrect,
38349    # since paths with space are more likely in Windows. Give it another try with the whole
38350    # argument.
38351    path="$complete"
38352    arguments="EOL"
38353    new_path="$path"
38354
38355  windows_path="$new_path"
38356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38357    unix_path=`$CYGPATH -u "$windows_path"`
38358    new_path="$unix_path"
38359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38361    new_path="$unix_path"
38362  fi
38363
38364
38365    new_path=`$WHICH "$new_path" 2> /dev/null`
38366    # bat and cmd files are not always considered executable in MSYS causing which
38367    # to not find them
38368    if test "x$new_path" = x \
38369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38371      new_path="$path"
38372
38373  windows_path="$new_path"
38374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38375    unix_path=`$CYGPATH -u "$windows_path"`
38376    new_path="$unix_path"
38377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38379    new_path="$unix_path"
38380  fi
38381
38382    fi
38383
38384    if test "x$new_path" = x; then
38385      # It's still not found. Now this is an unrecoverable error.
38386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38387$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38388      has_space=`$ECHO "$complete" | $GREP " "`
38389      if test "x$has_space" != x; then
38390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38392      fi
38393      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38394    fi
38395  fi
38396
38397  # Now new_path has a complete unix path to the binary
38398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38399    # Keep paths in /bin as-is, but remove trailing .exe if any
38400    new_path="${new_path/%.exe/}"
38401    # Do not save /bin paths to all_fixpath_prefixes!
38402  else
38403    # Not in mixed or Windows style, start by that.
38404    new_path=`cmd //c echo $new_path`
38405
38406  input_path="$new_path"
38407  # Check if we need to convert this using DOS-style short mode. If the path
38408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38409  # take no chances and rewrite it.
38410  # Note: m4 eats our [], so we need to use [ and ] instead.
38411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38412  if test "x$has_forbidden_chars" != x; then
38413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38415  fi
38416
38417    # Output is in $new_path
38418
38419  windows_path="$new_path"
38420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38421    unix_path=`$CYGPATH -u "$windows_path"`
38422    new_path="$unix_path"
38423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38425    new_path="$unix_path"
38426  fi
38427
38428    # remove trailing .exe if any
38429    new_path="${new_path/%.exe/}"
38430
38431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38433  fi
38434
38435    else
38436      # We're on a unix platform. Hooray! :)
38437      # First separate the path from the arguments. This will split at the first
38438      # space.
38439      complete="$OBJCOPY"
38440      path="${complete%% *}"
38441      tmp="$complete EOL"
38442      arguments="${tmp#* }"
38443
38444      # Cannot rely on the command "which" here since it doesn't always work.
38445      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38446      if test -z "$is_absolute_path"; then
38447        # Path to executable is not absolute. Find it.
38448        IFS_save="$IFS"
38449        IFS=:
38450        for p in $PATH; do
38451          if test -f "$p/$path" && test -x "$p/$path"; then
38452            new_path="$p/$path"
38453            break
38454          fi
38455        done
38456        IFS="$IFS_save"
38457      else
38458        # This is an absolute path, we can use it without further modifications.
38459        new_path="$path"
38460      fi
38461
38462      if test "x$new_path" = x; then
38463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38464$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38465        has_space=`$ECHO "$complete" | $GREP " "`
38466        if test "x$has_space" != x; then
38467          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38468$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38469        fi
38470        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38471      fi
38472    fi
38473
38474    # Now join together the path and the arguments once again
38475    if test "x$arguments" != xEOL; then
38476      new_complete="$new_path ${arguments% *}"
38477    else
38478      new_complete="$new_path"
38479    fi
38480
38481    if test "x$complete" != "x$new_complete"; then
38482      OBJCOPY="$new_complete"
38483      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38484$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38485    fi
38486  fi
38487
38488      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38489        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38490        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38491        # - version number is last blank separate word on first line
38492        # - version number formats that have been seen:
38493        #   - <major>.<minor>
38494        #   - <major>.<minor>.<micro>
38495        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38496        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38497         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38498              -e 's/.* //' \
38499              -e '/^[01]\./b bad' \
38500              -e '/^2\./{' \
38501              -e '  s/^2\.//' \
38502              -e '  /^[0-9]$/b bad' \
38503              -e '  /^[0-9]\./b bad' \
38504              -e '  /^1[0-9]$/b bad' \
38505              -e '  /^1[0-9]\./b bad' \
38506              -e '  /^20\./b bad' \
38507              -e '  /^21\.0$/b bad' \
38508              -e '  /^21\.0\./b bad' \
38509              -e '}' \
38510              -e ':good' \
38511              -e 's/.*/VALID_VERSION/p' \
38512              -e 'q' \
38513              -e ':bad' \
38514              -e 's/.*/BAD_VERSION/p' \
38515              -e 'q'`
38516        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38517          OBJCOPY=
38518          { $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
38519$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38520          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38521$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38522          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38523$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38524          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38525$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38526          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38527$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38528        fi
38529      fi
38530    fi
38531  fi
38532
38533
38534
38535  # Publish this variable in the help.
38536
38537
38538  if test "x$OBJDUMP" = x; then
38539    # The variable is not set by user, try to locate tool using the code snippet
38540    if test -n "$ac_tool_prefix"; then
38541  for ac_prog in gobjdump objdump
38542  do
38543    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38544set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38546$as_echo_n "checking for $ac_word... " >&6; }
38547if ${ac_cv_prog_OBJDUMP+:} false; then :
38548  $as_echo_n "(cached) " >&6
38549else
38550  if test -n "$OBJDUMP"; then
38551  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38552else
38553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38554for as_dir in $PATH
38555do
38556  IFS=$as_save_IFS
38557  test -z "$as_dir" && as_dir=.
38558    for ac_exec_ext in '' $ac_executable_extensions; do
38559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38560    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38562    break 2
38563  fi
38564done
38565  done
38566IFS=$as_save_IFS
38567
38568fi
38569fi
38570OBJDUMP=$ac_cv_prog_OBJDUMP
38571if test -n "$OBJDUMP"; then
38572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38573$as_echo "$OBJDUMP" >&6; }
38574else
38575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38576$as_echo "no" >&6; }
38577fi
38578
38579
38580    test -n "$OBJDUMP" && break
38581  done
38582fi
38583if test -z "$OBJDUMP"; then
38584  ac_ct_OBJDUMP=$OBJDUMP
38585  for ac_prog in gobjdump objdump
38586do
38587  # Extract the first word of "$ac_prog", so it can be a program name with args.
38588set dummy $ac_prog; ac_word=$2
38589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38590$as_echo_n "checking for $ac_word... " >&6; }
38591if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38592  $as_echo_n "(cached) " >&6
38593else
38594  if test -n "$ac_ct_OBJDUMP"; then
38595  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38596else
38597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38598for as_dir in $PATH
38599do
38600  IFS=$as_save_IFS
38601  test -z "$as_dir" && as_dir=.
38602    for ac_exec_ext in '' $ac_executable_extensions; do
38603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38604    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38606    break 2
38607  fi
38608done
38609  done
38610IFS=$as_save_IFS
38611
38612fi
38613fi
38614ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38615if test -n "$ac_ct_OBJDUMP"; then
38616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38617$as_echo "$ac_ct_OBJDUMP" >&6; }
38618else
38619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38620$as_echo "no" >&6; }
38621fi
38622
38623
38624  test -n "$ac_ct_OBJDUMP" && break
38625done
38626
38627  if test "x$ac_ct_OBJDUMP" = x; then
38628    OBJDUMP=""
38629  else
38630    case $cross_compiling:$ac_tool_warned in
38631yes:)
38632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38634ac_tool_warned=yes ;;
38635esac
38636    OBJDUMP=$ac_ct_OBJDUMP
38637  fi
38638fi
38639
38640  else
38641    # The variable is set, but is it from the command line or the environment?
38642
38643    # Try to remove the string !OBJDUMP! from our list.
38644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38646      # If it failed, the variable was not from the command line. Ignore it,
38647      # but warn the user (except for BASH, which is always set by the calling BASH).
38648      if test "xOBJDUMP" != xBASH; then
38649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38650$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38651      fi
38652      # Try to locate tool using the code snippet
38653      if test -n "$ac_tool_prefix"; then
38654  for ac_prog in gobjdump objdump
38655  do
38656    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38657set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38659$as_echo_n "checking for $ac_word... " >&6; }
38660if ${ac_cv_prog_OBJDUMP+:} false; then :
38661  $as_echo_n "(cached) " >&6
38662else
38663  if test -n "$OBJDUMP"; then
38664  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38665else
38666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38667for as_dir in $PATH
38668do
38669  IFS=$as_save_IFS
38670  test -z "$as_dir" && as_dir=.
38671    for ac_exec_ext in '' $ac_executable_extensions; do
38672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38673    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38675    break 2
38676  fi
38677done
38678  done
38679IFS=$as_save_IFS
38680
38681fi
38682fi
38683OBJDUMP=$ac_cv_prog_OBJDUMP
38684if test -n "$OBJDUMP"; then
38685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38686$as_echo "$OBJDUMP" >&6; }
38687else
38688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38689$as_echo "no" >&6; }
38690fi
38691
38692
38693    test -n "$OBJDUMP" && break
38694  done
38695fi
38696if test -z "$OBJDUMP"; then
38697  ac_ct_OBJDUMP=$OBJDUMP
38698  for ac_prog in gobjdump objdump
38699do
38700  # Extract the first word of "$ac_prog", so it can be a program name with args.
38701set dummy $ac_prog; ac_word=$2
38702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38703$as_echo_n "checking for $ac_word... " >&6; }
38704if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38705  $as_echo_n "(cached) " >&6
38706else
38707  if test -n "$ac_ct_OBJDUMP"; then
38708  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38709else
38710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38711for as_dir in $PATH
38712do
38713  IFS=$as_save_IFS
38714  test -z "$as_dir" && as_dir=.
38715    for ac_exec_ext in '' $ac_executable_extensions; do
38716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38717    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38719    break 2
38720  fi
38721done
38722  done
38723IFS=$as_save_IFS
38724
38725fi
38726fi
38727ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38728if test -n "$ac_ct_OBJDUMP"; then
38729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38730$as_echo "$ac_ct_OBJDUMP" >&6; }
38731else
38732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38733$as_echo "no" >&6; }
38734fi
38735
38736
38737  test -n "$ac_ct_OBJDUMP" && break
38738done
38739
38740  if test "x$ac_ct_OBJDUMP" = x; then
38741    OBJDUMP=""
38742  else
38743    case $cross_compiling:$ac_tool_warned in
38744yes:)
38745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38747ac_tool_warned=yes ;;
38748esac
38749    OBJDUMP=$ac_ct_OBJDUMP
38750  fi
38751fi
38752
38753    else
38754      # If it succeeded, then it was overridden by the user. We will use it
38755      # for the tool.
38756
38757      # First remove it from the list of overridden variables, so we can test
38758      # for unknown variables in the end.
38759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38760
38761      # Check if the provided tool contains a complete path.
38762      tool_specified="$OBJDUMP"
38763      tool_basename="${tool_specified##*/}"
38764      if test "x$tool_basename" = "x$tool_specified"; then
38765        # A command without a complete path is provided, search $PATH.
38766        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38767$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38768        # Extract the first word of "$tool_basename", so it can be a program name with args.
38769set dummy $tool_basename; ac_word=$2
38770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38771$as_echo_n "checking for $ac_word... " >&6; }
38772if ${ac_cv_path_OBJDUMP+:} false; then :
38773  $as_echo_n "(cached) " >&6
38774else
38775  case $OBJDUMP in
38776  [\\/]* | ?:[\\/]*)
38777  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38778  ;;
38779  *)
38780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38781for as_dir in $PATH
38782do
38783  IFS=$as_save_IFS
38784  test -z "$as_dir" && as_dir=.
38785    for ac_exec_ext in '' $ac_executable_extensions; do
38786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38787    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38789    break 2
38790  fi
38791done
38792  done
38793IFS=$as_save_IFS
38794
38795  ;;
38796esac
38797fi
38798OBJDUMP=$ac_cv_path_OBJDUMP
38799if test -n "$OBJDUMP"; then
38800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38801$as_echo "$OBJDUMP" >&6; }
38802else
38803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38804$as_echo "no" >&6; }
38805fi
38806
38807
38808        if test "x$OBJDUMP" = x; then
38809          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38810        fi
38811      else
38812        # Otherwise we believe it is a complete path. Use it as it is.
38813        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38814$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38815        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38816$as_echo_n "checking for OBJDUMP... " >&6; }
38817        if test ! -x "$tool_specified"; then
38818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38819$as_echo "not found" >&6; }
38820          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38821        fi
38822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38823$as_echo "$tool_specified" >&6; }
38824      fi
38825    fi
38826  fi
38827
38828
38829  if test "x$OBJDUMP" != x; then
38830    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38831    # bails if argument is missing.
38832
38833  # Only process if variable expands to non-empty
38834
38835  if test "x$OBJDUMP" != x; then
38836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38837
38838  # First separate the path from the arguments. This will split at the first
38839  # space.
38840  complete="$OBJDUMP"
38841  path="${complete%% *}"
38842  tmp="$complete EOL"
38843  arguments="${tmp#* }"
38844
38845  # Input might be given as Windows format, start by converting to
38846  # unix format.
38847  new_path=`$CYGPATH -u "$path"`
38848
38849  # Now try to locate executable using which
38850  new_path=`$WHICH "$new_path" 2> /dev/null`
38851  # bat and cmd files are not always considered executable in cygwin causing which
38852  # to not find them
38853  if test "x$new_path" = x \
38854      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38855      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38856    new_path=`$CYGPATH -u "$path"`
38857  fi
38858  if test "x$new_path" = x; then
38859    # Oops. Which didn't find the executable.
38860    # The splitting of arguments from the executable at a space might have been incorrect,
38861    # since paths with space are more likely in Windows. Give it another try with the whole
38862    # argument.
38863    path="$complete"
38864    arguments="EOL"
38865    new_path=`$CYGPATH -u "$path"`
38866    new_path=`$WHICH "$new_path" 2> /dev/null`
38867    # bat and cmd files are not always considered executable in cygwin causing which
38868    # to not find them
38869    if test "x$new_path" = x \
38870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38872      new_path=`$CYGPATH -u "$path"`
38873    fi
38874    if test "x$new_path" = x; then
38875      # It's still not found. Now this is an unrecoverable error.
38876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38877$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38878      has_space=`$ECHO "$complete" | $GREP " "`
38879      if test "x$has_space" != x; then
38880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38882      fi
38883      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38884    fi
38885  fi
38886
38887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38890  # "foo.exe" is OK but "foo" is an error.
38891  #
38892  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38893  # It is also a way to make sure we got the proper file name for the real test later on.
38894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38895  if test "x$test_shortpath" = x; then
38896    # Short path failed, file does not exist as specified.
38897    # Try adding .exe or .cmd
38898    if test -f "${new_path}.exe"; then
38899      input_to_shortpath="${new_path}.exe"
38900    elif test -f "${new_path}.cmd"; then
38901      input_to_shortpath="${new_path}.cmd"
38902    else
38903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38904$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38907      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38908    fi
38909  else
38910    input_to_shortpath="$new_path"
38911  fi
38912
38913  # Call helper function which possibly converts this using DOS-style short mode.
38914  # If so, the updated path is stored in $new_path.
38915  new_path="$input_to_shortpath"
38916
38917  input_path="$input_to_shortpath"
38918  # Check if we need to convert this using DOS-style short mode. If the path
38919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38920  # take no chances and rewrite it.
38921  # Note: m4 eats our [], so we need to use [ and ] instead.
38922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38923  if test "x$has_forbidden_chars" != x; then
38924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38928      # Going to short mode and back again did indeed matter. Since short mode is
38929      # case insensitive, let's make it lowercase to improve readability.
38930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38931      # Now convert it back to Unix-style (cygpath)
38932      input_path=`$CYGPATH -u "$shortmode_path"`
38933      new_path="$input_path"
38934    fi
38935  fi
38936
38937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38938  if test "x$test_cygdrive_prefix" = x; then
38939    # As a simple fix, exclude /usr/bin since it's not a real path.
38940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38942      # a path prefixed by /cygdrive for fixpath to work.
38943      new_path="$CYGWIN_ROOT_PATH$input_path"
38944    fi
38945  fi
38946
38947  # remove trailing .exe if any
38948  new_path="${new_path/%.exe/}"
38949
38950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38951
38952  # First separate the path from the arguments. This will split at the first
38953  # space.
38954  complete="$OBJDUMP"
38955  path="${complete%% *}"
38956  tmp="$complete EOL"
38957  arguments="${tmp#* }"
38958
38959  # Input might be given as Windows format, start by converting to
38960  # unix format.
38961  new_path="$path"
38962
38963  windows_path="$new_path"
38964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38965    unix_path=`$CYGPATH -u "$windows_path"`
38966    new_path="$unix_path"
38967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38969    new_path="$unix_path"
38970  fi
38971
38972
38973  # Now try to locate executable using which
38974  new_path=`$WHICH "$new_path" 2> /dev/null`
38975
38976  if test "x$new_path" = x; then
38977    # Oops. Which didn't find the executable.
38978    # The splitting of arguments from the executable at a space might have been incorrect,
38979    # since paths with space are more likely in Windows. Give it another try with the whole
38980    # argument.
38981    path="$complete"
38982    arguments="EOL"
38983    new_path="$path"
38984
38985  windows_path="$new_path"
38986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38987    unix_path=`$CYGPATH -u "$windows_path"`
38988    new_path="$unix_path"
38989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38991    new_path="$unix_path"
38992  fi
38993
38994
38995    new_path=`$WHICH "$new_path" 2> /dev/null`
38996    # bat and cmd files are not always considered executable in MSYS causing which
38997    # to not find them
38998    if test "x$new_path" = x \
38999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39001      new_path="$path"
39002
39003  windows_path="$new_path"
39004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39005    unix_path=`$CYGPATH -u "$windows_path"`
39006    new_path="$unix_path"
39007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39009    new_path="$unix_path"
39010  fi
39011
39012    fi
39013
39014    if test "x$new_path" = x; then
39015      # It's still not found. Now this is an unrecoverable error.
39016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39017$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39018      has_space=`$ECHO "$complete" | $GREP " "`
39019      if test "x$has_space" != x; then
39020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39022      fi
39023      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39024    fi
39025  fi
39026
39027  # Now new_path has a complete unix path to the binary
39028  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39029    # Keep paths in /bin as-is, but remove trailing .exe if any
39030    new_path="${new_path/%.exe/}"
39031    # Do not save /bin paths to all_fixpath_prefixes!
39032  else
39033    # Not in mixed or Windows style, start by that.
39034    new_path=`cmd //c echo $new_path`
39035
39036  input_path="$new_path"
39037  # Check if we need to convert this using DOS-style short mode. If the path
39038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39039  # take no chances and rewrite it.
39040  # Note: m4 eats our [], so we need to use [ and ] instead.
39041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39042  if test "x$has_forbidden_chars" != x; then
39043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39045  fi
39046
39047    # Output is in $new_path
39048
39049  windows_path="$new_path"
39050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39051    unix_path=`$CYGPATH -u "$windows_path"`
39052    new_path="$unix_path"
39053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39055    new_path="$unix_path"
39056  fi
39057
39058    # remove trailing .exe if any
39059    new_path="${new_path/%.exe/}"
39060
39061    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39062    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39063  fi
39064
39065    else
39066      # We're on a unix platform. Hooray! :)
39067      # First separate the path from the arguments. This will split at the first
39068      # space.
39069      complete="$OBJDUMP"
39070      path="${complete%% *}"
39071      tmp="$complete EOL"
39072      arguments="${tmp#* }"
39073
39074      # Cannot rely on the command "which" here since it doesn't always work.
39075      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39076      if test -z "$is_absolute_path"; then
39077        # Path to executable is not absolute. Find it.
39078        IFS_save="$IFS"
39079        IFS=:
39080        for p in $PATH; do
39081          if test -f "$p/$path" && test -x "$p/$path"; then
39082            new_path="$p/$path"
39083            break
39084          fi
39085        done
39086        IFS="$IFS_save"
39087      else
39088        # This is an absolute path, we can use it without further modifications.
39089        new_path="$path"
39090      fi
39091
39092      if test "x$new_path" = x; then
39093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39094$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39095        has_space=`$ECHO "$complete" | $GREP " "`
39096        if test "x$has_space" != x; then
39097          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39098$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39099        fi
39100        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39101      fi
39102    fi
39103
39104    # Now join together the path and the arguments once again
39105    if test "x$arguments" != xEOL; then
39106      new_complete="$new_path ${arguments% *}"
39107    else
39108      new_complete="$new_path"
39109    fi
39110
39111    if test "x$complete" != "x$new_complete"; then
39112      OBJDUMP="$new_complete"
39113      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39114$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39115    fi
39116  fi
39117
39118  fi
39119
39120
39121  # Restore old path.
39122  PATH="$OLD_PATH"
39123
39124  # Restore the flags to the user specified values.
39125  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39126  CFLAGS="$ORG_CFLAGS"
39127  CXXFLAGS="$ORG_CXXFLAGS"
39128
39129
39130# Finally do some processing after the detection phase
39131
39132  if test "x$COMPILE_TYPE" = "xcross"; then
39133    # Now we need to find a C/C++ compiler that can build executables for the
39134    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39135    # used once. Also, we need to do this without adding a tools dir to the
39136    # path, otherwise we might pick up cross-compilers which don't use standard
39137    # naming.
39138
39139    # FIXME: we should list the discovered compilers as an exclude pattern!
39140    # If we do that, we can do this detection before POST_DETECTION, and still
39141    # find the build compilers in the tools dir, if needed.
39142
39143
39144  # Publish this variable in the help.
39145
39146
39147  if test "x$BUILD_CC" = x; then
39148    # The variable is not set by user, try to locate tool using the code snippet
39149    for ac_prog in cl cc gcc
39150do
39151  # Extract the first word of "$ac_prog", so it can be a program name with args.
39152set dummy $ac_prog; ac_word=$2
39153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39154$as_echo_n "checking for $ac_word... " >&6; }
39155if ${ac_cv_path_BUILD_CC+:} false; then :
39156  $as_echo_n "(cached) " >&6
39157else
39158  case $BUILD_CC in
39159  [\\/]* | ?:[\\/]*)
39160  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39161  ;;
39162  *)
39163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39164for as_dir in $PATH
39165do
39166  IFS=$as_save_IFS
39167  test -z "$as_dir" && as_dir=.
39168    for ac_exec_ext in '' $ac_executable_extensions; do
39169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39170    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39172    break 2
39173  fi
39174done
39175  done
39176IFS=$as_save_IFS
39177
39178  ;;
39179esac
39180fi
39181BUILD_CC=$ac_cv_path_BUILD_CC
39182if test -n "$BUILD_CC"; then
39183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39184$as_echo "$BUILD_CC" >&6; }
39185else
39186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39187$as_echo "no" >&6; }
39188fi
39189
39190
39191  test -n "$BUILD_CC" && break
39192done
39193
39194  else
39195    # The variable is set, but is it from the command line or the environment?
39196
39197    # Try to remove the string !BUILD_CC! from our list.
39198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39200      # If it failed, the variable was not from the command line. Ignore it,
39201      # but warn the user (except for BASH, which is always set by the calling BASH).
39202      if test "xBUILD_CC" != xBASH; then
39203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39204$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39205      fi
39206      # Try to locate tool using the code snippet
39207      for ac_prog in cl cc gcc
39208do
39209  # Extract the first word of "$ac_prog", so it can be a program name with args.
39210set dummy $ac_prog; ac_word=$2
39211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39212$as_echo_n "checking for $ac_word... " >&6; }
39213if ${ac_cv_path_BUILD_CC+:} false; then :
39214  $as_echo_n "(cached) " >&6
39215else
39216  case $BUILD_CC in
39217  [\\/]* | ?:[\\/]*)
39218  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39219  ;;
39220  *)
39221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39222for as_dir in $PATH
39223do
39224  IFS=$as_save_IFS
39225  test -z "$as_dir" && as_dir=.
39226    for ac_exec_ext in '' $ac_executable_extensions; do
39227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39228    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39230    break 2
39231  fi
39232done
39233  done
39234IFS=$as_save_IFS
39235
39236  ;;
39237esac
39238fi
39239BUILD_CC=$ac_cv_path_BUILD_CC
39240if test -n "$BUILD_CC"; then
39241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39242$as_echo "$BUILD_CC" >&6; }
39243else
39244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39245$as_echo "no" >&6; }
39246fi
39247
39248
39249  test -n "$BUILD_CC" && break
39250done
39251
39252    else
39253      # If it succeeded, then it was overridden by the user. We will use it
39254      # for the tool.
39255
39256      # First remove it from the list of overridden variables, so we can test
39257      # for unknown variables in the end.
39258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39259
39260      # Check if the provided tool contains a complete path.
39261      tool_specified="$BUILD_CC"
39262      tool_basename="${tool_specified##*/}"
39263      if test "x$tool_basename" = "x$tool_specified"; then
39264        # A command without a complete path is provided, search $PATH.
39265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39266$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39267        # Extract the first word of "$tool_basename", so it can be a program name with args.
39268set dummy $tool_basename; ac_word=$2
39269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39270$as_echo_n "checking for $ac_word... " >&6; }
39271if ${ac_cv_path_BUILD_CC+:} false; then :
39272  $as_echo_n "(cached) " >&6
39273else
39274  case $BUILD_CC in
39275  [\\/]* | ?:[\\/]*)
39276  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39277  ;;
39278  *)
39279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39280for as_dir in $PATH
39281do
39282  IFS=$as_save_IFS
39283  test -z "$as_dir" && as_dir=.
39284    for ac_exec_ext in '' $ac_executable_extensions; do
39285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39286    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39288    break 2
39289  fi
39290done
39291  done
39292IFS=$as_save_IFS
39293
39294  ;;
39295esac
39296fi
39297BUILD_CC=$ac_cv_path_BUILD_CC
39298if test -n "$BUILD_CC"; then
39299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39300$as_echo "$BUILD_CC" >&6; }
39301else
39302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39303$as_echo "no" >&6; }
39304fi
39305
39306
39307        if test "x$BUILD_CC" = x; then
39308          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39309        fi
39310      else
39311        # Otherwise we believe it is a complete path. Use it as it is.
39312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39313$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39315$as_echo_n "checking for BUILD_CC... " >&6; }
39316        if test ! -x "$tool_specified"; then
39317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39318$as_echo "not found" >&6; }
39319          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39320        fi
39321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39322$as_echo "$tool_specified" >&6; }
39323      fi
39324    fi
39325  fi
39326
39327
39328
39329  # Only process if variable expands to non-empty
39330
39331  if test "x$BUILD_CC" != x; then
39332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39333
39334  # First separate the path from the arguments. This will split at the first
39335  # space.
39336  complete="$BUILD_CC"
39337  path="${complete%% *}"
39338  tmp="$complete EOL"
39339  arguments="${tmp#* }"
39340
39341  # Input might be given as Windows format, start by converting to
39342  # unix format.
39343  new_path=`$CYGPATH -u "$path"`
39344
39345  # Now try to locate executable using which
39346  new_path=`$WHICH "$new_path" 2> /dev/null`
39347  # bat and cmd files are not always considered executable in cygwin causing which
39348  # to not find them
39349  if test "x$new_path" = x \
39350      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39351      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39352    new_path=`$CYGPATH -u "$path"`
39353  fi
39354  if test "x$new_path" = x; then
39355    # Oops. Which didn't find the executable.
39356    # The splitting of arguments from the executable at a space might have been incorrect,
39357    # since paths with space are more likely in Windows. Give it another try with the whole
39358    # argument.
39359    path="$complete"
39360    arguments="EOL"
39361    new_path=`$CYGPATH -u "$path"`
39362    new_path=`$WHICH "$new_path" 2> /dev/null`
39363    # bat and cmd files are not always considered executable in cygwin causing which
39364    # to not find them
39365    if test "x$new_path" = x \
39366        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39367        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39368      new_path=`$CYGPATH -u "$path"`
39369    fi
39370    if test "x$new_path" = x; then
39371      # It's still not found. Now this is an unrecoverable error.
39372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39373$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39374      has_space=`$ECHO "$complete" | $GREP " "`
39375      if test "x$has_space" != x; then
39376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39378      fi
39379      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39380    fi
39381  fi
39382
39383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39386  # "foo.exe" is OK but "foo" is an error.
39387  #
39388  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39389  # It is also a way to make sure we got the proper file name for the real test later on.
39390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39391  if test "x$test_shortpath" = x; then
39392    # Short path failed, file does not exist as specified.
39393    # Try adding .exe or .cmd
39394    if test -f "${new_path}.exe"; then
39395      input_to_shortpath="${new_path}.exe"
39396    elif test -f "${new_path}.cmd"; then
39397      input_to_shortpath="${new_path}.cmd"
39398    else
39399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39400$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39403      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39404    fi
39405  else
39406    input_to_shortpath="$new_path"
39407  fi
39408
39409  # Call helper function which possibly converts this using DOS-style short mode.
39410  # If so, the updated path is stored in $new_path.
39411  new_path="$input_to_shortpath"
39412
39413  input_path="$input_to_shortpath"
39414  # Check if we need to convert this using DOS-style short mode. If the path
39415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39416  # take no chances and rewrite it.
39417  # Note: m4 eats our [], so we need to use [ and ] instead.
39418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39419  if test "x$has_forbidden_chars" != x; then
39420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39424      # Going to short mode and back again did indeed matter. Since short mode is
39425      # case insensitive, let's make it lowercase to improve readability.
39426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39427      # Now convert it back to Unix-style (cygpath)
39428      input_path=`$CYGPATH -u "$shortmode_path"`
39429      new_path="$input_path"
39430    fi
39431  fi
39432
39433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39434  if test "x$test_cygdrive_prefix" = x; then
39435    # As a simple fix, exclude /usr/bin since it's not a real path.
39436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39438      # a path prefixed by /cygdrive for fixpath to work.
39439      new_path="$CYGWIN_ROOT_PATH$input_path"
39440    fi
39441  fi
39442
39443  # remove trailing .exe if any
39444  new_path="${new_path/%.exe/}"
39445
39446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39447
39448  # First separate the path from the arguments. This will split at the first
39449  # space.
39450  complete="$BUILD_CC"
39451  path="${complete%% *}"
39452  tmp="$complete EOL"
39453  arguments="${tmp#* }"
39454
39455  # Input might be given as Windows format, start by converting to
39456  # unix format.
39457  new_path="$path"
39458
39459  windows_path="$new_path"
39460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39461    unix_path=`$CYGPATH -u "$windows_path"`
39462    new_path="$unix_path"
39463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39465    new_path="$unix_path"
39466  fi
39467
39468
39469  # Now try to locate executable using which
39470  new_path=`$WHICH "$new_path" 2> /dev/null`
39471
39472  if test "x$new_path" = x; then
39473    # Oops. Which didn't find the executable.
39474    # The splitting of arguments from the executable at a space might have been incorrect,
39475    # since paths with space are more likely in Windows. Give it another try with the whole
39476    # argument.
39477    path="$complete"
39478    arguments="EOL"
39479    new_path="$path"
39480
39481  windows_path="$new_path"
39482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39483    unix_path=`$CYGPATH -u "$windows_path"`
39484    new_path="$unix_path"
39485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39487    new_path="$unix_path"
39488  fi
39489
39490
39491    new_path=`$WHICH "$new_path" 2> /dev/null`
39492    # bat and cmd files are not always considered executable in MSYS causing which
39493    # to not find them
39494    if test "x$new_path" = x \
39495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39497      new_path="$path"
39498
39499  windows_path="$new_path"
39500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39501    unix_path=`$CYGPATH -u "$windows_path"`
39502    new_path="$unix_path"
39503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39505    new_path="$unix_path"
39506  fi
39507
39508    fi
39509
39510    if test "x$new_path" = x; then
39511      # It's still not found. Now this is an unrecoverable error.
39512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39513$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39514      has_space=`$ECHO "$complete" | $GREP " "`
39515      if test "x$has_space" != x; then
39516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39518      fi
39519      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39520    fi
39521  fi
39522
39523  # Now new_path has a complete unix path to the binary
39524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39525    # Keep paths in /bin as-is, but remove trailing .exe if any
39526    new_path="${new_path/%.exe/}"
39527    # Do not save /bin paths to all_fixpath_prefixes!
39528  else
39529    # Not in mixed or Windows style, start by that.
39530    new_path=`cmd //c echo $new_path`
39531
39532  input_path="$new_path"
39533  # Check if we need to convert this using DOS-style short mode. If the path
39534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39535  # take no chances and rewrite it.
39536  # Note: m4 eats our [], so we need to use [ and ] instead.
39537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39538  if test "x$has_forbidden_chars" != x; then
39539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39541  fi
39542
39543    # Output is in $new_path
39544
39545  windows_path="$new_path"
39546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39547    unix_path=`$CYGPATH -u "$windows_path"`
39548    new_path="$unix_path"
39549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39551    new_path="$unix_path"
39552  fi
39553
39554    # remove trailing .exe if any
39555    new_path="${new_path/%.exe/}"
39556
39557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39559  fi
39560
39561    else
39562      # We're on a unix platform. Hooray! :)
39563      # First separate the path from the arguments. This will split at the first
39564      # space.
39565      complete="$BUILD_CC"
39566      path="${complete%% *}"
39567      tmp="$complete EOL"
39568      arguments="${tmp#* }"
39569
39570      # Cannot rely on the command "which" here since it doesn't always work.
39571      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39572      if test -z "$is_absolute_path"; then
39573        # Path to executable is not absolute. Find it.
39574        IFS_save="$IFS"
39575        IFS=:
39576        for p in $PATH; do
39577          if test -f "$p/$path" && test -x "$p/$path"; then
39578            new_path="$p/$path"
39579            break
39580          fi
39581        done
39582        IFS="$IFS_save"
39583      else
39584        # This is an absolute path, we can use it without further modifications.
39585        new_path="$path"
39586      fi
39587
39588      if test "x$new_path" = x; then
39589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39590$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39591        has_space=`$ECHO "$complete" | $GREP " "`
39592        if test "x$has_space" != x; then
39593          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39594$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39595        fi
39596        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39597      fi
39598    fi
39599
39600    # Now join together the path and the arguments once again
39601    if test "x$arguments" != xEOL; then
39602      new_complete="$new_path ${arguments% *}"
39603    else
39604      new_complete="$new_path"
39605    fi
39606
39607    if test "x$complete" != "x$new_complete"; then
39608      BUILD_CC="$new_complete"
39609      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39610$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39611    fi
39612  fi
39613
39614
39615
39616  # Publish this variable in the help.
39617
39618
39619  if test "x$BUILD_CXX" = x; then
39620    # The variable is not set by user, try to locate tool using the code snippet
39621    for ac_prog in cl CC g++
39622do
39623  # Extract the first word of "$ac_prog", so it can be a program name with args.
39624set dummy $ac_prog; ac_word=$2
39625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39626$as_echo_n "checking for $ac_word... " >&6; }
39627if ${ac_cv_path_BUILD_CXX+:} false; then :
39628  $as_echo_n "(cached) " >&6
39629else
39630  case $BUILD_CXX in
39631  [\\/]* | ?:[\\/]*)
39632  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39633  ;;
39634  *)
39635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39636for as_dir in $PATH
39637do
39638  IFS=$as_save_IFS
39639  test -z "$as_dir" && as_dir=.
39640    for ac_exec_ext in '' $ac_executable_extensions; do
39641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39642    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39644    break 2
39645  fi
39646done
39647  done
39648IFS=$as_save_IFS
39649
39650  ;;
39651esac
39652fi
39653BUILD_CXX=$ac_cv_path_BUILD_CXX
39654if test -n "$BUILD_CXX"; then
39655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39656$as_echo "$BUILD_CXX" >&6; }
39657else
39658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39659$as_echo "no" >&6; }
39660fi
39661
39662
39663  test -n "$BUILD_CXX" && break
39664done
39665
39666  else
39667    # The variable is set, but is it from the command line or the environment?
39668
39669    # Try to remove the string !BUILD_CXX! from our list.
39670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39672      # If it failed, the variable was not from the command line. Ignore it,
39673      # but warn the user (except for BASH, which is always set by the calling BASH).
39674      if test "xBUILD_CXX" != xBASH; then
39675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39676$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39677      fi
39678      # Try to locate tool using the code snippet
39679      for ac_prog in cl CC g++
39680do
39681  # Extract the first word of "$ac_prog", so it can be a program name with args.
39682set dummy $ac_prog; ac_word=$2
39683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39684$as_echo_n "checking for $ac_word... " >&6; }
39685if ${ac_cv_path_BUILD_CXX+:} false; then :
39686  $as_echo_n "(cached) " >&6
39687else
39688  case $BUILD_CXX in
39689  [\\/]* | ?:[\\/]*)
39690  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39691  ;;
39692  *)
39693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39694for as_dir in $PATH
39695do
39696  IFS=$as_save_IFS
39697  test -z "$as_dir" && as_dir=.
39698    for ac_exec_ext in '' $ac_executable_extensions; do
39699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39700    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39702    break 2
39703  fi
39704done
39705  done
39706IFS=$as_save_IFS
39707
39708  ;;
39709esac
39710fi
39711BUILD_CXX=$ac_cv_path_BUILD_CXX
39712if test -n "$BUILD_CXX"; then
39713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39714$as_echo "$BUILD_CXX" >&6; }
39715else
39716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39717$as_echo "no" >&6; }
39718fi
39719
39720
39721  test -n "$BUILD_CXX" && break
39722done
39723
39724    else
39725      # If it succeeded, then it was overridden by the user. We will use it
39726      # for the tool.
39727
39728      # First remove it from the list of overridden variables, so we can test
39729      # for unknown variables in the end.
39730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39731
39732      # Check if the provided tool contains a complete path.
39733      tool_specified="$BUILD_CXX"
39734      tool_basename="${tool_specified##*/}"
39735      if test "x$tool_basename" = "x$tool_specified"; then
39736        # A command without a complete path is provided, search $PATH.
39737        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39738$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39739        # Extract the first word of "$tool_basename", so it can be a program name with args.
39740set dummy $tool_basename; ac_word=$2
39741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39742$as_echo_n "checking for $ac_word... " >&6; }
39743if ${ac_cv_path_BUILD_CXX+:} false; then :
39744  $as_echo_n "(cached) " >&6
39745else
39746  case $BUILD_CXX in
39747  [\\/]* | ?:[\\/]*)
39748  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39749  ;;
39750  *)
39751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39752for as_dir in $PATH
39753do
39754  IFS=$as_save_IFS
39755  test -z "$as_dir" && as_dir=.
39756    for ac_exec_ext in '' $ac_executable_extensions; do
39757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39758    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39760    break 2
39761  fi
39762done
39763  done
39764IFS=$as_save_IFS
39765
39766  ;;
39767esac
39768fi
39769BUILD_CXX=$ac_cv_path_BUILD_CXX
39770if test -n "$BUILD_CXX"; then
39771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39772$as_echo "$BUILD_CXX" >&6; }
39773else
39774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39775$as_echo "no" >&6; }
39776fi
39777
39778
39779        if test "x$BUILD_CXX" = x; then
39780          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39781        fi
39782      else
39783        # Otherwise we believe it is a complete path. Use it as it is.
39784        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39785$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39787$as_echo_n "checking for BUILD_CXX... " >&6; }
39788        if test ! -x "$tool_specified"; then
39789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39790$as_echo "not found" >&6; }
39791          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39792        fi
39793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39794$as_echo "$tool_specified" >&6; }
39795      fi
39796    fi
39797  fi
39798
39799
39800
39801  # Only process if variable expands to non-empty
39802
39803  if test "x$BUILD_CXX" != x; then
39804    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39805
39806  # First separate the path from the arguments. This will split at the first
39807  # space.
39808  complete="$BUILD_CXX"
39809  path="${complete%% *}"
39810  tmp="$complete EOL"
39811  arguments="${tmp#* }"
39812
39813  # Input might be given as Windows format, start by converting to
39814  # unix format.
39815  new_path=`$CYGPATH -u "$path"`
39816
39817  # Now try to locate executable using which
39818  new_path=`$WHICH "$new_path" 2> /dev/null`
39819  # bat and cmd files are not always considered executable in cygwin causing which
39820  # to not find them
39821  if test "x$new_path" = x \
39822      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39823      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39824    new_path=`$CYGPATH -u "$path"`
39825  fi
39826  if test "x$new_path" = x; then
39827    # Oops. Which didn't find the executable.
39828    # The splitting of arguments from the executable at a space might have been incorrect,
39829    # since paths with space are more likely in Windows. Give it another try with the whole
39830    # argument.
39831    path="$complete"
39832    arguments="EOL"
39833    new_path=`$CYGPATH -u "$path"`
39834    new_path=`$WHICH "$new_path" 2> /dev/null`
39835    # bat and cmd files are not always considered executable in cygwin causing which
39836    # to not find them
39837    if test "x$new_path" = x \
39838        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39839        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39840      new_path=`$CYGPATH -u "$path"`
39841    fi
39842    if test "x$new_path" = x; then
39843      # It's still not found. Now this is an unrecoverable error.
39844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39845$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39846      has_space=`$ECHO "$complete" | $GREP " "`
39847      if test "x$has_space" != x; then
39848        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39849$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39850      fi
39851      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39852    fi
39853  fi
39854
39855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39858  # "foo.exe" is OK but "foo" is an error.
39859  #
39860  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39861  # It is also a way to make sure we got the proper file name for the real test later on.
39862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39863  if test "x$test_shortpath" = x; then
39864    # Short path failed, file does not exist as specified.
39865    # Try adding .exe or .cmd
39866    if test -f "${new_path}.exe"; then
39867      input_to_shortpath="${new_path}.exe"
39868    elif test -f "${new_path}.cmd"; then
39869      input_to_shortpath="${new_path}.cmd"
39870    else
39871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39872$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39873      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39874$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39875      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39876    fi
39877  else
39878    input_to_shortpath="$new_path"
39879  fi
39880
39881  # Call helper function which possibly converts this using DOS-style short mode.
39882  # If so, the updated path is stored in $new_path.
39883  new_path="$input_to_shortpath"
39884
39885  input_path="$input_to_shortpath"
39886  # Check if we need to convert this using DOS-style short mode. If the path
39887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39888  # take no chances and rewrite it.
39889  # Note: m4 eats our [], so we need to use [ and ] instead.
39890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39891  if test "x$has_forbidden_chars" != x; then
39892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39896      # Going to short mode and back again did indeed matter. Since short mode is
39897      # case insensitive, let's make it lowercase to improve readability.
39898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39899      # Now convert it back to Unix-style (cygpath)
39900      input_path=`$CYGPATH -u "$shortmode_path"`
39901      new_path="$input_path"
39902    fi
39903  fi
39904
39905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39906  if test "x$test_cygdrive_prefix" = x; then
39907    # As a simple fix, exclude /usr/bin since it's not a real path.
39908    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39910      # a path prefixed by /cygdrive for fixpath to work.
39911      new_path="$CYGWIN_ROOT_PATH$input_path"
39912    fi
39913  fi
39914
39915  # remove trailing .exe if any
39916  new_path="${new_path/%.exe/}"
39917
39918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39919
39920  # First separate the path from the arguments. This will split at the first
39921  # space.
39922  complete="$BUILD_CXX"
39923  path="${complete%% *}"
39924  tmp="$complete EOL"
39925  arguments="${tmp#* }"
39926
39927  # Input might be given as Windows format, start by converting to
39928  # unix format.
39929  new_path="$path"
39930
39931  windows_path="$new_path"
39932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39933    unix_path=`$CYGPATH -u "$windows_path"`
39934    new_path="$unix_path"
39935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39937    new_path="$unix_path"
39938  fi
39939
39940
39941  # Now try to locate executable using which
39942  new_path=`$WHICH "$new_path" 2> /dev/null`
39943
39944  if test "x$new_path" = x; then
39945    # Oops. Which didn't find the executable.
39946    # The splitting of arguments from the executable at a space might have been incorrect,
39947    # since paths with space are more likely in Windows. Give it another try with the whole
39948    # argument.
39949    path="$complete"
39950    arguments="EOL"
39951    new_path="$path"
39952
39953  windows_path="$new_path"
39954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39955    unix_path=`$CYGPATH -u "$windows_path"`
39956    new_path="$unix_path"
39957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39959    new_path="$unix_path"
39960  fi
39961
39962
39963    new_path=`$WHICH "$new_path" 2> /dev/null`
39964    # bat and cmd files are not always considered executable in MSYS causing which
39965    # to not find them
39966    if test "x$new_path" = x \
39967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39969      new_path="$path"
39970
39971  windows_path="$new_path"
39972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39973    unix_path=`$CYGPATH -u "$windows_path"`
39974    new_path="$unix_path"
39975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39977    new_path="$unix_path"
39978  fi
39979
39980    fi
39981
39982    if test "x$new_path" = x; then
39983      # It's still not found. Now this is an unrecoverable error.
39984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39985$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39986      has_space=`$ECHO "$complete" | $GREP " "`
39987      if test "x$has_space" != x; then
39988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39990      fi
39991      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39992    fi
39993  fi
39994
39995  # Now new_path has a complete unix path to the binary
39996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39997    # Keep paths in /bin as-is, but remove trailing .exe if any
39998    new_path="${new_path/%.exe/}"
39999    # Do not save /bin paths to all_fixpath_prefixes!
40000  else
40001    # Not in mixed or Windows style, start by that.
40002    new_path=`cmd //c echo $new_path`
40003
40004  input_path="$new_path"
40005  # Check if we need to convert this using DOS-style short mode. If the path
40006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40007  # take no chances and rewrite it.
40008  # Note: m4 eats our [], so we need to use [ and ] instead.
40009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40010  if test "x$has_forbidden_chars" != x; then
40011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40013  fi
40014
40015    # Output is in $new_path
40016
40017  windows_path="$new_path"
40018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40019    unix_path=`$CYGPATH -u "$windows_path"`
40020    new_path="$unix_path"
40021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40023    new_path="$unix_path"
40024  fi
40025
40026    # remove trailing .exe if any
40027    new_path="${new_path/%.exe/}"
40028
40029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40031  fi
40032
40033    else
40034      # We're on a unix platform. Hooray! :)
40035      # First separate the path from the arguments. This will split at the first
40036      # space.
40037      complete="$BUILD_CXX"
40038      path="${complete%% *}"
40039      tmp="$complete EOL"
40040      arguments="${tmp#* }"
40041
40042      # Cannot rely on the command "which" here since it doesn't always work.
40043      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40044      if test -z "$is_absolute_path"; then
40045        # Path to executable is not absolute. Find it.
40046        IFS_save="$IFS"
40047        IFS=:
40048        for p in $PATH; do
40049          if test -f "$p/$path" && test -x "$p/$path"; then
40050            new_path="$p/$path"
40051            break
40052          fi
40053        done
40054        IFS="$IFS_save"
40055      else
40056        # This is an absolute path, we can use it without further modifications.
40057        new_path="$path"
40058      fi
40059
40060      if test "x$new_path" = x; then
40061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40062$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40063        has_space=`$ECHO "$complete" | $GREP " "`
40064        if test "x$has_space" != x; then
40065          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40066$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40067        fi
40068        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40069      fi
40070    fi
40071
40072    # Now join together the path and the arguments once again
40073    if test "x$arguments" != xEOL; then
40074      new_complete="$new_path ${arguments% *}"
40075    else
40076      new_complete="$new_path"
40077    fi
40078
40079    if test "x$complete" != "x$new_complete"; then
40080      BUILD_CXX="$new_complete"
40081      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40082$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40083    fi
40084  fi
40085
40086
40087
40088  # Publish this variable in the help.
40089
40090
40091  if test "x$BUILD_LD" = x; then
40092    # The variable is not set by user, try to locate tool using the code snippet
40093    for ac_prog in ld
40094do
40095  # Extract the first word of "$ac_prog", so it can be a program name with args.
40096set dummy $ac_prog; ac_word=$2
40097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40098$as_echo_n "checking for $ac_word... " >&6; }
40099if ${ac_cv_path_BUILD_LD+:} false; then :
40100  $as_echo_n "(cached) " >&6
40101else
40102  case $BUILD_LD in
40103  [\\/]* | ?:[\\/]*)
40104  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40105  ;;
40106  *)
40107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40108for as_dir in $PATH
40109do
40110  IFS=$as_save_IFS
40111  test -z "$as_dir" && as_dir=.
40112    for ac_exec_ext in '' $ac_executable_extensions; do
40113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40114    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40116    break 2
40117  fi
40118done
40119  done
40120IFS=$as_save_IFS
40121
40122  ;;
40123esac
40124fi
40125BUILD_LD=$ac_cv_path_BUILD_LD
40126if test -n "$BUILD_LD"; then
40127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40128$as_echo "$BUILD_LD" >&6; }
40129else
40130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40131$as_echo "no" >&6; }
40132fi
40133
40134
40135  test -n "$BUILD_LD" && break
40136done
40137
40138  else
40139    # The variable is set, but is it from the command line or the environment?
40140
40141    # Try to remove the string !BUILD_LD! from our list.
40142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40144      # If it failed, the variable was not from the command line. Ignore it,
40145      # but warn the user (except for BASH, which is always set by the calling BASH).
40146      if test "xBUILD_LD" != xBASH; then
40147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40148$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40149      fi
40150      # Try to locate tool using the code snippet
40151      for ac_prog in ld
40152do
40153  # Extract the first word of "$ac_prog", so it can be a program name with args.
40154set dummy $ac_prog; ac_word=$2
40155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40156$as_echo_n "checking for $ac_word... " >&6; }
40157if ${ac_cv_path_BUILD_LD+:} false; then :
40158  $as_echo_n "(cached) " >&6
40159else
40160  case $BUILD_LD in
40161  [\\/]* | ?:[\\/]*)
40162  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40163  ;;
40164  *)
40165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40166for as_dir in $PATH
40167do
40168  IFS=$as_save_IFS
40169  test -z "$as_dir" && as_dir=.
40170    for ac_exec_ext in '' $ac_executable_extensions; do
40171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40172    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40174    break 2
40175  fi
40176done
40177  done
40178IFS=$as_save_IFS
40179
40180  ;;
40181esac
40182fi
40183BUILD_LD=$ac_cv_path_BUILD_LD
40184if test -n "$BUILD_LD"; then
40185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40186$as_echo "$BUILD_LD" >&6; }
40187else
40188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40189$as_echo "no" >&6; }
40190fi
40191
40192
40193  test -n "$BUILD_LD" && break
40194done
40195
40196    else
40197      # If it succeeded, then it was overridden by the user. We will use it
40198      # for the tool.
40199
40200      # First remove it from the list of overridden variables, so we can test
40201      # for unknown variables in the end.
40202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40203
40204      # Check if the provided tool contains a complete path.
40205      tool_specified="$BUILD_LD"
40206      tool_basename="${tool_specified##*/}"
40207      if test "x$tool_basename" = "x$tool_specified"; then
40208        # A command without a complete path is provided, search $PATH.
40209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40210$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40211        # Extract the first word of "$tool_basename", so it can be a program name with args.
40212set dummy $tool_basename; ac_word=$2
40213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40214$as_echo_n "checking for $ac_word... " >&6; }
40215if ${ac_cv_path_BUILD_LD+:} false; then :
40216  $as_echo_n "(cached) " >&6
40217else
40218  case $BUILD_LD in
40219  [\\/]* | ?:[\\/]*)
40220  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40221  ;;
40222  *)
40223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40224for as_dir in $PATH
40225do
40226  IFS=$as_save_IFS
40227  test -z "$as_dir" && as_dir=.
40228    for ac_exec_ext in '' $ac_executable_extensions; do
40229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40230    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40232    break 2
40233  fi
40234done
40235  done
40236IFS=$as_save_IFS
40237
40238  ;;
40239esac
40240fi
40241BUILD_LD=$ac_cv_path_BUILD_LD
40242if test -n "$BUILD_LD"; then
40243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40244$as_echo "$BUILD_LD" >&6; }
40245else
40246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40247$as_echo "no" >&6; }
40248fi
40249
40250
40251        if test "x$BUILD_LD" = x; then
40252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40253        fi
40254      else
40255        # Otherwise we believe it is a complete path. Use it as it is.
40256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40257$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40259$as_echo_n "checking for BUILD_LD... " >&6; }
40260        if test ! -x "$tool_specified"; then
40261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40262$as_echo "not found" >&6; }
40263          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40264        fi
40265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40266$as_echo "$tool_specified" >&6; }
40267      fi
40268    fi
40269  fi
40270
40271
40272
40273  # Only process if variable expands to non-empty
40274
40275  if test "x$BUILD_LD" != x; then
40276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40277
40278  # First separate the path from the arguments. This will split at the first
40279  # space.
40280  complete="$BUILD_LD"
40281  path="${complete%% *}"
40282  tmp="$complete EOL"
40283  arguments="${tmp#* }"
40284
40285  # Input might be given as Windows format, start by converting to
40286  # unix format.
40287  new_path=`$CYGPATH -u "$path"`
40288
40289  # Now try to locate executable using which
40290  new_path=`$WHICH "$new_path" 2> /dev/null`
40291  # bat and cmd files are not always considered executable in cygwin causing which
40292  # to not find them
40293  if test "x$new_path" = x \
40294      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40295      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40296    new_path=`$CYGPATH -u "$path"`
40297  fi
40298  if test "x$new_path" = x; then
40299    # Oops. Which didn't find the executable.
40300    # The splitting of arguments from the executable at a space might have been incorrect,
40301    # since paths with space are more likely in Windows. Give it another try with the whole
40302    # argument.
40303    path="$complete"
40304    arguments="EOL"
40305    new_path=`$CYGPATH -u "$path"`
40306    new_path=`$WHICH "$new_path" 2> /dev/null`
40307    # bat and cmd files are not always considered executable in cygwin causing which
40308    # to not find them
40309    if test "x$new_path" = x \
40310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40312      new_path=`$CYGPATH -u "$path"`
40313    fi
40314    if test "x$new_path" = x; then
40315      # It's still not found. Now this is an unrecoverable error.
40316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40317$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40318      has_space=`$ECHO "$complete" | $GREP " "`
40319      if test "x$has_space" != x; then
40320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40322      fi
40323      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40324    fi
40325  fi
40326
40327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40330  # "foo.exe" is OK but "foo" is an error.
40331  #
40332  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40333  # It is also a way to make sure we got the proper file name for the real test later on.
40334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40335  if test "x$test_shortpath" = x; then
40336    # Short path failed, file does not exist as specified.
40337    # Try adding .exe or .cmd
40338    if test -f "${new_path}.exe"; then
40339      input_to_shortpath="${new_path}.exe"
40340    elif test -f "${new_path}.cmd"; then
40341      input_to_shortpath="${new_path}.cmd"
40342    else
40343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40344$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40347      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40348    fi
40349  else
40350    input_to_shortpath="$new_path"
40351  fi
40352
40353  # Call helper function which possibly converts this using DOS-style short mode.
40354  # If so, the updated path is stored in $new_path.
40355  new_path="$input_to_shortpath"
40356
40357  input_path="$input_to_shortpath"
40358  # Check if we need to convert this using DOS-style short mode. If the path
40359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40360  # take no chances and rewrite it.
40361  # Note: m4 eats our [], so we need to use [ and ] instead.
40362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40363  if test "x$has_forbidden_chars" != x; then
40364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40368      # Going to short mode and back again did indeed matter. Since short mode is
40369      # case insensitive, let's make it lowercase to improve readability.
40370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40371      # Now convert it back to Unix-style (cygpath)
40372      input_path=`$CYGPATH -u "$shortmode_path"`
40373      new_path="$input_path"
40374    fi
40375  fi
40376
40377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40378  if test "x$test_cygdrive_prefix" = x; then
40379    # As a simple fix, exclude /usr/bin since it's not a real path.
40380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40382      # a path prefixed by /cygdrive for fixpath to work.
40383      new_path="$CYGWIN_ROOT_PATH$input_path"
40384    fi
40385  fi
40386
40387  # remove trailing .exe if any
40388  new_path="${new_path/%.exe/}"
40389
40390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40391
40392  # First separate the path from the arguments. This will split at the first
40393  # space.
40394  complete="$BUILD_LD"
40395  path="${complete%% *}"
40396  tmp="$complete EOL"
40397  arguments="${tmp#* }"
40398
40399  # Input might be given as Windows format, start by converting to
40400  # unix format.
40401  new_path="$path"
40402
40403  windows_path="$new_path"
40404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40405    unix_path=`$CYGPATH -u "$windows_path"`
40406    new_path="$unix_path"
40407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40409    new_path="$unix_path"
40410  fi
40411
40412
40413  # Now try to locate executable using which
40414  new_path=`$WHICH "$new_path" 2> /dev/null`
40415
40416  if test "x$new_path" = x; then
40417    # Oops. Which didn't find the executable.
40418    # The splitting of arguments from the executable at a space might have been incorrect,
40419    # since paths with space are more likely in Windows. Give it another try with the whole
40420    # argument.
40421    path="$complete"
40422    arguments="EOL"
40423    new_path="$path"
40424
40425  windows_path="$new_path"
40426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40427    unix_path=`$CYGPATH -u "$windows_path"`
40428    new_path="$unix_path"
40429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40431    new_path="$unix_path"
40432  fi
40433
40434
40435    new_path=`$WHICH "$new_path" 2> /dev/null`
40436    # bat and cmd files are not always considered executable in MSYS causing which
40437    # to not find them
40438    if test "x$new_path" = x \
40439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40441      new_path="$path"
40442
40443  windows_path="$new_path"
40444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40445    unix_path=`$CYGPATH -u "$windows_path"`
40446    new_path="$unix_path"
40447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40449    new_path="$unix_path"
40450  fi
40451
40452    fi
40453
40454    if test "x$new_path" = x; then
40455      # It's still not found. Now this is an unrecoverable error.
40456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40457$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40458      has_space=`$ECHO "$complete" | $GREP " "`
40459      if test "x$has_space" != x; then
40460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40462      fi
40463      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40464    fi
40465  fi
40466
40467  # Now new_path has a complete unix path to the binary
40468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40469    # Keep paths in /bin as-is, but remove trailing .exe if any
40470    new_path="${new_path/%.exe/}"
40471    # Do not save /bin paths to all_fixpath_prefixes!
40472  else
40473    # Not in mixed or Windows style, start by that.
40474    new_path=`cmd //c echo $new_path`
40475
40476  input_path="$new_path"
40477  # Check if we need to convert this using DOS-style short mode. If the path
40478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40479  # take no chances and rewrite it.
40480  # Note: m4 eats our [], so we need to use [ and ] instead.
40481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40482  if test "x$has_forbidden_chars" != x; then
40483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40485  fi
40486
40487    # Output is in $new_path
40488
40489  windows_path="$new_path"
40490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40491    unix_path=`$CYGPATH -u "$windows_path"`
40492    new_path="$unix_path"
40493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40495    new_path="$unix_path"
40496  fi
40497
40498    # remove trailing .exe if any
40499    new_path="${new_path/%.exe/}"
40500
40501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40503  fi
40504
40505    else
40506      # We're on a unix platform. Hooray! :)
40507      # First separate the path from the arguments. This will split at the first
40508      # space.
40509      complete="$BUILD_LD"
40510      path="${complete%% *}"
40511      tmp="$complete EOL"
40512      arguments="${tmp#* }"
40513
40514      # Cannot rely on the command "which" here since it doesn't always work.
40515      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40516      if test -z "$is_absolute_path"; then
40517        # Path to executable is not absolute. Find it.
40518        IFS_save="$IFS"
40519        IFS=:
40520        for p in $PATH; do
40521          if test -f "$p/$path" && test -x "$p/$path"; then
40522            new_path="$p/$path"
40523            break
40524          fi
40525        done
40526        IFS="$IFS_save"
40527      else
40528        # This is an absolute path, we can use it without further modifications.
40529        new_path="$path"
40530      fi
40531
40532      if test "x$new_path" = x; then
40533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40534$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40535        has_space=`$ECHO "$complete" | $GREP " "`
40536        if test "x$has_space" != x; then
40537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40539        fi
40540        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40541      fi
40542    fi
40543
40544    # Now join together the path and the arguments once again
40545    if test "x$arguments" != xEOL; then
40546      new_complete="$new_path ${arguments% *}"
40547    else
40548      new_complete="$new_path"
40549    fi
40550
40551    if test "x$complete" != "x$new_complete"; then
40552      BUILD_LD="$new_complete"
40553      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40554$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40555    fi
40556  fi
40557
40558  else
40559    # If we are not cross compiling, use the normal target compilers for
40560    # building the build platform executables.
40561    BUILD_CC="$CC"
40562    BUILD_CXX="$CXX"
40563    BUILD_LD="$LD"
40564  fi
40565
40566
40567
40568
40569
40570
40571  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40572    # For hotspot, we need these in Windows mixed path,
40573    # so rewrite them all. Need added .exe suffix.
40574    HOTSPOT_CXX="$CXX.exe"
40575    HOTSPOT_LD="$LD.exe"
40576    HOTSPOT_MT="$MT.exe"
40577    HOTSPOT_RC="$RC.exe"
40578
40579  unix_path="$HOTSPOT_CXX"
40580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40581    windows_path=`$CYGPATH -m "$unix_path"`
40582    HOTSPOT_CXX="$windows_path"
40583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40584    windows_path=`cmd //c echo $unix_path`
40585    HOTSPOT_CXX="$windows_path"
40586  fi
40587
40588
40589  unix_path="$HOTSPOT_LD"
40590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40591    windows_path=`$CYGPATH -m "$unix_path"`
40592    HOTSPOT_LD="$windows_path"
40593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40594    windows_path=`cmd //c echo $unix_path`
40595    HOTSPOT_LD="$windows_path"
40596  fi
40597
40598
40599  unix_path="$HOTSPOT_MT"
40600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40601    windows_path=`$CYGPATH -m "$unix_path"`
40602    HOTSPOT_MT="$windows_path"
40603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40604    windows_path=`cmd //c echo $unix_path`
40605    HOTSPOT_MT="$windows_path"
40606  fi
40607
40608
40609  unix_path="$HOTSPOT_RC"
40610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40611    windows_path=`$CYGPATH -m "$unix_path"`
40612    HOTSPOT_RC="$windows_path"
40613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40614    windows_path=`cmd //c echo $unix_path`
40615    HOTSPOT_RC="$windows_path"
40616  fi
40617
40618
40619
40620  else
40621    HOTSPOT_CXX="$CXX"
40622    HOTSPOT_LD="$LD"
40623  fi
40624
40625
40626
40627  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40628    USE_CLANG=true
40629  fi
40630
40631
40632
40633
40634
40635  # The package path is used only on macosx?
40636  # FIXME: clean this up, and/or move it elsewhere.
40637  PACKAGE_PATH=/opt/local
40638
40639
40640  # Check for extra potential brokenness.
40641  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40642    # On Windows, double-check that we got the right compiler.
40643    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40644    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40645    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40646      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40647        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
40648      fi
40649    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40650      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40651        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40652      fi
40653    fi
40654  fi
40655
40656  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40657    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40658    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40659    # This is later checked when setting flags.
40660
40661    # "-Og" suppported for GCC 4.8 and later
40662    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40663
40664  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40665$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40666  supports=yes
40667
40668  saved_cflags="$CFLAGS"
40669  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40670  ac_ext=c
40671ac_cpp='$CPP $CPPFLAGS'
40672ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40673ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40674ac_compiler_gnu=$ac_cv_c_compiler_gnu
40675
40676  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40677/* end confdefs.h.  */
40678int i;
40679_ACEOF
40680if ac_fn_c_try_compile "$LINENO"; then :
40681
40682else
40683  supports=no
40684fi
40685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40686  ac_ext=cpp
40687ac_cpp='$CXXCPP $CPPFLAGS'
40688ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40689ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40690ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40691
40692  CFLAGS="$saved_cflags"
40693
40694  saved_cxxflags="$CXXFLAGS"
40695  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40696  ac_ext=cpp
40697ac_cpp='$CXXCPP $CPPFLAGS'
40698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40701
40702  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40703/* end confdefs.h.  */
40704int i;
40705_ACEOF
40706if ac_fn_cxx_try_compile "$LINENO"; then :
40707
40708else
40709  supports=no
40710fi
40711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40712  ac_ext=cpp
40713ac_cpp='$CXXCPP $CPPFLAGS'
40714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40717
40718  CXXFLAGS="$saved_cxxflags"
40719
40720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40721$as_echo "$supports" >&6; }
40722  if test "x$supports" = "xyes" ; then
40723    HAS_CFLAG_OPTIMIZE_DEBUG=true
40724  else
40725    HAS_CFLAG_OPTIMIZE_DEBUG=false
40726  fi
40727
40728
40729    # "-z relro" supported in GNU binutils 2.17 and later
40730    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40731
40732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40733$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40734  supports=yes
40735
40736  saved_ldflags="$LDFLAGS"
40737  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40738  ac_ext=c
40739ac_cpp='$CPP $CPPFLAGS'
40740ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40741ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40742ac_compiler_gnu=$ac_cv_c_compiler_gnu
40743
40744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40745/* end confdefs.h.  */
40746
40747int
40748main ()
40749{
40750
40751  ;
40752  return 0;
40753}
40754_ACEOF
40755if ac_fn_c_try_link "$LINENO"; then :
40756
40757else
40758  supports=no
40759fi
40760rm -f core conftest.err conftest.$ac_objext \
40761    conftest$ac_exeext conftest.$ac_ext
40762  ac_ext=cpp
40763ac_cpp='$CXXCPP $CPPFLAGS'
40764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40767
40768  LDFLAGS="$saved_ldflags"
40769
40770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40771$as_echo "$supports" >&6; }
40772  if test "x$supports" = "xyes" ; then
40773    HAS_LINKER_RELRO=true
40774  else
40775    HAS_LINKER_RELRO=false
40776  fi
40777
40778
40779    # "-z now" supported in GNU binutils 2.11 and later
40780    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40781
40782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40783$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40784  supports=yes
40785
40786  saved_ldflags="$LDFLAGS"
40787  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40788  ac_ext=c
40789ac_cpp='$CPP $CPPFLAGS'
40790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40792ac_compiler_gnu=$ac_cv_c_compiler_gnu
40793
40794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40795/* end confdefs.h.  */
40796
40797int
40798main ()
40799{
40800
40801  ;
40802  return 0;
40803}
40804_ACEOF
40805if ac_fn_c_try_link "$LINENO"; then :
40806
40807else
40808  supports=no
40809fi
40810rm -f core conftest.err conftest.$ac_objext \
40811    conftest$ac_exeext conftest.$ac_ext
40812  ac_ext=cpp
40813ac_cpp='$CXXCPP $CPPFLAGS'
40814ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40815ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40816ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40817
40818  LDFLAGS="$saved_ldflags"
40819
40820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40821$as_echo "$supports" >&6; }
40822  if test "x$supports" = "xyes" ; then
40823    HAS_LINKER_NOW=true
40824  else
40825    HAS_LINKER_NOW=false
40826  fi
40827
40828  fi
40829
40830  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40831  # in executable.'
40832  USING_BROKEN_SUSE_LD=no
40833  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40835$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40836    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40837    $ECHO "int main() { }" > main.c
40838    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40840$as_echo "no" >&6; }
40841      USING_BROKEN_SUSE_LD=no
40842    else
40843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40844$as_echo "yes" >&6; }
40845      USING_BROKEN_SUSE_LD=yes
40846    fi
40847    rm -rf version-script.map main.c a.out
40848  fi
40849
40850
40851
40852# Setup the JTReg Regression Test Harness.
40853
40854
40855# Check whether --with-jtreg was given.
40856if test "${with_jtreg+set}" = set; then :
40857  withval=$with_jtreg;
40858else
40859  with_jtreg=no
40860fi
40861
40862
40863  if test "x$with_jtreg" = xno; then
40864    # jtreg disabled
40865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40866$as_echo_n "checking for jtreg... " >&6; }
40867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40868$as_echo "no" >&6; }
40869  else
40870    if test "x$with_jtreg" != xyes; then
40871      # with path specified.
40872      JT_HOME="$with_jtreg"
40873    fi
40874
40875    if test "x$JT_HOME" != x; then
40876      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40877$as_echo_n "checking for jtreg... " >&6; }
40878
40879      # use JT_HOME enviroment var.
40880
40881  # Only process if variable expands to non-empty
40882
40883  if test "x$JT_HOME" != x; then
40884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40885
40886  # Input might be given as Windows format, start by converting to
40887  # unix format.
40888  path="$JT_HOME"
40889  new_path=`$CYGPATH -u "$path"`
40890
40891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40894  # "foo.exe" is OK but "foo" is an error.
40895  #
40896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40897  # It is also a way to make sure we got the proper file name for the real test later on.
40898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40899  if test "x$test_shortpath" = x; then
40900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40901$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40902    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40903  fi
40904
40905  # Call helper function which possibly converts this using DOS-style short mode.
40906  # If so, the updated path is stored in $new_path.
40907
40908  input_path="$new_path"
40909  # Check if we need to convert this using DOS-style short mode. If the path
40910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40911  # take no chances and rewrite it.
40912  # Note: m4 eats our [], so we need to use [ and ] instead.
40913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40914  if test "x$has_forbidden_chars" != x; then
40915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40919      # Going to short mode and back again did indeed matter. Since short mode is
40920      # case insensitive, let's make it lowercase to improve readability.
40921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40922      # Now convert it back to Unix-style (cygpath)
40923      input_path=`$CYGPATH -u "$shortmode_path"`
40924      new_path="$input_path"
40925    fi
40926  fi
40927
40928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40929  if test "x$test_cygdrive_prefix" = x; then
40930    # As a simple fix, exclude /usr/bin since it's not a real path.
40931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40933      # a path prefixed by /cygdrive for fixpath to work.
40934      new_path="$CYGWIN_ROOT_PATH$input_path"
40935    fi
40936  fi
40937
40938
40939  if test "x$path" != "x$new_path"; then
40940    JT_HOME="$new_path"
40941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40942$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40943  fi
40944
40945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40946
40947  path="$JT_HOME"
40948  has_colon=`$ECHO $path | $GREP ^.:`
40949  new_path="$path"
40950  if test "x$has_colon" = x; then
40951    # Not in mixed or Windows style, start by that.
40952    new_path=`cmd //c echo $path`
40953  fi
40954
40955
40956  input_path="$new_path"
40957  # Check if we need to convert this using DOS-style short mode. If the path
40958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40959  # take no chances and rewrite it.
40960  # Note: m4 eats our [], so we need to use [ and ] instead.
40961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40962  if test "x$has_forbidden_chars" != x; then
40963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40965  fi
40966
40967
40968  windows_path="$new_path"
40969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40970    unix_path=`$CYGPATH -u "$windows_path"`
40971    new_path="$unix_path"
40972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40974    new_path="$unix_path"
40975  fi
40976
40977  if test "x$path" != "x$new_path"; then
40978    JT_HOME="$new_path"
40979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40980$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40981  fi
40982
40983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40985
40986    else
40987      # We're on a unix platform. Hooray! :)
40988      path="$JT_HOME"
40989      has_space=`$ECHO "$path" | $GREP " "`
40990      if test "x$has_space" != x; then
40991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40992$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40993        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40994      fi
40995
40996      # Use eval to expand a potential ~
40997      eval path="$path"
40998      if test ! -f "$path" && test ! -d "$path"; then
40999        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41000      fi
41001
41002      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41003    fi
41004  fi
41005
41006
41007      # jtreg win32 script works for everybody
41008      JTREGEXE="$JT_HOME/bin/jtreg"
41009
41010      if test ! -f "$JTREGEXE"; then
41011        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41012      fi
41013
41014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41015$as_echo "$JTREGEXE" >&6; }
41016    else
41017      # try to find jtreg on path
41018
41019
41020
41021  # Publish this variable in the help.
41022
41023
41024  if test "x$JTREGEXE" = x; then
41025    # The variable is not set by user, try to locate tool using the code snippet
41026    for ac_prog in jtreg
41027do
41028  # Extract the first word of "$ac_prog", so it can be a program name with args.
41029set dummy $ac_prog; ac_word=$2
41030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41031$as_echo_n "checking for $ac_word... " >&6; }
41032if ${ac_cv_path_JTREGEXE+:} false; then :
41033  $as_echo_n "(cached) " >&6
41034else
41035  case $JTREGEXE in
41036  [\\/]* | ?:[\\/]*)
41037  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41038  ;;
41039  *)
41040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41041for as_dir in $PATH
41042do
41043  IFS=$as_save_IFS
41044  test -z "$as_dir" && as_dir=.
41045    for ac_exec_ext in '' $ac_executable_extensions; do
41046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41047    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41049    break 2
41050  fi
41051done
41052  done
41053IFS=$as_save_IFS
41054
41055  ;;
41056esac
41057fi
41058JTREGEXE=$ac_cv_path_JTREGEXE
41059if test -n "$JTREGEXE"; then
41060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41061$as_echo "$JTREGEXE" >&6; }
41062else
41063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41064$as_echo "no" >&6; }
41065fi
41066
41067
41068  test -n "$JTREGEXE" && break
41069done
41070
41071  else
41072    # The variable is set, but is it from the command line or the environment?
41073
41074    # Try to remove the string !JTREGEXE! from our list.
41075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41077      # If it failed, the variable was not from the command line. Ignore it,
41078      # but warn the user (except for BASH, which is always set by the calling BASH).
41079      if test "xJTREGEXE" != xBASH; then
41080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41081$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41082      fi
41083      # Try to locate tool using the code snippet
41084      for ac_prog in jtreg
41085do
41086  # Extract the first word of "$ac_prog", so it can be a program name with args.
41087set dummy $ac_prog; ac_word=$2
41088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41089$as_echo_n "checking for $ac_word... " >&6; }
41090if ${ac_cv_path_JTREGEXE+:} false; then :
41091  $as_echo_n "(cached) " >&6
41092else
41093  case $JTREGEXE in
41094  [\\/]* | ?:[\\/]*)
41095  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41096  ;;
41097  *)
41098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41099for as_dir in $PATH
41100do
41101  IFS=$as_save_IFS
41102  test -z "$as_dir" && as_dir=.
41103    for ac_exec_ext in '' $ac_executable_extensions; do
41104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41105    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41107    break 2
41108  fi
41109done
41110  done
41111IFS=$as_save_IFS
41112
41113  ;;
41114esac
41115fi
41116JTREGEXE=$ac_cv_path_JTREGEXE
41117if test -n "$JTREGEXE"; then
41118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41119$as_echo "$JTREGEXE" >&6; }
41120else
41121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41122$as_echo "no" >&6; }
41123fi
41124
41125
41126  test -n "$JTREGEXE" && break
41127done
41128
41129    else
41130      # If it succeeded, then it was overridden by the user. We will use it
41131      # for the tool.
41132
41133      # First remove it from the list of overridden variables, so we can test
41134      # for unknown variables in the end.
41135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41136
41137      # Check if the provided tool contains a complete path.
41138      tool_specified="$JTREGEXE"
41139      tool_basename="${tool_specified##*/}"
41140      if test "x$tool_basename" = "x$tool_specified"; then
41141        # A command without a complete path is provided, search $PATH.
41142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41143$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41144        # Extract the first word of "$tool_basename", so it can be a program name with args.
41145set dummy $tool_basename; ac_word=$2
41146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41147$as_echo_n "checking for $ac_word... " >&6; }
41148if ${ac_cv_path_JTREGEXE+:} false; then :
41149  $as_echo_n "(cached) " >&6
41150else
41151  case $JTREGEXE in
41152  [\\/]* | ?:[\\/]*)
41153  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41154  ;;
41155  *)
41156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41157for as_dir in $PATH
41158do
41159  IFS=$as_save_IFS
41160  test -z "$as_dir" && as_dir=.
41161    for ac_exec_ext in '' $ac_executable_extensions; do
41162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41163    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41165    break 2
41166  fi
41167done
41168  done
41169IFS=$as_save_IFS
41170
41171  ;;
41172esac
41173fi
41174JTREGEXE=$ac_cv_path_JTREGEXE
41175if test -n "$JTREGEXE"; then
41176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41177$as_echo "$JTREGEXE" >&6; }
41178else
41179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41180$as_echo "no" >&6; }
41181fi
41182
41183
41184        if test "x$JTREGEXE" = x; then
41185          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41186        fi
41187      else
41188        # Otherwise we believe it is a complete path. Use it as it is.
41189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41190$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41192$as_echo_n "checking for JTREGEXE... " >&6; }
41193        if test ! -x "$tool_specified"; then
41194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41195$as_echo "not found" >&6; }
41196          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41197        fi
41198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41199$as_echo "$tool_specified" >&6; }
41200      fi
41201    fi
41202  fi
41203
41204
41205
41206  if test "x$JTREGEXE" = x; then
41207    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41208  fi
41209
41210
41211      JT_HOME="`$DIRNAME $JTREGEXE`"
41212    fi
41213  fi
41214
41215
41216
41217
41218
41219
41220  # Option used to tell the compiler whether to create 32- or 64-bit executables
41221  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41222    COMPILER_TARGET_BITS_FLAG="-q"
41223  else
41224    COMPILER_TARGET_BITS_FLAG="-m"
41225  fi
41226
41227
41228  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41229  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41230    ARFLAGS="-r"
41231  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41232    ARFLAGS="-X64"
41233  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41234    # lib.exe is used as AR to create static libraries.
41235    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41236  else
41237    ARFLAGS=""
41238  fi
41239
41240
41241  ## Setup strip.
41242  # FIXME: should this really be per platform, or should it be per toolchain type?
41243  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41244  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41245  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41246    STRIPFLAGS="-g"
41247  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41248    STRIPFLAGS="-x"
41249  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41250    STRIPFLAGS="-S"
41251  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41252    STRIPFLAGS="-X32_64"
41253  fi
41254
41255  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41256    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41257  fi
41258
41259
41260  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41261    CC_OUT_OPTION=-Fo
41262    EXE_OUT_OPTION=-out:
41263    LD_OUT_OPTION=-out:
41264    AR_OUT_OPTION=-out:
41265  else
41266    # The option used to specify the target .o,.a or .so file.
41267    # When compiling, how to specify the to be created object file.
41268    CC_OUT_OPTION='-o$(SPACE)'
41269    # When linking, how to specify the to be created executable.
41270    EXE_OUT_OPTION='-o$(SPACE)'
41271    # When linking, how to specify the to be created dynamically linkable library.
41272    LD_OUT_OPTION='-o$(SPACE)'
41273    # When archiving, how to specify the to be create static archive for object files.
41274    AR_OUT_OPTION='rcs$(SPACE)'
41275  fi
41276
41277
41278
41279
41280
41281  # On Windows, we need to set RC flags.
41282  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41283    RC_FLAGS="-nologo -l0x409"
41284    if test "x$VARIANT" = xOPT; then
41285      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41286    fi
41287
41288    # The version variables used to create RC_FLAGS may be overridden
41289    # in a custom configure script, or possibly the command line.
41290    # Let those variables be expanded at make time in spec.gmk.
41291    # The \$ are escaped to the shell, and the $(...) variables
41292    # are evaluated by make.
41293    RC_FLAGS="$RC_FLAGS \
41294        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41295        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41296        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41297        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41298        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41299        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41300        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41301  fi
41302
41303
41304  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41305    # silence copyright notice and other headers.
41306    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41307  fi
41308
41309  if test "x$SYSROOT" != "x"; then
41310    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41311      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41312        # Solaris Studio does not have a concept of sysroot. Instead we must
41313        # make sure the default include and lib dirs are appended to each
41314        # compile and link command line.
41315        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41316        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41317            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41318            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41319      fi
41320    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41321      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41322      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41323      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41324    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41325      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41326      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41327    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41328      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41329      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41330    fi
41331    # Propagate the sysroot args to hotspot
41332    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41333    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41334    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41335  fi
41336
41337  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41338  # set this here so it doesn't have to be peppered throughout the forest
41339  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41340    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41341    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41342  fi
41343
41344
41345
41346
41347
41348# FIXME: Currently we must test this after toolchain but before flags. Fix!
41349
41350# Now we can test some aspects on the target using configure macros.
41351
41352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41353$as_echo_n "checking for ANSI C header files... " >&6; }
41354if ${ac_cv_header_stdc+:} false; then :
41355  $as_echo_n "(cached) " >&6
41356else
41357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41358/* end confdefs.h.  */
41359#include <stdlib.h>
41360#include <stdarg.h>
41361#include <string.h>
41362#include <float.h>
41363
41364int
41365main ()
41366{
41367
41368  ;
41369  return 0;
41370}
41371_ACEOF
41372if ac_fn_cxx_try_compile "$LINENO"; then :
41373  ac_cv_header_stdc=yes
41374else
41375  ac_cv_header_stdc=no
41376fi
41377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41378
41379if test $ac_cv_header_stdc = yes; then
41380  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41382/* end confdefs.h.  */
41383#include <string.h>
41384
41385_ACEOF
41386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41387  $EGREP "memchr" >/dev/null 2>&1; then :
41388
41389else
41390  ac_cv_header_stdc=no
41391fi
41392rm -f conftest*
41393
41394fi
41395
41396if test $ac_cv_header_stdc = yes; then
41397  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41399/* end confdefs.h.  */
41400#include <stdlib.h>
41401
41402_ACEOF
41403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41404  $EGREP "free" >/dev/null 2>&1; then :
41405
41406else
41407  ac_cv_header_stdc=no
41408fi
41409rm -f conftest*
41410
41411fi
41412
41413if test $ac_cv_header_stdc = yes; then
41414  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41415  if test "$cross_compiling" = yes; then :
41416  :
41417else
41418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41419/* end confdefs.h.  */
41420#include <ctype.h>
41421#include <stdlib.h>
41422#if ((' ' & 0x0FF) == 0x020)
41423# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41424# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41425#else
41426# define ISLOWER(c) \
41427		   (('a' <= (c) && (c) <= 'i') \
41428		     || ('j' <= (c) && (c) <= 'r') \
41429		     || ('s' <= (c) && (c) <= 'z'))
41430# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41431#endif
41432
41433#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41434int
41435main ()
41436{
41437  int i;
41438  for (i = 0; i < 256; i++)
41439    if (XOR (islower (i), ISLOWER (i))
41440	|| toupper (i) != TOUPPER (i))
41441      return 2;
41442  return 0;
41443}
41444_ACEOF
41445if ac_fn_cxx_try_run "$LINENO"; then :
41446
41447else
41448  ac_cv_header_stdc=no
41449fi
41450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41451  conftest.$ac_objext conftest.beam conftest.$ac_ext
41452fi
41453
41454fi
41455fi
41456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41457$as_echo "$ac_cv_header_stdc" >&6; }
41458if test $ac_cv_header_stdc = yes; then
41459
41460$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41461
41462fi
41463
41464# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41465for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41466		  inttypes.h stdint.h unistd.h
41467do :
41468  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41469ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41470"
41471if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41472  cat >>confdefs.h <<_ACEOF
41473#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41474_ACEOF
41475
41476fi
41477
41478done
41479
41480
41481
41482  ###############################################################################
41483  #
41484  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41485  # (The JVM can use 32 or 64 bit Java pointers but that decision
41486  # is made at runtime.)
41487  #
41488
41489  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41490    # Always specify -m flag on Solaris
41491    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41492
41493  # When we add flags to the "official" CFLAGS etc, we need to
41494  # keep track of these additions in ADDED_CFLAGS etc. These
41495  # will later be checked to make sure only controlled additions
41496  # have been made to CFLAGS etc.
41497  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41498  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41499  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41500
41501  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41502  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41503  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41504
41505  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41506  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41507  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41508
41509  elif test "x$COMPILE_TYPE" = xreduced; then
41510    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41511      # Specify -m if running reduced on unix platforms
41512
41513  # When we add flags to the "official" CFLAGS etc, we need to
41514  # keep track of these additions in ADDED_CFLAGS etc. These
41515  # will later be checked to make sure only controlled additions
41516  # have been made to CFLAGS etc.
41517  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41518  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41519  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41520
41521  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41522  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41523  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41524
41525  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41526  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41527  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41528
41529    fi
41530  fi
41531
41532  # Make compilation sanity check
41533  for ac_header in stdio.h
41534do :
41535  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41536if test "x$ac_cv_header_stdio_h" = xyes; then :
41537  cat >>confdefs.h <<_ACEOF
41538#define HAVE_STDIO_H 1
41539_ACEOF
41540
41541else
41542
41543    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41544$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41545    if test "x$COMPILE_TYPE" = xreduced; then
41546      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41547$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41548    elif test "x$COMPILE_TYPE" = xcross; then
41549      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41550$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41551    fi
41552    as_fn_error $? "Cannot continue." "$LINENO" 5
41553
41554fi
41555
41556done
41557
41558
41559  # The cast to long int works around a bug in the HP C Compiler
41560# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41561# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41562# This bug is HP SR number 8606223364.
41563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41564$as_echo_n "checking size of int *... " >&6; }
41565if ${ac_cv_sizeof_int_p+:} false; then :
41566  $as_echo_n "(cached) " >&6
41567else
41568  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41569
41570else
41571  if test "$ac_cv_type_int_p" = yes; then
41572     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41573$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41574as_fn_error 77 "cannot compute sizeof (int *)
41575See \`config.log' for more details" "$LINENO" 5; }
41576   else
41577     ac_cv_sizeof_int_p=0
41578   fi
41579fi
41580
41581fi
41582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41583$as_echo "$ac_cv_sizeof_int_p" >&6; }
41584
41585
41586
41587cat >>confdefs.h <<_ACEOF
41588#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41589_ACEOF
41590
41591
41592
41593  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41594  if test "x$ac_cv_sizeof_int_p" = x; then
41595    # The test failed, lets stick to the assumed value.
41596    { $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
41597$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41598  else
41599    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41600
41601    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41602      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41603      # Let's try to implicitely set the compilers target architecture and retry the test
41604      { $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
41605$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;}
41606      { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
41607$as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
41608
41609  # When we add flags to the "official" CFLAGS etc, we need to
41610  # keep track of these additions in ADDED_CFLAGS etc. These
41611  # will later be checked to make sure only controlled additions
41612  # have been made to CFLAGS etc.
41613  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41614  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41615  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41616
41617  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41618  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41619  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41620
41621  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41622  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41623  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41624
41625
41626      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41627      unset ac_cv_sizeof_int_p
41628      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41629      cat >>confdefs.h <<_ACEOF
41630#undef SIZEOF_INT_P
41631_ACEOF
41632
41633      # The cast to long int works around a bug in the HP C Compiler
41634# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41635# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41636# This bug is HP SR number 8606223364.
41637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41638$as_echo_n "checking size of int *... " >&6; }
41639if ${ac_cv_sizeof_int_p+:} false; then :
41640  $as_echo_n "(cached) " >&6
41641else
41642  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41643
41644else
41645  if test "$ac_cv_type_int_p" = yes; then
41646     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41648as_fn_error 77 "cannot compute sizeof (int *)
41649See \`config.log' for more details" "$LINENO" 5; }
41650   else
41651     ac_cv_sizeof_int_p=0
41652   fi
41653fi
41654
41655fi
41656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41657$as_echo "$ac_cv_sizeof_int_p" >&6; }
41658
41659
41660
41661cat >>confdefs.h <<_ACEOF
41662#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41663_ACEOF
41664
41665
41666
41667      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41668
41669      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41670        as_fn_error $? "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)" "$LINENO" 5
41671      fi
41672    fi
41673  fi
41674
41675  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41676$as_echo_n "checking for target address size... " >&6; }
41677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41678$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41679
41680
41681  ###############################################################################
41682  #
41683  # Is the target little of big endian?
41684  #
41685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41686$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41687if ${ac_cv_c_bigendian+:} false; then :
41688  $as_echo_n "(cached) " >&6
41689else
41690  ac_cv_c_bigendian=unknown
41691    # See if we're dealing with a universal compiler.
41692    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41693/* end confdefs.h.  */
41694#ifndef __APPLE_CC__
41695	       not a universal capable compiler
41696	     #endif
41697	     typedef int dummy;
41698
41699_ACEOF
41700if ac_fn_cxx_try_compile "$LINENO"; then :
41701
41702	# Check for potential -arch flags.  It is not universal unless
41703	# there are at least two -arch flags with different values.
41704	ac_arch=
41705	ac_prev=
41706	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41707	 if test -n "$ac_prev"; then
41708	   case $ac_word in
41709	     i?86 | x86_64 | ppc | ppc64)
41710	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41711		 ac_arch=$ac_word
41712	       else
41713		 ac_cv_c_bigendian=universal
41714		 break
41715	       fi
41716	       ;;
41717	   esac
41718	   ac_prev=
41719	 elif test "x$ac_word" = "x-arch"; then
41720	   ac_prev=arch
41721	 fi
41722       done
41723fi
41724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41725    if test $ac_cv_c_bigendian = unknown; then
41726      # See if sys/param.h defines the BYTE_ORDER macro.
41727      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41728/* end confdefs.h.  */
41729#include <sys/types.h>
41730	     #include <sys/param.h>
41731
41732int
41733main ()
41734{
41735#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41736		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41737		     && LITTLE_ENDIAN)
41738	      bogus endian macros
41739	     #endif
41740
41741  ;
41742  return 0;
41743}
41744_ACEOF
41745if ac_fn_cxx_try_compile "$LINENO"; then :
41746  # It does; now see whether it defined to BIG_ENDIAN or not.
41747	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41748/* end confdefs.h.  */
41749#include <sys/types.h>
41750		#include <sys/param.h>
41751
41752int
41753main ()
41754{
41755#if BYTE_ORDER != BIG_ENDIAN
41756		 not big endian
41757		#endif
41758
41759  ;
41760  return 0;
41761}
41762_ACEOF
41763if ac_fn_cxx_try_compile "$LINENO"; then :
41764  ac_cv_c_bigendian=yes
41765else
41766  ac_cv_c_bigendian=no
41767fi
41768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41769fi
41770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41771    fi
41772    if test $ac_cv_c_bigendian = unknown; then
41773      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41774      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41775/* end confdefs.h.  */
41776#include <limits.h>
41777
41778int
41779main ()
41780{
41781#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41782	      bogus endian macros
41783	     #endif
41784
41785  ;
41786  return 0;
41787}
41788_ACEOF
41789if ac_fn_cxx_try_compile "$LINENO"; then :
41790  # It does; now see whether it defined to _BIG_ENDIAN or not.
41791	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41792/* end confdefs.h.  */
41793#include <limits.h>
41794
41795int
41796main ()
41797{
41798#ifndef _BIG_ENDIAN
41799		 not big endian
41800		#endif
41801
41802  ;
41803  return 0;
41804}
41805_ACEOF
41806if ac_fn_cxx_try_compile "$LINENO"; then :
41807  ac_cv_c_bigendian=yes
41808else
41809  ac_cv_c_bigendian=no
41810fi
41811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41812fi
41813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41814    fi
41815    if test $ac_cv_c_bigendian = unknown; then
41816      # Compile a test program.
41817      if test "$cross_compiling" = yes; then :
41818  # Try to guess by grepping values from an object file.
41819	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41820/* end confdefs.h.  */
41821short int ascii_mm[] =
41822		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41823		short int ascii_ii[] =
41824		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41825		int use_ascii (int i) {
41826		  return ascii_mm[i] + ascii_ii[i];
41827		}
41828		short int ebcdic_ii[] =
41829		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41830		short int ebcdic_mm[] =
41831		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41832		int use_ebcdic (int i) {
41833		  return ebcdic_mm[i] + ebcdic_ii[i];
41834		}
41835		extern int foo;
41836
41837int
41838main ()
41839{
41840return use_ascii (foo) == use_ebcdic (foo);
41841  ;
41842  return 0;
41843}
41844_ACEOF
41845if ac_fn_cxx_try_compile "$LINENO"; then :
41846  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41847	      ac_cv_c_bigendian=yes
41848	    fi
41849	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41850	      if test "$ac_cv_c_bigendian" = unknown; then
41851		ac_cv_c_bigendian=no
41852	      else
41853		# finding both strings is unlikely to happen, but who knows?
41854		ac_cv_c_bigendian=unknown
41855	      fi
41856	    fi
41857fi
41858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41859else
41860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41861/* end confdefs.h.  */
41862$ac_includes_default
41863int
41864main ()
41865{
41866
41867	     /* Are we little or big endian?  From Harbison&Steele.  */
41868	     union
41869	     {
41870	       long int l;
41871	       char c[sizeof (long int)];
41872	     } u;
41873	     u.l = 1;
41874	     return u.c[sizeof (long int) - 1] == 1;
41875
41876  ;
41877  return 0;
41878}
41879_ACEOF
41880if ac_fn_cxx_try_run "$LINENO"; then :
41881  ac_cv_c_bigendian=no
41882else
41883  ac_cv_c_bigendian=yes
41884fi
41885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41886  conftest.$ac_objext conftest.beam conftest.$ac_ext
41887fi
41888
41889    fi
41890fi
41891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41892$as_echo "$ac_cv_c_bigendian" >&6; }
41893 case $ac_cv_c_bigendian in #(
41894   yes)
41895     ENDIAN="big";; #(
41896   no)
41897     ENDIAN="little" ;; #(
41898   universal)
41899     ENDIAN="universal_endianness"
41900     ;; #(
41901   *)
41902     ENDIAN="unknown" ;;
41903 esac
41904
41905
41906  if test "x$ENDIAN" = xuniversal_endianness; then
41907    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41908  fi
41909  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41910    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
41911  fi
41912
41913
41914# Configure flags for the tools
41915
41916  ###############################################################################
41917  #
41918  # How to compile shared libraries.
41919  #
41920
41921  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41922    PICFLAG="-fPIC"
41923    C_FLAG_REORDER=''
41924    CXX_FLAG_REORDER=''
41925
41926    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41927      # Linking is different on MacOSX
41928      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41929      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41930      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41931      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41932      SET_SHARED_LIBRARY_MAPFILE=''
41933    else
41934      # Default works for linux, might work on other platforms as well.
41935      SHARED_LIBRARY_FLAGS='-shared'
41936      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41937      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41938      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41939      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41940    fi
41941  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41942    PICFLAG=''
41943    C_FLAG_REORDER=''
41944    CXX_FLAG_REORDER=''
41945
41946    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41947      # Linking is different on MacOSX
41948      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41949      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41950      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41951      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41952      SET_SHARED_LIBRARY_MAPFILE=''
41953    else
41954      # Default works for linux, might work on other platforms as well.
41955      SHARED_LIBRARY_FLAGS='-shared'
41956      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41957      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41958      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41959      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41960    fi
41961  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41962    PICFLAG="-KPIC"
41963    C_FLAG_REORDER='-xF'
41964    CXX_FLAG_REORDER='-xF'
41965    SHARED_LIBRARY_FLAGS="-G"
41966    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41967    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41968    SET_SHARED_LIBRARY_NAME=''
41969    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41970  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41971    PICFLAG="-qpic=large"
41972    C_FLAG_REORDER=''
41973    CXX_FLAG_REORDER=''
41974    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41975    SET_EXECUTABLE_ORIGIN=""
41976    SET_SHARED_LIBRARY_ORIGIN=''
41977    SET_SHARED_LIBRARY_NAME=''
41978    SET_SHARED_LIBRARY_MAPFILE=''
41979  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41980    PICFLAG=""
41981    C_FLAG_REORDER=''
41982    CXX_FLAG_REORDER=''
41983    SHARED_LIBRARY_FLAGS="-LD"
41984    SET_EXECUTABLE_ORIGIN=''
41985    SET_SHARED_LIBRARY_ORIGIN=''
41986    SET_SHARED_LIBRARY_NAME=''
41987    SET_SHARED_LIBRARY_MAPFILE=''
41988  fi
41989
41990
41991
41992
41993
41994
41995
41996
41997  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41998    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41999    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42000    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42001  fi
42002  # The (cross) compiler is now configured, we can now test capabilities
42003  # of the target platform.
42004
42005
42006
42007  ###############################################################################
42008  #
42009  # Setup the opt flags for different compilers
42010  # and different operating systems.
42011  #
42012
42013  # FIXME: this was indirectly the old default, but just inherited.
42014  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42015  #   C_FLAG_DEPS="-MMD -MF"
42016  # fi
42017
42018  # Generate make dependency files
42019  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42020    C_FLAG_DEPS="-MMD -MF"
42021  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42022    C_FLAG_DEPS="-MMD -MF"
42023  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42024    C_FLAG_DEPS="-xMMD -xMF"
42025  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42026    C_FLAG_DEPS="-qmakedep=gcc -MF"
42027  fi
42028  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42029
42030
42031
42032  # Debug symbols
42033  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42034    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42035      # reduce from default "-g2" option to save space
42036      CFLAGS_DEBUG_SYMBOLS="-g1"
42037      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42038    else
42039      CFLAGS_DEBUG_SYMBOLS="-g"
42040      CXXFLAGS_DEBUG_SYMBOLS="-g"
42041    fi
42042  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42043    CFLAGS_DEBUG_SYMBOLS="-g"
42044    CXXFLAGS_DEBUG_SYMBOLS="-g"
42045  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42046    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42047    # FIXME: likely a bug, this disables debug symbols rather than enables them
42048    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42049  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42050    CFLAGS_DEBUG_SYMBOLS="-g"
42051    CXXFLAGS_DEBUG_SYMBOLS="-g"
42052  fi
42053
42054
42055
42056  # bounds, memory and behavior checking options
42057  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42058    case $DEBUG_LEVEL in
42059    release )
42060      # no adjustment
42061      ;;
42062    fastdebug )
42063      # no adjustment
42064      ;;
42065    slowdebug )
42066      # Add runtime stack smashing and undefined behavior checks.
42067      # Not all versions of gcc support -fstack-protector
42068      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42069
42070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42071$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42072  supports=yes
42073
42074  saved_cflags="$CFLAGS"
42075  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42076  ac_ext=c
42077ac_cpp='$CPP $CPPFLAGS'
42078ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42079ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42080ac_compiler_gnu=$ac_cv_c_compiler_gnu
42081
42082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42083/* end confdefs.h.  */
42084int i;
42085_ACEOF
42086if ac_fn_c_try_compile "$LINENO"; then :
42087
42088else
42089  supports=no
42090fi
42091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42092  ac_ext=cpp
42093ac_cpp='$CXXCPP $CPPFLAGS'
42094ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42095ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42096ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42097
42098  CFLAGS="$saved_cflags"
42099
42100  saved_cxxflags="$CXXFLAGS"
42101  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42102  ac_ext=cpp
42103ac_cpp='$CXXCPP $CPPFLAGS'
42104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42107
42108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42109/* end confdefs.h.  */
42110int i;
42111_ACEOF
42112if ac_fn_cxx_try_compile "$LINENO"; then :
42113
42114else
42115  supports=no
42116fi
42117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42118  ac_ext=cpp
42119ac_cpp='$CXXCPP $CPPFLAGS'
42120ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42121ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42122ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42123
42124  CXXFLAGS="$saved_cxxflags"
42125
42126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42127$as_echo "$supports" >&6; }
42128  if test "x$supports" = "xyes" ; then
42129    :
42130  else
42131    STACK_PROTECTOR_CFLAG=""
42132  fi
42133
42134
42135      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42136      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42137      ;;
42138    esac
42139  fi
42140
42141  # Optimization levels
42142  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42143    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42144
42145    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42146      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42147      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42148      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42149      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42150      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42151      C_O_FLAG_NONE="-xregs=no%frameptr"
42152      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42153      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42154      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42155      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42156      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42157      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42158        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42159        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42160      fi
42161    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42162      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42163      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42164      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42165      C_O_FLAG_DEBUG=""
42166      C_O_FLAG_NONE=""
42167      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42168      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42169      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42170      C_O_FLAG_DEBUG=""
42171      CXX_O_FLAG_NONE=""
42172    fi
42173  else
42174    # The remaining toolchains share opt flags between CC and CXX;
42175    # setup for C and duplicate afterwards.
42176    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42177      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42178        # On MacOSX we optimize for size, something
42179        # we should do for all platforms?
42180        C_O_FLAG_HIGHEST="-Os"
42181        C_O_FLAG_HI="-Os"
42182        C_O_FLAG_NORM="-Os"
42183      else
42184        C_O_FLAG_HIGHEST="-O3"
42185        C_O_FLAG_HI="-O3"
42186        C_O_FLAG_NORM="-O2"
42187      fi
42188      C_O_FLAG_DEBUG="-O0"
42189      C_O_FLAG_NONE="-O0"
42190    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42191      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42192        # On MacOSX we optimize for size, something
42193        # we should do for all platforms?
42194        C_O_FLAG_HIGHEST="-Os"
42195        C_O_FLAG_HI="-Os"
42196        C_O_FLAG_NORM="-Os"
42197      else
42198        C_O_FLAG_HIGHEST="-O3"
42199        C_O_FLAG_HI="-O3"
42200        C_O_FLAG_NORM="-O2"
42201      fi
42202      C_O_FLAG_DEBUG="-O0"
42203      C_O_FLAG_NONE="-O0"
42204    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42205      C_O_FLAG_HIGHEST="-O3"
42206      C_O_FLAG_HI="-O3 -qstrict"
42207      C_O_FLAG_NORM="-O2"
42208      C_O_FLAG_DEBUG="-qnoopt"
42209      C_O_FLAG_NONE="-qnoop"
42210    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42211      C_O_FLAG_HIGHEST="-O2"
42212      C_O_FLAG_HI="-O1"
42213      C_O_FLAG_NORM="-O1"
42214      C_O_FLAG_DEBUG="-Od"
42215      C_O_FLAG_NONE="-Od"
42216    fi
42217    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42218    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42219    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42220    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42221    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42222  fi
42223
42224  # Adjust optimization flags according to debug level.
42225  case $DEBUG_LEVEL in
42226    release )
42227      # no adjustment
42228      ;;
42229    fastdebug )
42230      # Not quite so much optimization
42231      C_O_FLAG_HI="$C_O_FLAG_NORM"
42232      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42233      ;;
42234    slowdebug )
42235      # Disable optimization
42236      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42237      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42238      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42239      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42240      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42241      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42242      ;;
42243  esac
42244
42245
42246
42247
42248
42249
42250
42251
42252
42253
42254
42255
42256
42257  # Special extras...
42258  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42259    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42260      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42261      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42262    fi
42263    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42264    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42265  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42266    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42267    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42268  fi
42269
42270  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42271    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42272$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42273  fi
42274
42275  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42276    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42277$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42278  fi
42279
42280  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42281    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42282$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42283  fi
42284
42285
42286# Check whether --with-extra-cflags was given.
42287if test "${with_extra_cflags+set}" = set; then :
42288  withval=$with_extra_cflags;
42289fi
42290
42291
42292
42293# Check whether --with-extra-cxxflags was given.
42294if test "${with_extra_cxxflags+set}" = set; then :
42295  withval=$with_extra_cxxflags;
42296fi
42297
42298
42299
42300# Check whether --with-extra-ldflags was given.
42301if test "${with_extra_ldflags+set}" = set; then :
42302  withval=$with_extra_ldflags;
42303fi
42304
42305
42306  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42307  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42308  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42309
42310  # Hotspot needs these set in their legacy form
42311  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42312  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42313  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42314
42315
42316
42317
42318
42319  ###############################################################################
42320  #
42321  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42322  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42323  #
42324
42325  # Setup compiler/platform specific flags into
42326  #    CFLAGS_JDK    - C Compiler flags
42327  #    CXXFLAGS_JDK  - C++ Compiler flags
42328  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42329  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42330    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42331      # Force compatibility with i586 on 32 bit intel platforms.
42332      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42333    fi
42334    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42335        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42336    case $OPENJDK_TARGET_CPU_ARCH in
42337      arm )
42338        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42339        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42340        ;;
42341      ppc )
42342        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42343        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42344        ;;
42345      * )
42346        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42347        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42348        ;;
42349    esac
42350  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42351    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42352    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42353      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42354    fi
42355
42356    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42357    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42358  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42359    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42360    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42361  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42362    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42363        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42364        -DWIN32_LEAN_AND_MEAN \
42365        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42366        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42367        -DWIN32 -DIAL"
42368    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42369      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42370    else
42371      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42372    fi
42373    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42374    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42375    # studio.
42376    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42377      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42378          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42379    fi
42380  fi
42381
42382  ###############################################################################
42383
42384  # Adjust flags according to debug level.
42385  case $DEBUG_LEVEL in
42386    fastdebug | slowdebug )
42387      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42388      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42389      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42390      ;;
42391    release )
42392      ;;
42393    * )
42394      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42395      ;;
42396  esac
42397
42398  # Setup LP64
42399  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42400
42401  # Set some common defines. These works for all compilers, but assume
42402  # -D is universally accepted.
42403
42404  # Setup endianness
42405  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42406    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42407    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42408    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42409    #   Note: -Dmacro         is the same as    #define macro 1
42410    #         -Dmacro=        is the same as    #define macro
42411    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42412      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42413    else
42414      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42415    fi
42416  else
42417    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42418    # are defined in the system?
42419    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42420      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42421    else
42422      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42423    fi
42424  fi
42425
42426  # Setup target OS define. Use OS target name but in upper case.
42427  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42428  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42429
42430  # Setup target CPU
42431  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42432
42433  # Setup debug/release defines
42434  if test "x$DEBUG_LEVEL" = xrelease; then
42435    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42436    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42437      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42438    fi
42439  else
42440    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42441  fi
42442
42443  # Setup release name
42444  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42445
42446
42447  # Set some additional per-OS defines.
42448  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42449    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42450  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42451    # FIXME: PPC64 should not be here.
42452    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42453  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42454    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42455  fi
42456
42457  # Additional macosx handling
42458  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42459    # Setting these parameters makes it an error to link to macosx APIs that are
42460    # newer than the given OS version and makes the linked binaries compatible
42461    # even if built on a newer version of the OS.
42462    # The expected format is X.Y.Z
42463    MACOSX_VERSION_MIN=10.7.0
42464
42465
42466    # The macro takes the version with no dots, ex: 1070
42467    # Let the flags variables get resolved in make for easier override on make
42468    # command line.
42469    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42470    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42471  fi
42472
42473  # Setup some hard coded includes
42474  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42475      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42476      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42477      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42478
42479  # The shared libraries are compiled using the picflag.
42480  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42481  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42482
42483  # Executable flags
42484  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42485  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42486
42487
42488
42489
42490
42491
42492  # Flags for compiling test libraries
42493  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42494  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42495
42496  # Flags for compiling test executables
42497  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42498  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42499
42500
42501
42502
42503
42504
42505  # Setup LDFLAGS et al.
42506  #
42507
42508  # Now this is odd. The JDK native libraries have to link against libjvm.so
42509  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42510  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42511  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42512  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42513  # libraries will link to whatever is in memory. Yuck.
42514  #
42515  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42516  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42517    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42518    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42519      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42520    fi
42521    # TODO: make -debug optional "--disable-full-debug-symbols"
42522    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42523  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42524    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42525    # We have previously set HAS_GNU_HASH if this is the case
42526    if test -n "$HAS_GNU_HASH"; then
42527      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42528    fi
42529    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42530      # And since we now know that the linker is gnu, then add -z defs, to forbid
42531      # undefined symbols in object files.
42532      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42533      case $DEBUG_LEVEL in
42534        release )
42535          # tell linker to optimize libraries.
42536          # Should this be supplied to the OSS linker as well?
42537          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42538          ;;
42539        slowdebug )
42540          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42541            # do relocations at load
42542            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42543            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42544          fi
42545          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42546            # mark relocations read only
42547            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42548            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42549          fi
42550          ;;
42551        fastdebug )
42552          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42553            # mark relocations read only
42554            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42555            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42556          fi
42557          ;;
42558        * )
42559          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42560          ;;
42561        esac
42562    fi
42563  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42564    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42565    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42566  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42567    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42568  fi
42569
42570  # Customize LDFLAGS for executables
42571
42572  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42573
42574  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42575    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42576      LDFLAGS_STACK_SIZE=1048576
42577    else
42578      LDFLAGS_STACK_SIZE=327680
42579    fi
42580    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42581  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42582    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42583  fi
42584
42585  # Customize LDFLAGS for libs
42586  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42587
42588  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42589    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42590    LDFLAGS_JDKLIB_SUFFIX=""
42591  else
42592    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42593        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42594
42595    # On some platforms (mac) the linker warns about non existing -L dirs.
42596    # Add server first if available. Linking aginst client does not always produce the same results.
42597    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42598    # Default to server for other variants.
42599    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42600      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42601    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42602      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42603    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42604      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42605    else
42606      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42607    fi
42608
42609    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42610    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42611      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42612    fi
42613  fi
42614
42615
42616
42617
42618
42619
42620
42621  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42622  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42623  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42624  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42625
42626
42627
42628
42629
42630
42631
42632  # Some Zero and Shark settings.
42633  # ZERO_ARCHFLAG tells the compiler which mode to build for
42634  case "${OPENJDK_TARGET_CPU}" in
42635    s390)
42636      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42637      ;;
42638    *)
42639      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42640  esac
42641
42642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42643$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42644  supports=yes
42645
42646  saved_cflags="$CFLAGS"
42647  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42648  ac_ext=c
42649ac_cpp='$CPP $CPPFLAGS'
42650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42652ac_compiler_gnu=$ac_cv_c_compiler_gnu
42653
42654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42655/* end confdefs.h.  */
42656int i;
42657_ACEOF
42658if ac_fn_c_try_compile "$LINENO"; then :
42659
42660else
42661  supports=no
42662fi
42663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42664  ac_ext=cpp
42665ac_cpp='$CXXCPP $CPPFLAGS'
42666ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42667ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42668ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42669
42670  CFLAGS="$saved_cflags"
42671
42672  saved_cxxflags="$CXXFLAGS"
42673  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42674  ac_ext=cpp
42675ac_cpp='$CXXCPP $CPPFLAGS'
42676ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42677ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42678ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42679
42680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42681/* end confdefs.h.  */
42682int i;
42683_ACEOF
42684if ac_fn_cxx_try_compile "$LINENO"; then :
42685
42686else
42687  supports=no
42688fi
42689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42690  ac_ext=cpp
42691ac_cpp='$CXXCPP $CPPFLAGS'
42692ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42693ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42694ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42695
42696  CXXFLAGS="$saved_cxxflags"
42697
42698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42699$as_echo "$supports" >&6; }
42700  if test "x$supports" = "xyes" ; then
42701    :
42702  else
42703    ZERO_ARCHFLAG=""
42704  fi
42705
42706
42707
42708  # Check that the compiler supports -mX (or -qX on AIX) flags
42709  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42710
42711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42712$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42713  supports=yes
42714
42715  saved_cflags="$CFLAGS"
42716  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42717  ac_ext=c
42718ac_cpp='$CPP $CPPFLAGS'
42719ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42720ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42721ac_compiler_gnu=$ac_cv_c_compiler_gnu
42722
42723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42724/* end confdefs.h.  */
42725int i;
42726_ACEOF
42727if ac_fn_c_try_compile "$LINENO"; then :
42728
42729else
42730  supports=no
42731fi
42732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42733  ac_ext=cpp
42734ac_cpp='$CXXCPP $CPPFLAGS'
42735ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42736ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42737ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42738
42739  CFLAGS="$saved_cflags"
42740
42741  saved_cxxflags="$CXXFLAGS"
42742  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42743  ac_ext=cpp
42744ac_cpp='$CXXCPP $CPPFLAGS'
42745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42748
42749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42750/* end confdefs.h.  */
42751int i;
42752_ACEOF
42753if ac_fn_cxx_try_compile "$LINENO"; then :
42754
42755else
42756  supports=no
42757fi
42758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42759  ac_ext=cpp
42760ac_cpp='$CXXCPP $CPPFLAGS'
42761ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42762ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42763ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42764
42765  CXXFLAGS="$saved_cxxflags"
42766
42767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42768$as_echo "$supports" >&6; }
42769  if test "x$supports" = "xyes" ; then
42770    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42771  else
42772    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42773  fi
42774
42775
42776
42777  # Check whether --enable-warnings-as-errors was given.
42778if test "${enable_warnings_as_errors+set}" = set; then :
42779  enableval=$enable_warnings_as_errors;
42780fi
42781
42782
42783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42784$as_echo_n "checking if native warnings are errors... " >&6; }
42785  if test "x$enable_warnings_as_errors" = "xyes"; then
42786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42787$as_echo "yes (explicitely set)" >&6; }
42788    WARNINGS_AS_ERRORS=true
42789  elif test "x$enable_warnings_as_errors" = "xno"; then
42790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42791$as_echo "no" >&6; }
42792    WARNINGS_AS_ERRORS=false
42793  elif test "x$enable_warnings_as_errors" = "x"; then
42794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42795$as_echo "yes (default)" >&6; }
42796    WARNINGS_AS_ERRORS=true
42797  else
42798    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42799  fi
42800
42801
42802  case "${TOOLCHAIN_TYPE}" in
42803    microsoft)
42804      DISABLE_WARNING_PREFIX="-wd"
42805      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42806      ;;
42807    solstudio)
42808      DISABLE_WARNING_PREFIX="-erroff="
42809      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42810      ;;
42811    gcc)
42812      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42813
42814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42815$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42816  supports=yes
42817
42818  saved_cflags="$CFLAGS"
42819  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42820  ac_ext=c
42821ac_cpp='$CPP $CPPFLAGS'
42822ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42823ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42824ac_compiler_gnu=$ac_cv_c_compiler_gnu
42825
42826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42827/* end confdefs.h.  */
42828int i;
42829_ACEOF
42830if ac_fn_c_try_compile "$LINENO"; then :
42831
42832else
42833  supports=no
42834fi
42835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42836  ac_ext=cpp
42837ac_cpp='$CXXCPP $CPPFLAGS'
42838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42841
42842  CFLAGS="$saved_cflags"
42843
42844  saved_cxxflags="$CXXFLAGS"
42845  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42846  ac_ext=cpp
42847ac_cpp='$CXXCPP $CPPFLAGS'
42848ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42849ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42850ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42851
42852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42853/* end confdefs.h.  */
42854int i;
42855_ACEOF
42856if ac_fn_cxx_try_compile "$LINENO"; then :
42857
42858else
42859  supports=no
42860fi
42861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42862  ac_ext=cpp
42863ac_cpp='$CXXCPP $CPPFLAGS'
42864ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42865ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42866ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42867
42868  CXXFLAGS="$saved_cxxflags"
42869
42870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42871$as_echo "$supports" >&6; }
42872  if test "x$supports" = "xyes" ; then
42873    GCC_CAN_DISABLE_WARNINGS=true
42874  else
42875    GCC_CAN_DISABLE_WARNINGS=false
42876
42877  fi
42878
42879      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42880        DISABLE_WARNING_PREFIX="-Wno-"
42881      else
42882        DISABLE_WARNING_PREFIX=
42883      fi
42884      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42885      ;;
42886    clang)
42887      DISABLE_WARNING_PREFIX="-Wno-"
42888      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42889      ;;
42890  esac
42891
42892
42893
42894
42895# Setup debug symbols (need objcopy from the toolchain for that)
42896
42897  #
42898  # ENABLE_DEBUG_SYMBOLS
42899  # This must be done after the toolchain is setup, since we're looking at objcopy.
42900  #
42901  # Check whether --enable-debug-symbols was given.
42902if test "${enable_debug_symbols+set}" = set; then :
42903  enableval=$enable_debug_symbols;
42904fi
42905
42906
42907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42908$as_echo_n "checking if we should generate debug symbols... " >&6; }
42909
42910  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42911    # explicit enabling of enable-debug-symbols and can't find objcopy
42912    #   this is an error
42913    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42914  fi
42915
42916  if test "x$enable_debug_symbols" = "xyes"; then
42917    ENABLE_DEBUG_SYMBOLS=true
42918  elif test "x$enable_debug_symbols" = "xno"; then
42919    ENABLE_DEBUG_SYMBOLS=false
42920  else
42921    # Default is on if objcopy is found
42922    if test "x$OBJCOPY" != x; then
42923      ENABLE_DEBUG_SYMBOLS=true
42924    # MacOS X and Windows don't use objcopy but default is on for those OSes
42925    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42926      ENABLE_DEBUG_SYMBOLS=true
42927    else
42928      ENABLE_DEBUG_SYMBOLS=false
42929    fi
42930  fi
42931
42932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42933$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42934
42935  #
42936  # ZIP_DEBUGINFO_FILES
42937  #
42938  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42939$as_echo_n "checking if we should zip debug-info files... " >&6; }
42940  # Check whether --enable-zip-debug-info was given.
42941if test "${enable_zip_debug_info+set}" = set; then :
42942  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42943else
42944  enable_zip_debug_info="yes"
42945fi
42946
42947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42948$as_echo "${enable_zip_debug_info}" >&6; }
42949
42950  if test "x${enable_zip_debug_info}" = "xno"; then
42951    ZIP_DEBUGINFO_FILES=false
42952  else
42953    ZIP_DEBUGINFO_FILES=true
42954  fi
42955
42956
42957
42958
42959
42960  # Check whether --enable-native-coverage was given.
42961if test "${enable_native_coverage+set}" = set; then :
42962  enableval=$enable_native_coverage;
42963fi
42964
42965  GCOV_ENABLED="false"
42966  if test "x$enable_native_coverage" = "xyes"; then
42967    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42968      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42969$as_echo_n "checking if native coverage is enabled... " >&6; }
42970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42971$as_echo "yes" >&6; }
42972      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42973      GCOV_LDFLAGS="-fprofile-arcs"
42974      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42975      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42976      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42977      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42978      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42979      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42980      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42981      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42982      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42983      GCOV_ENABLED="true"
42984    else
42985      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42986    fi
42987  elif test "x$enable_native_coverage" = "xno"; then
42988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42989$as_echo_n "checking if native coverage is enabled... " >&6; }
42990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42991$as_echo "no" >&6; }
42992  elif test "x$enable_native_coverage" != "x"; then
42993    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42994  fi
42995
42996
42997
42998
42999###############################################################################
43000#
43001# Check dependencies for external and internal libraries.
43002#
43003###############################################################################
43004
43005# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43006
43007  # When using cygwin or msys, we need a wrapper binary that renames
43008  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43009  # @files and rewrites these too! This wrapper binary is
43010  # called fixpath.
43011  FIXPATH=
43012  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43014$as_echo_n "checking if fixpath can be created... " >&6; }
43015    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43016    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43017    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43018    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43019      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43020      FIXPATH="$FIXPATH_BIN -c"
43021    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43022      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43023      # @ was chosen as separator to minimize risk of other tools messing around with it
43024      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43025          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43026      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43027      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43028    fi
43029    FIXPATH_SRC_W="$FIXPATH_SRC"
43030    FIXPATH_BIN_W="$FIXPATH_BIN"
43031
43032  unix_path="$FIXPATH_SRC_W"
43033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43034    windows_path=`$CYGPATH -m "$unix_path"`
43035    FIXPATH_SRC_W="$windows_path"
43036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43037    windows_path=`cmd //c echo $unix_path`
43038    FIXPATH_SRC_W="$windows_path"
43039  fi
43040
43041
43042  unix_path="$FIXPATH_BIN_W"
43043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43044    windows_path=`$CYGPATH -m "$unix_path"`
43045    FIXPATH_BIN_W="$windows_path"
43046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43047    windows_path=`cmd //c echo $unix_path`
43048    FIXPATH_BIN_W="$windows_path"
43049  fi
43050
43051    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43052    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43053    cd $FIXPATH_DIR
43054    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43055    cd $CURDIR
43056
43057    if test ! -x $FIXPATH_BIN; then
43058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43059$as_echo "no" >&6; }
43060      cat $FIXPATH_DIR/fixpath1.log
43061      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43062    fi
43063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43064$as_echo "yes" >&6; }
43065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43066$as_echo_n "checking if fixpath.exe works... " >&6; }
43067    cd $FIXPATH_DIR
43068    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43069        > $FIXPATH_DIR/fixpath2.log 2>&1
43070    cd $CURDIR
43071    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43073$as_echo "no" >&6; }
43074      cat $FIXPATH_DIR/fixpath2.log
43075      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43076    fi
43077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43078$as_echo "yes" >&6; }
43079  fi
43080
43081
43082
43083
43084
43085
43086  ###############################################################################
43087  #
43088  # OS specific settings that we never will need to probe.
43089  #
43090  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43092$as_echo_n "checking what is not needed on Linux?... " >&6; }
43093    PULSE_NOT_NEEDED=yes
43094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43095$as_echo "pulse" >&6; }
43096  fi
43097
43098  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43100$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43101    ALSA_NOT_NEEDED=yes
43102    PULSE_NOT_NEEDED=yes
43103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43104$as_echo "alsa pulse" >&6; }
43105  fi
43106
43107  if test "x$OPENJDK_TARGET_OS" = xaix; then
43108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43109$as_echo_n "checking what is not needed on AIX?... " >&6; }
43110    ALSA_NOT_NEEDED=yes
43111    PULSE_NOT_NEEDED=yes
43112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43113$as_echo "alsa pulse" >&6; }
43114  fi
43115
43116
43117  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43119$as_echo_n "checking what is not needed on Windows?... " >&6; }
43120    CUPS_NOT_NEEDED=yes
43121    ALSA_NOT_NEEDED=yes
43122    PULSE_NOT_NEEDED=yes
43123    X11_NOT_NEEDED=yes
43124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43125$as_echo "alsa cups pulse x11" >&6; }
43126  fi
43127
43128  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43130$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43131    ALSA_NOT_NEEDED=yes
43132    PULSE_NOT_NEEDED=yes
43133    X11_NOT_NEEDED=yes
43134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43135$as_echo "alsa pulse x11" >&6; }
43136  fi
43137
43138  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43140$as_echo_n "checking what is not needed on bsd?... " >&6; }
43141    ALSA_NOT_NEEDED=yes
43142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43143$as_echo "alsa" >&6; }
43144  fi
43145
43146  if test "x$OPENJDK" = "xfalse"; then
43147    FREETYPE_NOT_NEEDED=yes
43148  fi
43149
43150  if test "x$SUPPORT_HEADFUL" = xno; then
43151    X11_NOT_NEEDED=yes
43152  fi
43153
43154
43155
43156  ###############################################################################
43157  #
43158  # Check for X Windows
43159  #
43160
43161  if test "x$X11_NOT_NEEDED" = xyes; then
43162    if test "x${with_x}" != x; then
43163      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43164$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43165    fi
43166    X_CFLAGS=
43167    X_LIBS=
43168  else
43169    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43170    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43171    # --x-libraries for the sysroot, if that seems to be correct.
43172    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43173      if test "x$SYSROOT" != "x"; then
43174        if test "x$x_includes" = xNONE; then
43175          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43176            x_includes="$SYSROOT/usr/X11R6/include"
43177          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43178            x_includes="$SYSROOT/usr/include"
43179          fi
43180        fi
43181        if test "x$x_libraries" = xNONE; then
43182          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43183            x_libraries="$SYSROOT/usr/X11R6/lib"
43184          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43185            x_libraries="$SYSROOT/usr/lib64"
43186          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43187            x_libraries="$SYSROOT/usr/lib"
43188          fi
43189        fi
43190      fi
43191    fi
43192
43193    # Now let autoconf do it's magic
43194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43195$as_echo_n "checking for X... " >&6; }
43196
43197
43198# Check whether --with-x was given.
43199if test "${with_x+set}" = set; then :
43200  withval=$with_x;
43201fi
43202
43203# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43204if test "x$with_x" = xno; then
43205  # The user explicitly disabled X.
43206  have_x=disabled
43207else
43208  case $x_includes,$x_libraries in #(
43209    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43210    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43211  $as_echo_n "(cached) " >&6
43212else
43213  # One or both of the vars are not set, and there is no cached value.
43214ac_x_includes=no ac_x_libraries=no
43215rm -f -r conftest.dir
43216if mkdir conftest.dir; then
43217  cd conftest.dir
43218  cat >Imakefile <<'_ACEOF'
43219incroot:
43220	@echo incroot='${INCROOT}'
43221usrlibdir:
43222	@echo usrlibdir='${USRLIBDIR}'
43223libdir:
43224	@echo libdir='${LIBDIR}'
43225_ACEOF
43226  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43227    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43228    for ac_var in incroot usrlibdir libdir; do
43229      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43230    done
43231    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43232    for ac_extension in a so sl dylib la dll; do
43233      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43234	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43235	ac_im_usrlibdir=$ac_im_libdir; break
43236      fi
43237    done
43238    # Screen out bogus values from the imake configuration.  They are
43239    # bogus both because they are the default anyway, and because
43240    # using them would break gcc on systems where it needs fixed includes.
43241    case $ac_im_incroot in
43242	/usr/include) ac_x_includes= ;;
43243	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43244    esac
43245    case $ac_im_usrlibdir in
43246	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43247	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43248    esac
43249  fi
43250  cd ..
43251  rm -f -r conftest.dir
43252fi
43253
43254# Standard set of common directories for X headers.
43255# Check X11 before X11Rn because it is often a symlink to the current release.
43256ac_x_header_dirs='
43257/usr/X11/include
43258/usr/X11R7/include
43259/usr/X11R6/include
43260/usr/X11R5/include
43261/usr/X11R4/include
43262
43263/usr/include/X11
43264/usr/include/X11R7
43265/usr/include/X11R6
43266/usr/include/X11R5
43267/usr/include/X11R4
43268
43269/usr/local/X11/include
43270/usr/local/X11R7/include
43271/usr/local/X11R6/include
43272/usr/local/X11R5/include
43273/usr/local/X11R4/include
43274
43275/usr/local/include/X11
43276/usr/local/include/X11R7
43277/usr/local/include/X11R6
43278/usr/local/include/X11R5
43279/usr/local/include/X11R4
43280
43281/usr/X386/include
43282/usr/x386/include
43283/usr/XFree86/include/X11
43284
43285/usr/include
43286/usr/local/include
43287/usr/unsupported/include
43288/usr/athena/include
43289/usr/local/x11r5/include
43290/usr/lpp/Xamples/include
43291
43292/usr/openwin/include
43293/usr/openwin/share/include'
43294
43295if test "$ac_x_includes" = no; then
43296  # Guess where to find include files, by looking for Xlib.h.
43297  # First, try using that file with no special directory specified.
43298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43299/* end confdefs.h.  */
43300#include <X11/Xlib.h>
43301_ACEOF
43302if ac_fn_cxx_try_cpp "$LINENO"; then :
43303  # We can compile using X headers with no special include directory.
43304ac_x_includes=
43305else
43306  for ac_dir in $ac_x_header_dirs; do
43307  if test -r "$ac_dir/X11/Xlib.h"; then
43308    ac_x_includes=$ac_dir
43309    break
43310  fi
43311done
43312fi
43313rm -f conftest.err conftest.i conftest.$ac_ext
43314fi # $ac_x_includes = no
43315
43316if test "$ac_x_libraries" = no; then
43317  # Check for the libraries.
43318  # See if we find them without any special options.
43319  # Don't add to $LIBS permanently.
43320  ac_save_LIBS=$LIBS
43321  LIBS="-lX11 $LIBS"
43322  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43323/* end confdefs.h.  */
43324#include <X11/Xlib.h>
43325int
43326main ()
43327{
43328XrmInitialize ()
43329  ;
43330  return 0;
43331}
43332_ACEOF
43333if ac_fn_cxx_try_link "$LINENO"; then :
43334  LIBS=$ac_save_LIBS
43335# We can link X programs with no special library path.
43336ac_x_libraries=
43337else
43338  LIBS=$ac_save_LIBS
43339for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43340do
43341  # Don't even attempt the hair of trying to link an X program!
43342  for ac_extension in a so sl dylib la dll; do
43343    if test -r "$ac_dir/libX11.$ac_extension"; then
43344      ac_x_libraries=$ac_dir
43345      break 2
43346    fi
43347  done
43348done
43349fi
43350rm -f core conftest.err conftest.$ac_objext \
43351    conftest$ac_exeext conftest.$ac_ext
43352fi # $ac_x_libraries = no
43353
43354case $ac_x_includes,$ac_x_libraries in #(
43355  no,* | *,no | *\'*)
43356    # Didn't find X, or a directory has "'" in its name.
43357    ac_cv_have_x="have_x=no";; #(
43358  *)
43359    # Record where we found X for the cache.
43360    ac_cv_have_x="have_x=yes\
43361	ac_x_includes='$ac_x_includes'\
43362	ac_x_libraries='$ac_x_libraries'"
43363esac
43364fi
43365;; #(
43366    *) have_x=yes;;
43367  esac
43368  eval "$ac_cv_have_x"
43369fi # $with_x != no
43370
43371if test "$have_x" != yes; then
43372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43373$as_echo "$have_x" >&6; }
43374  no_x=yes
43375else
43376  # If each of the values was on the command line, it overrides each guess.
43377  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43378  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43379  # Update the cache value to reflect the command line values.
43380  ac_cv_have_x="have_x=yes\
43381	ac_x_includes='$x_includes'\
43382	ac_x_libraries='$x_libraries'"
43383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43384$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43385fi
43386
43387    if test "$no_x" = yes; then
43388  # Not all programs may use this symbol, but it does not hurt to define it.
43389
43390$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43391
43392  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43393else
43394  if test -n "$x_includes"; then
43395    X_CFLAGS="$X_CFLAGS -I$x_includes"
43396  fi
43397
43398  # It would also be nice to do this for all -L options, not just this one.
43399  if test -n "$x_libraries"; then
43400    X_LIBS="$X_LIBS -L$x_libraries"
43401    # For Solaris; some versions of Sun CC require a space after -R and
43402    # others require no space.  Words are not sufficient . . . .
43403    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43404$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43405    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43406    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43407    ac_cxx_werror_flag=yes
43408    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43409/* end confdefs.h.  */
43410
43411int
43412main ()
43413{
43414
43415  ;
43416  return 0;
43417}
43418_ACEOF
43419if ac_fn_cxx_try_link "$LINENO"; then :
43420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43421$as_echo "no" >&6; }
43422       X_LIBS="$X_LIBS -R$x_libraries"
43423else
43424  LIBS="$ac_xsave_LIBS -R $x_libraries"
43425       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43426/* end confdefs.h.  */
43427
43428int
43429main ()
43430{
43431
43432  ;
43433  return 0;
43434}
43435_ACEOF
43436if ac_fn_cxx_try_link "$LINENO"; then :
43437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43438$as_echo "yes" >&6; }
43439	  X_LIBS="$X_LIBS -R $x_libraries"
43440else
43441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43442$as_echo "neither works" >&6; }
43443fi
43444rm -f core conftest.err conftest.$ac_objext \
43445    conftest$ac_exeext conftest.$ac_ext
43446fi
43447rm -f core conftest.err conftest.$ac_objext \
43448    conftest$ac_exeext conftest.$ac_ext
43449    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43450    LIBS=$ac_xsave_LIBS
43451  fi
43452
43453  # Check for system-dependent libraries X programs must link with.
43454  # Do this before checking for the system-independent R6 libraries
43455  # (-lICE), since we may need -lsocket or whatever for X linking.
43456
43457  if test "$ISC" = yes; then
43458    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43459  else
43460    # Martyn Johnson says this is needed for Ultrix, if the X
43461    # libraries were built with DECnet support.  And Karl Berry says
43462    # the Alpha needs dnet_stub (dnet does not exist).
43463    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43464    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43465/* end confdefs.h.  */
43466
43467/* Override any GCC internal prototype to avoid an error.
43468   Use char because int might match the return type of a GCC
43469   builtin and then its argument prototype would still apply.  */
43470#ifdef __cplusplus
43471extern "C"
43472#endif
43473char XOpenDisplay ();
43474int
43475main ()
43476{
43477return XOpenDisplay ();
43478  ;
43479  return 0;
43480}
43481_ACEOF
43482if ac_fn_cxx_try_link "$LINENO"; then :
43483
43484else
43485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43486$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43487if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43488  $as_echo_n "(cached) " >&6
43489else
43490  ac_check_lib_save_LIBS=$LIBS
43491LIBS="-ldnet  $LIBS"
43492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43493/* end confdefs.h.  */
43494
43495/* Override any GCC internal prototype to avoid an error.
43496   Use char because int might match the return type of a GCC
43497   builtin and then its argument prototype would still apply.  */
43498#ifdef __cplusplus
43499extern "C"
43500#endif
43501char dnet_ntoa ();
43502int
43503main ()
43504{
43505return dnet_ntoa ();
43506  ;
43507  return 0;
43508}
43509_ACEOF
43510if ac_fn_cxx_try_link "$LINENO"; then :
43511  ac_cv_lib_dnet_dnet_ntoa=yes
43512else
43513  ac_cv_lib_dnet_dnet_ntoa=no
43514fi
43515rm -f core conftest.err conftest.$ac_objext \
43516    conftest$ac_exeext conftest.$ac_ext
43517LIBS=$ac_check_lib_save_LIBS
43518fi
43519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43520$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43521if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43522  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43523fi
43524
43525    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43526      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43527$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43528if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43529  $as_echo_n "(cached) " >&6
43530else
43531  ac_check_lib_save_LIBS=$LIBS
43532LIBS="-ldnet_stub  $LIBS"
43533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43534/* end confdefs.h.  */
43535
43536/* Override any GCC internal prototype to avoid an error.
43537   Use char because int might match the return type of a GCC
43538   builtin and then its argument prototype would still apply.  */
43539#ifdef __cplusplus
43540extern "C"
43541#endif
43542char dnet_ntoa ();
43543int
43544main ()
43545{
43546return dnet_ntoa ();
43547  ;
43548  return 0;
43549}
43550_ACEOF
43551if ac_fn_cxx_try_link "$LINENO"; then :
43552  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43553else
43554  ac_cv_lib_dnet_stub_dnet_ntoa=no
43555fi
43556rm -f core conftest.err conftest.$ac_objext \
43557    conftest$ac_exeext conftest.$ac_ext
43558LIBS=$ac_check_lib_save_LIBS
43559fi
43560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43561$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43562if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43563  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43564fi
43565
43566    fi
43567fi
43568rm -f core conftest.err conftest.$ac_objext \
43569    conftest$ac_exeext conftest.$ac_ext
43570    LIBS="$ac_xsave_LIBS"
43571
43572    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43573    # to get the SysV transport functions.
43574    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43575    # needs -lnsl.
43576    # The nsl library prevents programs from opening the X display
43577    # on Irix 5.2, according to T.E. Dickey.
43578    # The functions gethostbyname, getservbyname, and inet_addr are
43579    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43580    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43581if test "x$ac_cv_func_gethostbyname" = xyes; then :
43582
43583fi
43584
43585    if test $ac_cv_func_gethostbyname = no; then
43586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43587$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43588if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43589  $as_echo_n "(cached) " >&6
43590else
43591  ac_check_lib_save_LIBS=$LIBS
43592LIBS="-lnsl  $LIBS"
43593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43594/* end confdefs.h.  */
43595
43596/* Override any GCC internal prototype to avoid an error.
43597   Use char because int might match the return type of a GCC
43598   builtin and then its argument prototype would still apply.  */
43599#ifdef __cplusplus
43600extern "C"
43601#endif
43602char gethostbyname ();
43603int
43604main ()
43605{
43606return gethostbyname ();
43607  ;
43608  return 0;
43609}
43610_ACEOF
43611if ac_fn_cxx_try_link "$LINENO"; then :
43612  ac_cv_lib_nsl_gethostbyname=yes
43613else
43614  ac_cv_lib_nsl_gethostbyname=no
43615fi
43616rm -f core conftest.err conftest.$ac_objext \
43617    conftest$ac_exeext conftest.$ac_ext
43618LIBS=$ac_check_lib_save_LIBS
43619fi
43620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43621$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43622if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43623  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43624fi
43625
43626      if test $ac_cv_lib_nsl_gethostbyname = no; then
43627	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43628$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43629if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43630  $as_echo_n "(cached) " >&6
43631else
43632  ac_check_lib_save_LIBS=$LIBS
43633LIBS="-lbsd  $LIBS"
43634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43635/* end confdefs.h.  */
43636
43637/* Override any GCC internal prototype to avoid an error.
43638   Use char because int might match the return type of a GCC
43639   builtin and then its argument prototype would still apply.  */
43640#ifdef __cplusplus
43641extern "C"
43642#endif
43643char gethostbyname ();
43644int
43645main ()
43646{
43647return gethostbyname ();
43648  ;
43649  return 0;
43650}
43651_ACEOF
43652if ac_fn_cxx_try_link "$LINENO"; then :
43653  ac_cv_lib_bsd_gethostbyname=yes
43654else
43655  ac_cv_lib_bsd_gethostbyname=no
43656fi
43657rm -f core conftest.err conftest.$ac_objext \
43658    conftest$ac_exeext conftest.$ac_ext
43659LIBS=$ac_check_lib_save_LIBS
43660fi
43661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43662$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43663if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43664  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43665fi
43666
43667      fi
43668    fi
43669
43670    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43671    # socket/setsockopt and other routines are undefined under SCO ODT
43672    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43673    # on later versions), says Simon Leinen: it contains gethostby*
43674    # variants that don't use the name server (or something).  -lsocket
43675    # must be given before -lnsl if both are needed.  We assume that
43676    # if connect needs -lnsl, so does gethostbyname.
43677    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43678if test "x$ac_cv_func_connect" = xyes; then :
43679
43680fi
43681
43682    if test $ac_cv_func_connect = no; then
43683      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43684$as_echo_n "checking for connect in -lsocket... " >&6; }
43685if ${ac_cv_lib_socket_connect+:} false; then :
43686  $as_echo_n "(cached) " >&6
43687else
43688  ac_check_lib_save_LIBS=$LIBS
43689LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43691/* end confdefs.h.  */
43692
43693/* Override any GCC internal prototype to avoid an error.
43694   Use char because int might match the return type of a GCC
43695   builtin and then its argument prototype would still apply.  */
43696#ifdef __cplusplus
43697extern "C"
43698#endif
43699char connect ();
43700int
43701main ()
43702{
43703return connect ();
43704  ;
43705  return 0;
43706}
43707_ACEOF
43708if ac_fn_cxx_try_link "$LINENO"; then :
43709  ac_cv_lib_socket_connect=yes
43710else
43711  ac_cv_lib_socket_connect=no
43712fi
43713rm -f core conftest.err conftest.$ac_objext \
43714    conftest$ac_exeext conftest.$ac_ext
43715LIBS=$ac_check_lib_save_LIBS
43716fi
43717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43718$as_echo "$ac_cv_lib_socket_connect" >&6; }
43719if test "x$ac_cv_lib_socket_connect" = xyes; then :
43720  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43721fi
43722
43723    fi
43724
43725    # Guillermo Gomez says -lposix is necessary on A/UX.
43726    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43727if test "x$ac_cv_func_remove" = xyes; then :
43728
43729fi
43730
43731    if test $ac_cv_func_remove = no; then
43732      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43733$as_echo_n "checking for remove in -lposix... " >&6; }
43734if ${ac_cv_lib_posix_remove+:} false; then :
43735  $as_echo_n "(cached) " >&6
43736else
43737  ac_check_lib_save_LIBS=$LIBS
43738LIBS="-lposix  $LIBS"
43739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43740/* end confdefs.h.  */
43741
43742/* Override any GCC internal prototype to avoid an error.
43743   Use char because int might match the return type of a GCC
43744   builtin and then its argument prototype would still apply.  */
43745#ifdef __cplusplus
43746extern "C"
43747#endif
43748char remove ();
43749int
43750main ()
43751{
43752return remove ();
43753  ;
43754  return 0;
43755}
43756_ACEOF
43757if ac_fn_cxx_try_link "$LINENO"; then :
43758  ac_cv_lib_posix_remove=yes
43759else
43760  ac_cv_lib_posix_remove=no
43761fi
43762rm -f core conftest.err conftest.$ac_objext \
43763    conftest$ac_exeext conftest.$ac_ext
43764LIBS=$ac_check_lib_save_LIBS
43765fi
43766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43767$as_echo "$ac_cv_lib_posix_remove" >&6; }
43768if test "x$ac_cv_lib_posix_remove" = xyes; then :
43769  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43770fi
43771
43772    fi
43773
43774    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43775    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43776if test "x$ac_cv_func_shmat" = xyes; then :
43777
43778fi
43779
43780    if test $ac_cv_func_shmat = no; then
43781      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43782$as_echo_n "checking for shmat in -lipc... " >&6; }
43783if ${ac_cv_lib_ipc_shmat+:} false; then :
43784  $as_echo_n "(cached) " >&6
43785else
43786  ac_check_lib_save_LIBS=$LIBS
43787LIBS="-lipc  $LIBS"
43788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43789/* end confdefs.h.  */
43790
43791/* Override any GCC internal prototype to avoid an error.
43792   Use char because int might match the return type of a GCC
43793   builtin and then its argument prototype would still apply.  */
43794#ifdef __cplusplus
43795extern "C"
43796#endif
43797char shmat ();
43798int
43799main ()
43800{
43801return shmat ();
43802  ;
43803  return 0;
43804}
43805_ACEOF
43806if ac_fn_cxx_try_link "$LINENO"; then :
43807  ac_cv_lib_ipc_shmat=yes
43808else
43809  ac_cv_lib_ipc_shmat=no
43810fi
43811rm -f core conftest.err conftest.$ac_objext \
43812    conftest$ac_exeext conftest.$ac_ext
43813LIBS=$ac_check_lib_save_LIBS
43814fi
43815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43816$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43817if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43818  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43819fi
43820
43821    fi
43822  fi
43823
43824  # Check for libraries that X11R6 Xt/Xaw programs need.
43825  ac_save_LDFLAGS=$LDFLAGS
43826  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43827  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43828  # check for ICE first), but we must link in the order -lSM -lICE or
43829  # we get undefined symbols.  So assume we have SM if we have ICE.
43830  # These have to be linked with before -lX11, unlike the other
43831  # libraries we check for below, so use a different variable.
43832  # John Interrante, Karl Berry
43833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43834$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43835if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43836  $as_echo_n "(cached) " >&6
43837else
43838  ac_check_lib_save_LIBS=$LIBS
43839LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43841/* end confdefs.h.  */
43842
43843/* Override any GCC internal prototype to avoid an error.
43844   Use char because int might match the return type of a GCC
43845   builtin and then its argument prototype would still apply.  */
43846#ifdef __cplusplus
43847extern "C"
43848#endif
43849char IceConnectionNumber ();
43850int
43851main ()
43852{
43853return IceConnectionNumber ();
43854  ;
43855  return 0;
43856}
43857_ACEOF
43858if ac_fn_cxx_try_link "$LINENO"; then :
43859  ac_cv_lib_ICE_IceConnectionNumber=yes
43860else
43861  ac_cv_lib_ICE_IceConnectionNumber=no
43862fi
43863rm -f core conftest.err conftest.$ac_objext \
43864    conftest$ac_exeext conftest.$ac_ext
43865LIBS=$ac_check_lib_save_LIBS
43866fi
43867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43868$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43869if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43870  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43871fi
43872
43873  LDFLAGS=$ac_save_LDFLAGS
43874
43875fi
43876
43877
43878    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43879    # this doesn't make sense so we remove it.
43880    if test "x$COMPILE_TYPE" = xcross; then
43881      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43882    fi
43883
43884    if test "x$no_x" = xyes; then
43885
43886  # Print a helpful message on how to acquire the necessary build dependency.
43887  # x11 is the help tag: freetype, cups, pulse, alsa etc
43888  MISSING_DEPENDENCY=x11
43889
43890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43891    cygwin_help $MISSING_DEPENDENCY
43892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43893    msys_help $MISSING_DEPENDENCY
43894  else
43895    PKGHANDLER_COMMAND=
43896
43897    case $PKGHANDLER in
43898      apt-get)
43899        apt_help     $MISSING_DEPENDENCY ;;
43900      yum)
43901        yum_help     $MISSING_DEPENDENCY ;;
43902      port)
43903        port_help    $MISSING_DEPENDENCY ;;
43904      pkgutil)
43905        pkgutil_help $MISSING_DEPENDENCY ;;
43906      pkgadd)
43907        pkgadd_help  $MISSING_DEPENDENCY ;;
43908    esac
43909
43910    if test "x$PKGHANDLER_COMMAND" != x; then
43911      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43912    fi
43913  fi
43914
43915      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43916    fi
43917
43918    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43919      OPENWIN_HOME="/usr/openwin"
43920      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43921      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43922          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43923          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43924          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43925    fi
43926
43927    ac_ext=c
43928ac_cpp='$CPP $CPPFLAGS'
43929ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43930ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43931ac_compiler_gnu=$ac_cv_c_compiler_gnu
43932
43933    OLD_CFLAGS="$CFLAGS"
43934    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43935
43936    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43937    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43938do :
43939  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43940ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43941          # include <X11/Xlib.h>
43942          # include <X11/Xutil.h>
43943
43944
43945"
43946if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43947  cat >>confdefs.h <<_ACEOF
43948#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43949_ACEOF
43950 X11_HEADERS_OK=yes
43951else
43952  X11_HEADERS_OK=no; break
43953fi
43954
43955done
43956
43957
43958    if test "x$X11_HEADERS_OK" = xno; then
43959
43960  # Print a helpful message on how to acquire the necessary build dependency.
43961  # x11 is the help tag: freetype, cups, pulse, alsa etc
43962  MISSING_DEPENDENCY=x11
43963
43964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43965    cygwin_help $MISSING_DEPENDENCY
43966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43967    msys_help $MISSING_DEPENDENCY
43968  else
43969    PKGHANDLER_COMMAND=
43970
43971    case $PKGHANDLER in
43972      apt-get)
43973        apt_help     $MISSING_DEPENDENCY ;;
43974      yum)
43975        yum_help     $MISSING_DEPENDENCY ;;
43976      port)
43977        port_help    $MISSING_DEPENDENCY ;;
43978      pkgutil)
43979        pkgutil_help $MISSING_DEPENDENCY ;;
43980      pkgadd)
43981        pkgadd_help  $MISSING_DEPENDENCY ;;
43982    esac
43983
43984    if test "x$PKGHANDLER_COMMAND" != x; then
43985      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43986    fi
43987  fi
43988
43989      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43990    fi
43991
43992    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43993    # defined in libawt_xawt.
43994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43995$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43996    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43997/* end confdefs.h.  */
43998#include <X11/extensions/Xrender.h>
43999int
44000main ()
44001{
44002XLinearGradient x;
44003  ;
44004  return 0;
44005}
44006_ACEOF
44007if ac_fn_c_try_compile "$LINENO"; then :
44008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44009$as_echo "yes" >&6; }
44010else
44011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44012$as_echo "no" >&6; }
44013         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44014fi
44015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44016
44017    CFLAGS="$OLD_CFLAGS"
44018    ac_ext=cpp
44019ac_cpp='$CXXCPP $CPPFLAGS'
44020ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44021ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44022ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44023
44024  fi # X11_NOT_NEEDED
44025
44026
44027
44028
44029
44030
44031  ###############################################################################
44032  #
44033  # The common unix printing system cups is used to print from java.
44034  #
44035
44036# Check whether --with-cups was given.
44037if test "${with_cups+set}" = set; then :
44038  withval=$with_cups;
44039fi
44040
44041
44042# Check whether --with-cups-include was given.
44043if test "${with_cups_include+set}" = set; then :
44044  withval=$with_cups_include;
44045fi
44046
44047
44048  if test "x$CUPS_NOT_NEEDED" = xyes; then
44049    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44050      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44051$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44052    fi
44053    CUPS_CFLAGS=
44054  else
44055    CUPS_FOUND=no
44056
44057    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44058      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44059    fi
44060
44061    if test "x${with_cups}" != x; then
44062      CUPS_CFLAGS="-I${with_cups}/include"
44063      CUPS_FOUND=yes
44064    fi
44065    if test "x${with_cups_include}" != x; then
44066      CUPS_CFLAGS="-I${with_cups_include}"
44067      CUPS_FOUND=yes
44068    fi
44069    if test "x$CUPS_FOUND" = xno; then
44070
44071
44072  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44073    # Source the builddeps file again, to make sure it uses the latest variables!
44074    . $builddepsfile
44075    # Look for a target and build machine specific resource!
44076    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44077    if test "x$resource" = x; then
44078      # Ok, lets instead look for a target specific resource
44079      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44080    fi
44081    if test "x$resource" = x; then
44082      # Ok, lets instead look for a build specific resource
44083      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44084    fi
44085    if test "x$resource" = x; then
44086      # Ok, lets instead look for a generic resource
44087      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44088      resource=${builddep_cups}
44089    fi
44090    if test "x$resource" != x; then
44091      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44092$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44093      # If the resource in the builddeps.conf file is an existing directory,
44094      # for example /java/linux/cups
44095      if test -d ${resource}; then
44096        depdir=${resource}
44097      else
44098
44099  # cups is for example mymodule
44100  # $resource is for example libs/general/libmymod_1_2_3.zip
44101  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44102  # $with_builddeps_dir is for example /localhome/builddeps
44103  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44104  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44105  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44106  filename=`basename $resource`
44107  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44108  filebase=${filename%%.*}
44109  extension=${filename#*.}
44110  installdir=$with_builddeps_dir/$filebase
44111  if test ! -f $installdir/$filename.unpacked; then
44112    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44113$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44114    if test ! -d $installdir; then
44115      mkdir -p $installdir
44116    fi
44117    if test ! -d $installdir; then
44118      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44119    fi
44120    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44121    touch $tmpfile
44122    if test ! -f $tmpfile; then
44123      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44124    fi
44125
44126  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44127  # $tmpfile is the local file name for the downloaded file.
44128  VALID_TOOL=no
44129  if test "x$BDEPS_FTP" = xwget; then
44130    VALID_TOOL=yes
44131    wget -O $tmpfile $with_builddeps_server/$resource
44132  fi
44133  if test "x$BDEPS_FTP" = xlftp; then
44134    VALID_TOOL=yes
44135    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44136  fi
44137  if test "x$BDEPS_FTP" = xftp; then
44138    VALID_TOOL=yes
44139    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44140    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44141    FTPUSERPWD=${FTPSERVER%%@*}
44142    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44143      FTPUSER=${userpwd%%:*}
44144      FTPPWD=${userpwd#*@}
44145      FTPSERVER=${FTPSERVER#*@}
44146    else
44147      FTPUSER=ftp
44148      FTPPWD=ftp
44149    fi
44150    # the "pass" command does not work on some
44151    # ftp clients (read ftp.exe) but if it works,
44152    # passive mode is better!
44153    ( \
44154        echo "user $FTPUSER $FTPPWD"        ; \
44155        echo "pass"                         ; \
44156        echo "bin"                          ; \
44157        echo "get $FTPPATH $tmpfile"              ; \
44158    ) | ftp -in $FTPSERVER
44159  fi
44160  if test "x$VALID_TOOL" != xyes; then
44161    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44162  fi
44163
44164    mv $tmpfile $installdir/$filename
44165    if test ! -s $installdir/$filename; then
44166      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44167    fi
44168    case "$extension" in
44169      zip)  echo "Unzipping $installdir/$filename..."
44170        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44171        ;;
44172      tar.gz) echo "Untaring $installdir/$filename..."
44173        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44174        ;;
44175      tgz) echo "Untaring $installdir/$filename..."
44176        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44177        ;;
44178      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44179        ;;
44180    esac
44181  fi
44182  if test -f $installdir/$filename.unpacked; then
44183    depdir=$installdir
44184  fi
44185
44186      fi
44187      # Source the builddeps file again, because in the previous command, the depdir
44188      # was updated to point at the current build dependency install directory.
44189      . $builddepsfile
44190      # Now extract variables from the builddeps.conf files.
44191      theroot=${builddep_cups_ROOT}
44192      thecflags=${builddep_cups_CFLAGS}
44193      thelibs=${builddep_cups_LIBS}
44194      if test "x$depdir" = x; then
44195        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44196      fi
44197      CUPS=$depdir
44198      if test "x$theroot" != x; then
44199        CUPS="$theroot"
44200      fi
44201      if test "x$thecflags" != x; then
44202        CUPS_CFLAGS="$thecflags"
44203      fi
44204      if test "x$thelibs" != x; then
44205        CUPS_LIBS="$thelibs"
44206      fi
44207      CUPS_FOUND=yes
44208
44209    fi
44210
44211  fi
44212
44213    fi
44214    if test "x$CUPS_FOUND" = xno; then
44215      # Are the cups headers installed in the default /usr/include location?
44216      for ac_header in cups/cups.h cups/ppd.h
44217do :
44218  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44219ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44220if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44221  cat >>confdefs.h <<_ACEOF
44222#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44223_ACEOF
44224
44225            CUPS_FOUND=yes
44226            CUPS_CFLAGS=
44227            DEFAULT_CUPS=yes
44228
44229
44230fi
44231
44232done
44233
44234    fi
44235    if test "x$CUPS_FOUND" = xno; then
44236      # Getting nervous now? Lets poke around for standard Solaris third-party
44237      # package installation locations.
44238      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44239$as_echo_n "checking for cups headers... " >&6; }
44240      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44241        # An SFW package seems to be installed!
44242        CUPS_FOUND=yes
44243        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44244      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44245        # A CSW package seems to be installed!
44246        CUPS_FOUND=yes
44247        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44248      fi
44249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44250$as_echo "$CUPS_FOUND" >&6; }
44251    fi
44252    if test "x$CUPS_FOUND" = xno; then
44253
44254  # Print a helpful message on how to acquire the necessary build dependency.
44255  # cups is the help tag: freetype, cups, pulse, alsa etc
44256  MISSING_DEPENDENCY=cups
44257
44258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44259    cygwin_help $MISSING_DEPENDENCY
44260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44261    msys_help $MISSING_DEPENDENCY
44262  else
44263    PKGHANDLER_COMMAND=
44264
44265    case $PKGHANDLER in
44266      apt-get)
44267        apt_help     $MISSING_DEPENDENCY ;;
44268      yum)
44269        yum_help     $MISSING_DEPENDENCY ;;
44270      port)
44271        port_help    $MISSING_DEPENDENCY ;;
44272      pkgutil)
44273        pkgutil_help $MISSING_DEPENDENCY ;;
44274      pkgadd)
44275        pkgadd_help  $MISSING_DEPENDENCY ;;
44276    esac
44277
44278    if test "x$PKGHANDLER_COMMAND" != x; then
44279      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44280    fi
44281  fi
44282
44283      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44284    fi
44285  fi
44286
44287
44288
44289
44290
44291
44292  ###############################################################################
44293  #
44294  # The ubiquitous freetype library is used to render fonts.
44295  #
44296
44297# Check whether --with-freetype was given.
44298if test "${with_freetype+set}" = set; then :
44299  withval=$with_freetype;
44300fi
44301
44302
44303# Check whether --with-freetype-include was given.
44304if test "${with_freetype_include+set}" = set; then :
44305  withval=$with_freetype_include;
44306fi
44307
44308
44309# Check whether --with-freetype-lib was given.
44310if test "${with_freetype_lib+set}" = set; then :
44311  withval=$with_freetype_lib;
44312fi
44313
44314
44315# Check whether --with-freetype-src was given.
44316if test "${with_freetype_src+set}" = set; then :
44317  withval=$with_freetype_src;
44318fi
44319
44320  # Check whether --enable-freetype-bundling was given.
44321if test "${enable_freetype_bundling+set}" = set; then :
44322  enableval=$enable_freetype_bundling;
44323fi
44324
44325
44326  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44327  FREETYPE_BASE_NAME=freetype
44328  FREETYPE_CFLAGS=
44329  FREETYPE_LIBS=
44330  FREETYPE_BUNDLE_LIB_PATH=
44331
44332  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44333    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44334      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44335$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44336    fi
44337    if test "x$enable_freetype_bundling" != x; then
44338      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44339$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44340    fi
44341  else
44342    # freetype is needed to build; go get it!
44343
44344    BUNDLE_FREETYPE="$enable_freetype_bundling"
44345
44346    if  test "x$with_freetype_src" != x; then
44347      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44348        # Try to build freetype if --with-freetype-src was given on Windows
44349
44350  FREETYPE_SRC_PATH="$with_freetype_src"
44351  BUILD_FREETYPE=yes
44352
44353  # Check if the freetype sources are acessible..
44354  if ! test -d $FREETYPE_SRC_PATH; then
44355    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
44356$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44357    BUILD_FREETYPE=no
44358  fi
44359  # ..and contain a vc2010 project file
44360  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44361  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44362    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44363$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44364    BUILD_FREETYPE=no
44365  fi
44366  # Now check if configure found a version of 'msbuild.exe'
44367  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44368    { $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
44369$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;}
44370    BUILD_FREETYPE=no
44371  fi
44372
44373  # Ready to go..
44374  if test "x$BUILD_FREETYPE" = xyes; then
44375
44376    # msbuild requires trailing slashes for output directories
44377    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44378    freetype_lib_path_unix="$freetype_lib_path"
44379    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44380
44381  unix_path="$vcxproj_path"
44382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44383    windows_path=`$CYGPATH -m "$unix_path"`
44384    vcxproj_path="$windows_path"
44385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44386    windows_path=`cmd //c echo $unix_path`
44387    vcxproj_path="$windows_path"
44388  fi
44389
44390
44391  unix_path="$freetype_lib_path"
44392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44393    windows_path=`$CYGPATH -m "$unix_path"`
44394    freetype_lib_path="$windows_path"
44395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44396    windows_path=`cmd //c echo $unix_path`
44397    freetype_lib_path="$windows_path"
44398  fi
44399
44400
44401  unix_path="$freetype_obj_path"
44402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44403    windows_path=`$CYGPATH -m "$unix_path"`
44404    freetype_obj_path="$windows_path"
44405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44406    windows_path=`cmd //c echo $unix_path`
44407    freetype_obj_path="$windows_path"
44408  fi
44409
44410    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44411      freetype_platform=x64
44412    else
44413      freetype_platform=win32
44414    fi
44415
44416    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44417    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44418    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44419    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44420    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44421$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44422
44423    # First we try to build the freetype.dll
44424    $ECHO -e "@echo off\n"\
44425	     "$MSBUILD $vcxproj_path "\
44426		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44427		       "/p:Configuration=\"Release Multithreaded\" "\
44428		       "/p:Platform=$freetype_platform "\
44429		       "/p:ConfigurationType=DynamicLibrary "\
44430		       "/p:TargetName=freetype "\
44431		       "/p:OutDir=\"$freetype_lib_path\" "\
44432		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44433    cmd /c freetype.bat
44434
44435    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44436      # If that succeeds we also build freetype.lib
44437      $ECHO -e "@echo off\n"\
44438	       "$MSBUILD $vcxproj_path "\
44439			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44440			 "/p:Configuration=\"Release Multithreaded\" "\
44441			 "/p:Platform=$freetype_platform "\
44442			 "/p:ConfigurationType=StaticLibrary "\
44443			 "/p:TargetName=freetype "\
44444			 "/p:OutDir=\"$freetype_lib_path\" "\
44445			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44446      cmd /c freetype.bat
44447
44448      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44449	# Once we build both, lib and dll, set freetype lib and include path appropriately
44450	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44451	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44452	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44453$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44454      else
44455	BUILD_FREETYPE=no
44456      fi
44457    else
44458      BUILD_FREETYPE=no
44459    fi
44460  fi
44461
44462        if test "x$BUILD_FREETYPE" = xyes; then
44463          # Okay, we built it. Check that it works.
44464
44465  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44466  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44467  METHOD="--with-freetype-src"
44468
44469  # Let's start with an optimistic view of the world :-)
44470  FOUND_FREETYPE=yes
44471
44472  # First look for the canonical freetype main include file ft2build.h.
44473  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44474    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44475    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44476    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44477      # Fail.
44478      FOUND_FREETYPE=no
44479    fi
44480  fi
44481
44482  if test "x$FOUND_FREETYPE" = xyes; then
44483    # Include file found, let's continue the sanity check.
44484    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44485$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44486
44487    # Reset to default value
44488    FREETYPE_BASE_NAME=freetype
44489    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44490    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44491      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44492          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44493        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44494        # for the .6 version explicitly.
44495        FREETYPE_BASE_NAME=freetype.6
44496        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44497        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44498$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44499      else
44500        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44501$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44502        FOUND_FREETYPE=no
44503      fi
44504    else
44505      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44506        # On Windows, we will need both .lib and .dll file.
44507        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44508          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44509$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44510          FOUND_FREETYPE=no
44511        fi
44512      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44513          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44514        # Found lib in isa dir, use that instead.
44515        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44516        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44517$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44518      fi
44519    fi
44520  fi
44521
44522  if test "x$FOUND_FREETYPE" = xyes; then
44523
44524  # Only process if variable expands to non-empty
44525
44526  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44528
44529  # Input might be given as Windows format, start by converting to
44530  # unix format.
44531  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44532  new_path=`$CYGPATH -u "$path"`
44533
44534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44537  # "foo.exe" is OK but "foo" is an error.
44538  #
44539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44540  # It is also a way to make sure we got the proper file name for the real test later on.
44541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44542  if test "x$test_shortpath" = x; then
44543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44545    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44546  fi
44547
44548  # Call helper function which possibly converts this using DOS-style short mode.
44549  # If so, the updated path is stored in $new_path.
44550
44551  input_path="$new_path"
44552  # Check if we need to convert this using DOS-style short mode. If the path
44553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44554  # take no chances and rewrite it.
44555  # Note: m4 eats our [], so we need to use [ and ] instead.
44556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44557  if test "x$has_forbidden_chars" != x; then
44558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44562      # Going to short mode and back again did indeed matter. Since short mode is
44563      # case insensitive, let's make it lowercase to improve readability.
44564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44565      # Now convert it back to Unix-style (cygpath)
44566      input_path=`$CYGPATH -u "$shortmode_path"`
44567      new_path="$input_path"
44568    fi
44569  fi
44570
44571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44572  if test "x$test_cygdrive_prefix" = x; then
44573    # As a simple fix, exclude /usr/bin since it's not a real path.
44574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44576      # a path prefixed by /cygdrive for fixpath to work.
44577      new_path="$CYGWIN_ROOT_PATH$input_path"
44578    fi
44579  fi
44580
44581
44582  if test "x$path" != "x$new_path"; then
44583    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44586  fi
44587
44588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44589
44590  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44591  has_colon=`$ECHO $path | $GREP ^.:`
44592  new_path="$path"
44593  if test "x$has_colon" = x; then
44594    # Not in mixed or Windows style, start by that.
44595    new_path=`cmd //c echo $path`
44596  fi
44597
44598
44599  input_path="$new_path"
44600  # Check if we need to convert this using DOS-style short mode. If the path
44601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44602  # take no chances and rewrite it.
44603  # Note: m4 eats our [], so we need to use [ and ] instead.
44604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44605  if test "x$has_forbidden_chars" != x; then
44606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44608  fi
44609
44610
44611  windows_path="$new_path"
44612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44613    unix_path=`$CYGPATH -u "$windows_path"`
44614    new_path="$unix_path"
44615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44617    new_path="$unix_path"
44618  fi
44619
44620  if test "x$path" != "x$new_path"; then
44621    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44623$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44624  fi
44625
44626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44628
44629    else
44630      # We're on a unix platform. Hooray! :)
44631      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44632      has_space=`$ECHO "$path" | $GREP " "`
44633      if test "x$has_space" != x; then
44634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44635$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44636        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44637      fi
44638
44639      # Use eval to expand a potential ~
44640      eval path="$path"
44641      if test ! -f "$path" && test ! -d "$path"; then
44642        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44643      fi
44644
44645      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44646    fi
44647  fi
44648
44649
44650  # Only process if variable expands to non-empty
44651
44652  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44654
44655  # Input might be given as Windows format, start by converting to
44656  # unix format.
44657  path="$POTENTIAL_FREETYPE_LIB_PATH"
44658  new_path=`$CYGPATH -u "$path"`
44659
44660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44663  # "foo.exe" is OK but "foo" is an error.
44664  #
44665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44666  # It is also a way to make sure we got the proper file name for the real test later on.
44667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44668  if test "x$test_shortpath" = x; then
44669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44671    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44672  fi
44673
44674  # Call helper function which possibly converts this using DOS-style short mode.
44675  # If so, the updated path is stored in $new_path.
44676
44677  input_path="$new_path"
44678  # Check if we need to convert this using DOS-style short mode. If the path
44679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44680  # take no chances and rewrite it.
44681  # Note: m4 eats our [], so we need to use [ and ] instead.
44682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44683  if test "x$has_forbidden_chars" != x; then
44684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44688      # Going to short mode and back again did indeed matter. Since short mode is
44689      # case insensitive, let's make it lowercase to improve readability.
44690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44691      # Now convert it back to Unix-style (cygpath)
44692      input_path=`$CYGPATH -u "$shortmode_path"`
44693      new_path="$input_path"
44694    fi
44695  fi
44696
44697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44698  if test "x$test_cygdrive_prefix" = x; then
44699    # As a simple fix, exclude /usr/bin since it's not a real path.
44700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44702      # a path prefixed by /cygdrive for fixpath to work.
44703      new_path="$CYGWIN_ROOT_PATH$input_path"
44704    fi
44705  fi
44706
44707
44708  if test "x$path" != "x$new_path"; then
44709    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44712  fi
44713
44714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44715
44716  path="$POTENTIAL_FREETYPE_LIB_PATH"
44717  has_colon=`$ECHO $path | $GREP ^.:`
44718  new_path="$path"
44719  if test "x$has_colon" = x; then
44720    # Not in mixed or Windows style, start by that.
44721    new_path=`cmd //c echo $path`
44722  fi
44723
44724
44725  input_path="$new_path"
44726  # Check if we need to convert this using DOS-style short mode. If the path
44727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44728  # take no chances and rewrite it.
44729  # Note: m4 eats our [], so we need to use [ and ] instead.
44730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44731  if test "x$has_forbidden_chars" != x; then
44732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44734  fi
44735
44736
44737  windows_path="$new_path"
44738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44739    unix_path=`$CYGPATH -u "$windows_path"`
44740    new_path="$unix_path"
44741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44743    new_path="$unix_path"
44744  fi
44745
44746  if test "x$path" != "x$new_path"; then
44747    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44750  fi
44751
44752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44754
44755    else
44756      # We're on a unix platform. Hooray! :)
44757      path="$POTENTIAL_FREETYPE_LIB_PATH"
44758      has_space=`$ECHO "$path" | $GREP " "`
44759      if test "x$has_space" != x; then
44760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44763      fi
44764
44765      # Use eval to expand a potential ~
44766      eval path="$path"
44767      if test ! -f "$path" && test ! -d "$path"; then
44768        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44769      fi
44770
44771      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44772    fi
44773  fi
44774
44775
44776    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44777    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44778$as_echo_n "checking for freetype includes... " >&6; }
44779    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44780$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44781    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44783$as_echo_n "checking for freetype libraries... " >&6; }
44784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44785$as_echo "$FREETYPE_LIB_PATH" >&6; }
44786  fi
44787
44788          if test "x$FOUND_FREETYPE" != xyes; then
44789            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44790          fi
44791        else
44792          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44793$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44794          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44795        fi
44796      else
44797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44798$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44799      fi
44800    fi
44801
44802    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44803      # User has specified settings
44804
44805      if test "x$BUNDLE_FREETYPE" = x; then
44806        # If not specified, default is to bundle freetype
44807        BUNDLE_FREETYPE=yes
44808      fi
44809
44810      if test "x$with_freetype" != x; then
44811        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44812        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44813      fi
44814
44815      # Allow --with-freetype-lib and --with-freetype-include to override
44816      if test "x$with_freetype_include" != x; then
44817        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44818      fi
44819      if test "x$with_freetype_lib" != x; then
44820        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44821      fi
44822
44823      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44824        # Okay, we got it. Check that it works.
44825
44826  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44827  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44828  METHOD="--with-freetype"
44829
44830  # Let's start with an optimistic view of the world :-)
44831  FOUND_FREETYPE=yes
44832
44833  # First look for the canonical freetype main include file ft2build.h.
44834  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44835    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44836    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44837    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44838      # Fail.
44839      FOUND_FREETYPE=no
44840    fi
44841  fi
44842
44843  if test "x$FOUND_FREETYPE" = xyes; then
44844    # Include file found, let's continue the sanity check.
44845    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44846$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44847
44848    # Reset to default value
44849    FREETYPE_BASE_NAME=freetype
44850    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44851    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44852      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44853          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44854        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44855        # for the .6 version explicitly.
44856        FREETYPE_BASE_NAME=freetype.6
44857        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44858        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44859$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44860      else
44861        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44862$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44863        FOUND_FREETYPE=no
44864      fi
44865    else
44866      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44867        # On Windows, we will need both .lib and .dll file.
44868        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44869          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44871          FOUND_FREETYPE=no
44872        fi
44873      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44874          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44875        # Found lib in isa dir, use that instead.
44876        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44877        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44878$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44879      fi
44880    fi
44881  fi
44882
44883  if test "x$FOUND_FREETYPE" = xyes; then
44884
44885  # Only process if variable expands to non-empty
44886
44887  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44889
44890  # Input might be given as Windows format, start by converting to
44891  # unix format.
44892  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44893  new_path=`$CYGPATH -u "$path"`
44894
44895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44898  # "foo.exe" is OK but "foo" is an error.
44899  #
44900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44901  # It is also a way to make sure we got the proper file name for the real test later on.
44902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44903  if test "x$test_shortpath" = x; then
44904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44907  fi
44908
44909  # Call helper function which possibly converts this using DOS-style short mode.
44910  # If so, the updated path is stored in $new_path.
44911
44912  input_path="$new_path"
44913  # Check if we need to convert this using DOS-style short mode. If the path
44914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44915  # take no chances and rewrite it.
44916  # Note: m4 eats our [], so we need to use [ and ] instead.
44917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44918  if test "x$has_forbidden_chars" != x; then
44919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44923      # Going to short mode and back again did indeed matter. Since short mode is
44924      # case insensitive, let's make it lowercase to improve readability.
44925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44926      # Now convert it back to Unix-style (cygpath)
44927      input_path=`$CYGPATH -u "$shortmode_path"`
44928      new_path="$input_path"
44929    fi
44930  fi
44931
44932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44933  if test "x$test_cygdrive_prefix" = x; then
44934    # As a simple fix, exclude /usr/bin since it's not a real path.
44935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44937      # a path prefixed by /cygdrive for fixpath to work.
44938      new_path="$CYGWIN_ROOT_PATH$input_path"
44939    fi
44940  fi
44941
44942
44943  if test "x$path" != "x$new_path"; then
44944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44947  fi
44948
44949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44950
44951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44952  has_colon=`$ECHO $path | $GREP ^.:`
44953  new_path="$path"
44954  if test "x$has_colon" = x; then
44955    # Not in mixed or Windows style, start by that.
44956    new_path=`cmd //c echo $path`
44957  fi
44958
44959
44960  input_path="$new_path"
44961  # Check if we need to convert this using DOS-style short mode. If the path
44962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44963  # take no chances and rewrite it.
44964  # Note: m4 eats our [], so we need to use [ and ] instead.
44965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44966  if test "x$has_forbidden_chars" != x; then
44967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44969  fi
44970
44971
44972  windows_path="$new_path"
44973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44974    unix_path=`$CYGPATH -u "$windows_path"`
44975    new_path="$unix_path"
44976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44978    new_path="$unix_path"
44979  fi
44980
44981  if test "x$path" != "x$new_path"; then
44982    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44985  fi
44986
44987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44989
44990    else
44991      # We're on a unix platform. Hooray! :)
44992      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44993      has_space=`$ECHO "$path" | $GREP " "`
44994      if test "x$has_space" != x; then
44995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44998      fi
44999
45000      # Use eval to expand a potential ~
45001      eval path="$path"
45002      if test ! -f "$path" && test ! -d "$path"; then
45003        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45004      fi
45005
45006      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45007    fi
45008  fi
45009
45010
45011  # Only process if variable expands to non-empty
45012
45013  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45015
45016  # Input might be given as Windows format, start by converting to
45017  # unix format.
45018  path="$POTENTIAL_FREETYPE_LIB_PATH"
45019  new_path=`$CYGPATH -u "$path"`
45020
45021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45024  # "foo.exe" is OK but "foo" is an error.
45025  #
45026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45027  # It is also a way to make sure we got the proper file name for the real test later on.
45028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45029  if test "x$test_shortpath" = x; then
45030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45032    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45033  fi
45034
45035  # Call helper function which possibly converts this using DOS-style short mode.
45036  # If so, the updated path is stored in $new_path.
45037
45038  input_path="$new_path"
45039  # Check if we need to convert this using DOS-style short mode. If the path
45040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45041  # take no chances and rewrite it.
45042  # Note: m4 eats our [], so we need to use [ and ] instead.
45043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45044  if test "x$has_forbidden_chars" != x; then
45045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45049      # Going to short mode and back again did indeed matter. Since short mode is
45050      # case insensitive, let's make it lowercase to improve readability.
45051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45052      # Now convert it back to Unix-style (cygpath)
45053      input_path=`$CYGPATH -u "$shortmode_path"`
45054      new_path="$input_path"
45055    fi
45056  fi
45057
45058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45059  if test "x$test_cygdrive_prefix" = x; then
45060    # As a simple fix, exclude /usr/bin since it's not a real path.
45061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45063      # a path prefixed by /cygdrive for fixpath to work.
45064      new_path="$CYGWIN_ROOT_PATH$input_path"
45065    fi
45066  fi
45067
45068
45069  if test "x$path" != "x$new_path"; then
45070    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45072$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45073  fi
45074
45075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45076
45077  path="$POTENTIAL_FREETYPE_LIB_PATH"
45078  has_colon=`$ECHO $path | $GREP ^.:`
45079  new_path="$path"
45080  if test "x$has_colon" = x; then
45081    # Not in mixed or Windows style, start by that.
45082    new_path=`cmd //c echo $path`
45083  fi
45084
45085
45086  input_path="$new_path"
45087  # Check if we need to convert this using DOS-style short mode. If the path
45088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45089  # take no chances and rewrite it.
45090  # Note: m4 eats our [], so we need to use [ and ] instead.
45091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45092  if test "x$has_forbidden_chars" != x; then
45093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45095  fi
45096
45097
45098  windows_path="$new_path"
45099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45100    unix_path=`$CYGPATH -u "$windows_path"`
45101    new_path="$unix_path"
45102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45104    new_path="$unix_path"
45105  fi
45106
45107  if test "x$path" != "x$new_path"; then
45108    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45111  fi
45112
45113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45115
45116    else
45117      # We're on a unix platform. Hooray! :)
45118      path="$POTENTIAL_FREETYPE_LIB_PATH"
45119      has_space=`$ECHO "$path" | $GREP " "`
45120      if test "x$has_space" != x; then
45121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45124      fi
45125
45126      # Use eval to expand a potential ~
45127      eval path="$path"
45128      if test ! -f "$path" && test ! -d "$path"; then
45129        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45130      fi
45131
45132      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45133    fi
45134  fi
45135
45136
45137    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45139$as_echo_n "checking for freetype includes... " >&6; }
45140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45141$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45142    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45144$as_echo_n "checking for freetype libraries... " >&6; }
45145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45146$as_echo "$FREETYPE_LIB_PATH" >&6; }
45147  fi
45148
45149        if test "x$FOUND_FREETYPE" != xyes; then
45150          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45151        fi
45152      else
45153        # User specified only one of lib or include. This is an error.
45154        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45155          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45156$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45157          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45158        else
45159          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45160$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45161          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45162        fi
45163      fi
45164    else
45165      # User did not specify settings, but we need freetype. Try to locate it.
45166
45167      if test "x$BUNDLE_FREETYPE" = x; then
45168        # If not specified, default is to bundle freetype only on windows
45169        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45170          BUNDLE_FREETYPE=yes
45171        else
45172          BUNDLE_FREETYPE=no
45173        fi
45174      fi
45175
45176      if test "x$FOUND_FREETYPE" != xyes; then
45177        # Check builddeps
45178
45179
45180  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45181    # Source the builddeps file again, to make sure it uses the latest variables!
45182    . $builddepsfile
45183    # Look for a target and build machine specific resource!
45184    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45185    if test "x$resource" = x; then
45186      # Ok, lets instead look for a target specific resource
45187      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45188    fi
45189    if test "x$resource" = x; then
45190      # Ok, lets instead look for a build specific resource
45191      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45192    fi
45193    if test "x$resource" = x; then
45194      # Ok, lets instead look for a generic resource
45195      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45196      resource=${builddep_freetype2}
45197    fi
45198    if test "x$resource" != x; then
45199      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45200$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45201      # If the resource in the builddeps.conf file is an existing directory,
45202      # for example /java/linux/cups
45203      if test -d ${resource}; then
45204        depdir=${resource}
45205      else
45206
45207  # freetype2 is for example mymodule
45208  # $resource is for example libs/general/libmymod_1_2_3.zip
45209  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45210  # $with_builddeps_dir is for example /localhome/builddeps
45211  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45212  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45213  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45214  filename=`basename $resource`
45215  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45216  filebase=${filename%%.*}
45217  extension=${filename#*.}
45218  installdir=$with_builddeps_dir/$filebase
45219  if test ! -f $installdir/$filename.unpacked; then
45220    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45221$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45222    if test ! -d $installdir; then
45223      mkdir -p $installdir
45224    fi
45225    if test ! -d $installdir; then
45226      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45227    fi
45228    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45229    touch $tmpfile
45230    if test ! -f $tmpfile; then
45231      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45232    fi
45233
45234  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45235  # $tmpfile is the local file name for the downloaded file.
45236  VALID_TOOL=no
45237  if test "x$BDEPS_FTP" = xwget; then
45238    VALID_TOOL=yes
45239    wget -O $tmpfile $with_builddeps_server/$resource
45240  fi
45241  if test "x$BDEPS_FTP" = xlftp; then
45242    VALID_TOOL=yes
45243    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45244  fi
45245  if test "x$BDEPS_FTP" = xftp; then
45246    VALID_TOOL=yes
45247    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45248    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45249    FTPUSERPWD=${FTPSERVER%%@*}
45250    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45251      FTPUSER=${userpwd%%:*}
45252      FTPPWD=${userpwd#*@}
45253      FTPSERVER=${FTPSERVER#*@}
45254    else
45255      FTPUSER=ftp
45256      FTPPWD=ftp
45257    fi
45258    # the "pass" command does not work on some
45259    # ftp clients (read ftp.exe) but if it works,
45260    # passive mode is better!
45261    ( \
45262        echo "user $FTPUSER $FTPPWD"        ; \
45263        echo "pass"                         ; \
45264        echo "bin"                          ; \
45265        echo "get $FTPPATH $tmpfile"              ; \
45266    ) | ftp -in $FTPSERVER
45267  fi
45268  if test "x$VALID_TOOL" != xyes; then
45269    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45270  fi
45271
45272    mv $tmpfile $installdir/$filename
45273    if test ! -s $installdir/$filename; then
45274      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45275    fi
45276    case "$extension" in
45277      zip)  echo "Unzipping $installdir/$filename..."
45278        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45279        ;;
45280      tar.gz) echo "Untaring $installdir/$filename..."
45281        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45282        ;;
45283      tgz) echo "Untaring $installdir/$filename..."
45284        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45285        ;;
45286      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45287        ;;
45288    esac
45289  fi
45290  if test -f $installdir/$filename.unpacked; then
45291    depdir=$installdir
45292  fi
45293
45294      fi
45295      # Source the builddeps file again, because in the previous command, the depdir
45296      # was updated to point at the current build dependency install directory.
45297      . $builddepsfile
45298      # Now extract variables from the builddeps.conf files.
45299      theroot=${builddep_freetype2_ROOT}
45300      thecflags=${builddep_freetype2_CFLAGS}
45301      thelibs=${builddep_freetype2_LIBS}
45302      if test "x$depdir" = x; then
45303        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45304      fi
45305      FREETYPE=$depdir
45306      if test "x$theroot" != x; then
45307        FREETYPE="$theroot"
45308      fi
45309      if test "x$thecflags" != x; then
45310        FREETYPE_CFLAGS="$thecflags"
45311      fi
45312      if test "x$thelibs" != x; then
45313        FREETYPE_LIBS="$thelibs"
45314      fi
45315      FOUND_FREETYPE=yes
45316      else FOUND_FREETYPE=no
45317
45318    fi
45319    else FOUND_FREETYPE=no
45320
45321  fi
45322
45323        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45324        if test "x$FOUND_FREETYPE" = xyes; then
45325          if test "x$BUNDLE_FREETYPE" = xyes; then
45326            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45327$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45328            FOUND_FREETYPE=no
45329          else
45330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45331$as_echo_n "checking for freetype... " >&6; }
45332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45333$as_echo "yes (using builddeps)" >&6; }
45334          fi
45335        fi
45336      fi
45337
45338      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45339      if test "x$SYSROOT" = x; then
45340        if test "x$FOUND_FREETYPE" != xyes; then
45341          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45342          if test "x$PKG_CONFIG" != x; then
45343
45344pkg_failed=no
45345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45346$as_echo_n "checking for FREETYPE... " >&6; }
45347
45348if test -n "$FREETYPE_CFLAGS"; then
45349    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45350 elif test -n "$PKG_CONFIG"; then
45351    if test -n "$PKG_CONFIG" && \
45352    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45353  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45354  ac_status=$?
45355  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45356  test $ac_status = 0; }; then
45357  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45358else
45359  pkg_failed=yes
45360fi
45361 else
45362    pkg_failed=untried
45363fi
45364if test -n "$FREETYPE_LIBS"; then
45365    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45366 elif test -n "$PKG_CONFIG"; then
45367    if test -n "$PKG_CONFIG" && \
45368    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45369  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45370  ac_status=$?
45371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45372  test $ac_status = 0; }; then
45373  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45374else
45375  pkg_failed=yes
45376fi
45377 else
45378    pkg_failed=untried
45379fi
45380
45381
45382
45383if test $pkg_failed = yes; then
45384
45385if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45386        _pkg_short_errors_supported=yes
45387else
45388        _pkg_short_errors_supported=no
45389fi
45390        if test $_pkg_short_errors_supported = yes; then
45391	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45392        else
45393	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45394        fi
45395	# Put the nasty error message in config.log where it belongs
45396	echo "$FREETYPE_PKG_ERRORS" >&5
45397
45398	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45399$as_echo "no" >&6; }
45400                FOUND_FREETYPE=no
45401elif test $pkg_failed = untried; then
45402	FOUND_FREETYPE=no
45403else
45404	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45405	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45407$as_echo "yes" >&6; }
45408	FOUND_FREETYPE=yes
45409fi
45410            if test "x$FOUND_FREETYPE" = xyes; then
45411              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45412              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45413              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45414              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45415                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45416              fi
45417              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45418              if test "x$BUNDLE_FREETYPE" = xyes; then
45419                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45420$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45421                FOUND_FREETYPE=no
45422              else
45423                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45424$as_echo_n "checking for freetype... " >&6; }
45425                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45426$as_echo "yes (using pkg-config)" >&6; }
45427              fi
45428            fi
45429          fi
45430        fi
45431      fi
45432
45433      if test "x$FOUND_FREETYPE" != xyes; then
45434        # Check in well-known locations
45435        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45436          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45437
45438  windows_path="$FREETYPE_BASE_DIR"
45439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45440    unix_path=`$CYGPATH -u "$windows_path"`
45441    FREETYPE_BASE_DIR="$unix_path"
45442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45444    FREETYPE_BASE_DIR="$unix_path"
45445  fi
45446
45447
45448  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45449  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45450  METHOD="well-known location"
45451
45452  # Let's start with an optimistic view of the world :-)
45453  FOUND_FREETYPE=yes
45454
45455  # First look for the canonical freetype main include file ft2build.h.
45456  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45457    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45458    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45459    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45460      # Fail.
45461      FOUND_FREETYPE=no
45462    fi
45463  fi
45464
45465  if test "x$FOUND_FREETYPE" = xyes; then
45466    # Include file found, let's continue the sanity check.
45467    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45468$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45469
45470    # Reset to default value
45471    FREETYPE_BASE_NAME=freetype
45472    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45473    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45474      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45475          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45476        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45477        # for the .6 version explicitly.
45478        FREETYPE_BASE_NAME=freetype.6
45479        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45480        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45481$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45482      else
45483        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45484$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45485        FOUND_FREETYPE=no
45486      fi
45487    else
45488      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45489        # On Windows, we will need both .lib and .dll file.
45490        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45491          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45492$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45493          FOUND_FREETYPE=no
45494        fi
45495      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45496          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45497        # Found lib in isa dir, use that instead.
45498        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45499        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45500$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45501      fi
45502    fi
45503  fi
45504
45505  if test "x$FOUND_FREETYPE" = xyes; then
45506
45507  # Only process if variable expands to non-empty
45508
45509  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45511
45512  # Input might be given as Windows format, start by converting to
45513  # unix format.
45514  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45515  new_path=`$CYGPATH -u "$path"`
45516
45517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45520  # "foo.exe" is OK but "foo" is an error.
45521  #
45522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45523  # It is also a way to make sure we got the proper file name for the real test later on.
45524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45525  if test "x$test_shortpath" = x; then
45526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45527$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45528    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45529  fi
45530
45531  # Call helper function which possibly converts this using DOS-style short mode.
45532  # If so, the updated path is stored in $new_path.
45533
45534  input_path="$new_path"
45535  # Check if we need to convert this using DOS-style short mode. If the path
45536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45537  # take no chances and rewrite it.
45538  # Note: m4 eats our [], so we need to use [ and ] instead.
45539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45540  if test "x$has_forbidden_chars" != x; then
45541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45545      # Going to short mode and back again did indeed matter. Since short mode is
45546      # case insensitive, let's make it lowercase to improve readability.
45547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45548      # Now convert it back to Unix-style (cygpath)
45549      input_path=`$CYGPATH -u "$shortmode_path"`
45550      new_path="$input_path"
45551    fi
45552  fi
45553
45554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45555  if test "x$test_cygdrive_prefix" = x; then
45556    # As a simple fix, exclude /usr/bin since it's not a real path.
45557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45559      # a path prefixed by /cygdrive for fixpath to work.
45560      new_path="$CYGWIN_ROOT_PATH$input_path"
45561    fi
45562  fi
45563
45564
45565  if test "x$path" != "x$new_path"; then
45566    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45569  fi
45570
45571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45572
45573  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45574  has_colon=`$ECHO $path | $GREP ^.:`
45575  new_path="$path"
45576  if test "x$has_colon" = x; then
45577    # Not in mixed or Windows style, start by that.
45578    new_path=`cmd //c echo $path`
45579  fi
45580
45581
45582  input_path="$new_path"
45583  # Check if we need to convert this using DOS-style short mode. If the path
45584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45585  # take no chances and rewrite it.
45586  # Note: m4 eats our [], so we need to use [ and ] instead.
45587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45588  if test "x$has_forbidden_chars" != x; then
45589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45591  fi
45592
45593
45594  windows_path="$new_path"
45595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45596    unix_path=`$CYGPATH -u "$windows_path"`
45597    new_path="$unix_path"
45598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45600    new_path="$unix_path"
45601  fi
45602
45603  if test "x$path" != "x$new_path"; then
45604    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45607  fi
45608
45609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45611
45612    else
45613      # We're on a unix platform. Hooray! :)
45614      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45615      has_space=`$ECHO "$path" | $GREP " "`
45616      if test "x$has_space" != x; then
45617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45620      fi
45621
45622      # Use eval to expand a potential ~
45623      eval path="$path"
45624      if test ! -f "$path" && test ! -d "$path"; then
45625        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45626      fi
45627
45628      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45629    fi
45630  fi
45631
45632
45633  # Only process if variable expands to non-empty
45634
45635  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45636    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45637
45638  # Input might be given as Windows format, start by converting to
45639  # unix format.
45640  path="$POTENTIAL_FREETYPE_LIB_PATH"
45641  new_path=`$CYGPATH -u "$path"`
45642
45643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45646  # "foo.exe" is OK but "foo" is an error.
45647  #
45648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45649  # It is also a way to make sure we got the proper file name for the real test later on.
45650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45651  if test "x$test_shortpath" = x; then
45652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45654    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45655  fi
45656
45657  # Call helper function which possibly converts this using DOS-style short mode.
45658  # If so, the updated path is stored in $new_path.
45659
45660  input_path="$new_path"
45661  # Check if we need to convert this using DOS-style short mode. If the path
45662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45663  # take no chances and rewrite it.
45664  # Note: m4 eats our [], so we need to use [ and ] instead.
45665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45666  if test "x$has_forbidden_chars" != x; then
45667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45671      # Going to short mode and back again did indeed matter. Since short mode is
45672      # case insensitive, let's make it lowercase to improve readability.
45673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45674      # Now convert it back to Unix-style (cygpath)
45675      input_path=`$CYGPATH -u "$shortmode_path"`
45676      new_path="$input_path"
45677    fi
45678  fi
45679
45680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45681  if test "x$test_cygdrive_prefix" = x; then
45682    # As a simple fix, exclude /usr/bin since it's not a real path.
45683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45685      # a path prefixed by /cygdrive for fixpath to work.
45686      new_path="$CYGWIN_ROOT_PATH$input_path"
45687    fi
45688  fi
45689
45690
45691  if test "x$path" != "x$new_path"; then
45692    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45694$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45695  fi
45696
45697    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45698
45699  path="$POTENTIAL_FREETYPE_LIB_PATH"
45700  has_colon=`$ECHO $path | $GREP ^.:`
45701  new_path="$path"
45702  if test "x$has_colon" = x; then
45703    # Not in mixed or Windows style, start by that.
45704    new_path=`cmd //c echo $path`
45705  fi
45706
45707
45708  input_path="$new_path"
45709  # Check if we need to convert this using DOS-style short mode. If the path
45710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45711  # take no chances and rewrite it.
45712  # Note: m4 eats our [], so we need to use [ and ] instead.
45713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45714  if test "x$has_forbidden_chars" != x; then
45715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45717  fi
45718
45719
45720  windows_path="$new_path"
45721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45722    unix_path=`$CYGPATH -u "$windows_path"`
45723    new_path="$unix_path"
45724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45726    new_path="$unix_path"
45727  fi
45728
45729  if test "x$path" != "x$new_path"; then
45730    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45732$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45733  fi
45734
45735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45737
45738    else
45739      # We're on a unix platform. Hooray! :)
45740      path="$POTENTIAL_FREETYPE_LIB_PATH"
45741      has_space=`$ECHO "$path" | $GREP " "`
45742      if test "x$has_space" != x; then
45743        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45745        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45746      fi
45747
45748      # Use eval to expand a potential ~
45749      eval path="$path"
45750      if test ! -f "$path" && test ! -d "$path"; then
45751        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45752      fi
45753
45754      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45755    fi
45756  fi
45757
45758
45759    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45761$as_echo_n "checking for freetype includes... " >&6; }
45762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45763$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45764    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45766$as_echo_n "checking for freetype libraries... " >&6; }
45767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45768$as_echo "$FREETYPE_LIB_PATH" >&6; }
45769  fi
45770
45771          if test "x$FOUND_FREETYPE" != xyes; then
45772            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45773
45774  windows_path="$FREETYPE_BASE_DIR"
45775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45776    unix_path=`$CYGPATH -u "$windows_path"`
45777    FREETYPE_BASE_DIR="$unix_path"
45778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45780    FREETYPE_BASE_DIR="$unix_path"
45781  fi
45782
45783
45784  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45785  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45786  METHOD="well-known location"
45787
45788  # Let's start with an optimistic view of the world :-)
45789  FOUND_FREETYPE=yes
45790
45791  # First look for the canonical freetype main include file ft2build.h.
45792  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45793    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45794    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45795    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45796      # Fail.
45797      FOUND_FREETYPE=no
45798    fi
45799  fi
45800
45801  if test "x$FOUND_FREETYPE" = xyes; then
45802    # Include file found, let's continue the sanity check.
45803    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45804$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45805
45806    # Reset to default value
45807    FREETYPE_BASE_NAME=freetype
45808    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45809    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45810      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45811          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45812        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45813        # for the .6 version explicitly.
45814        FREETYPE_BASE_NAME=freetype.6
45815        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45816        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45817$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45818      else
45819        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45820$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45821        FOUND_FREETYPE=no
45822      fi
45823    else
45824      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45825        # On Windows, we will need both .lib and .dll file.
45826        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45827          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45828$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45829          FOUND_FREETYPE=no
45830        fi
45831      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45832          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45833        # Found lib in isa dir, use that instead.
45834        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45835        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45836$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45837      fi
45838    fi
45839  fi
45840
45841  if test "x$FOUND_FREETYPE" = xyes; then
45842
45843  # Only process if variable expands to non-empty
45844
45845  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45847
45848  # Input might be given as Windows format, start by converting to
45849  # unix format.
45850  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45851  new_path=`$CYGPATH -u "$path"`
45852
45853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45856  # "foo.exe" is OK but "foo" is an error.
45857  #
45858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45859  # It is also a way to make sure we got the proper file name for the real test later on.
45860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45861  if test "x$test_shortpath" = x; then
45862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45863$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45864    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45865  fi
45866
45867  # Call helper function which possibly converts this using DOS-style short mode.
45868  # If so, the updated path is stored in $new_path.
45869
45870  input_path="$new_path"
45871  # Check if we need to convert this using DOS-style short mode. If the path
45872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45873  # take no chances and rewrite it.
45874  # Note: m4 eats our [], so we need to use [ and ] instead.
45875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45876  if test "x$has_forbidden_chars" != x; then
45877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45881      # Going to short mode and back again did indeed matter. Since short mode is
45882      # case insensitive, let's make it lowercase to improve readability.
45883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45884      # Now convert it back to Unix-style (cygpath)
45885      input_path=`$CYGPATH -u "$shortmode_path"`
45886      new_path="$input_path"
45887    fi
45888  fi
45889
45890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45891  if test "x$test_cygdrive_prefix" = x; then
45892    # As a simple fix, exclude /usr/bin since it's not a real path.
45893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45895      # a path prefixed by /cygdrive for fixpath to work.
45896      new_path="$CYGWIN_ROOT_PATH$input_path"
45897    fi
45898  fi
45899
45900
45901  if test "x$path" != "x$new_path"; then
45902    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45904$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45905  fi
45906
45907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45908
45909  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45910  has_colon=`$ECHO $path | $GREP ^.:`
45911  new_path="$path"
45912  if test "x$has_colon" = x; then
45913    # Not in mixed or Windows style, start by that.
45914    new_path=`cmd //c echo $path`
45915  fi
45916
45917
45918  input_path="$new_path"
45919  # Check if we need to convert this using DOS-style short mode. If the path
45920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45921  # take no chances and rewrite it.
45922  # Note: m4 eats our [], so we need to use [ and ] instead.
45923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45924  if test "x$has_forbidden_chars" != x; then
45925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45927  fi
45928
45929
45930  windows_path="$new_path"
45931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45932    unix_path=`$CYGPATH -u "$windows_path"`
45933    new_path="$unix_path"
45934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45936    new_path="$unix_path"
45937  fi
45938
45939  if test "x$path" != "x$new_path"; then
45940    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45943  fi
45944
45945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45947
45948    else
45949      # We're on a unix platform. Hooray! :)
45950      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45951      has_space=`$ECHO "$path" | $GREP " "`
45952      if test "x$has_space" != x; then
45953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45954$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45955        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45956      fi
45957
45958      # Use eval to expand a potential ~
45959      eval path="$path"
45960      if test ! -f "$path" && test ! -d "$path"; then
45961        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45962      fi
45963
45964      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45965    fi
45966  fi
45967
45968
45969  # Only process if variable expands to non-empty
45970
45971  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45973
45974  # Input might be given as Windows format, start by converting to
45975  # unix format.
45976  path="$POTENTIAL_FREETYPE_LIB_PATH"
45977  new_path=`$CYGPATH -u "$path"`
45978
45979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45982  # "foo.exe" is OK but "foo" is an error.
45983  #
45984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45985  # It is also a way to make sure we got the proper file name for the real test later on.
45986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45987  if test "x$test_shortpath" = x; then
45988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45990    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45991  fi
45992
45993  # Call helper function which possibly converts this using DOS-style short mode.
45994  # If so, the updated path is stored in $new_path.
45995
45996  input_path="$new_path"
45997  # Check if we need to convert this using DOS-style short mode. If the path
45998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45999  # take no chances and rewrite it.
46000  # Note: m4 eats our [], so we need to use [ and ] instead.
46001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46002  if test "x$has_forbidden_chars" != x; then
46003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46007      # Going to short mode and back again did indeed matter. Since short mode is
46008      # case insensitive, let's make it lowercase to improve readability.
46009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46010      # Now convert it back to Unix-style (cygpath)
46011      input_path=`$CYGPATH -u "$shortmode_path"`
46012      new_path="$input_path"
46013    fi
46014  fi
46015
46016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46017  if test "x$test_cygdrive_prefix" = x; then
46018    # As a simple fix, exclude /usr/bin since it's not a real path.
46019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46021      # a path prefixed by /cygdrive for fixpath to work.
46022      new_path="$CYGWIN_ROOT_PATH$input_path"
46023    fi
46024  fi
46025
46026
46027  if test "x$path" != "x$new_path"; then
46028    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46030$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46031  fi
46032
46033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46034
46035  path="$POTENTIAL_FREETYPE_LIB_PATH"
46036  has_colon=`$ECHO $path | $GREP ^.:`
46037  new_path="$path"
46038  if test "x$has_colon" = x; then
46039    # Not in mixed or Windows style, start by that.
46040    new_path=`cmd //c echo $path`
46041  fi
46042
46043
46044  input_path="$new_path"
46045  # Check if we need to convert this using DOS-style short mode. If the path
46046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46047  # take no chances and rewrite it.
46048  # Note: m4 eats our [], so we need to use [ and ] instead.
46049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46050  if test "x$has_forbidden_chars" != x; then
46051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46053  fi
46054
46055
46056  windows_path="$new_path"
46057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46058    unix_path=`$CYGPATH -u "$windows_path"`
46059    new_path="$unix_path"
46060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46062    new_path="$unix_path"
46063  fi
46064
46065  if test "x$path" != "x$new_path"; then
46066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46069  fi
46070
46071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46073
46074    else
46075      # We're on a unix platform. Hooray! :)
46076      path="$POTENTIAL_FREETYPE_LIB_PATH"
46077      has_space=`$ECHO "$path" | $GREP " "`
46078      if test "x$has_space" != x; then
46079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46082      fi
46083
46084      # Use eval to expand a potential ~
46085      eval path="$path"
46086      if test ! -f "$path" && test ! -d "$path"; then
46087        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46088      fi
46089
46090      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46091    fi
46092  fi
46093
46094
46095    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46097$as_echo_n "checking for freetype includes... " >&6; }
46098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46099$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46100    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46102$as_echo_n "checking for freetype libraries... " >&6; }
46103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46104$as_echo "$FREETYPE_LIB_PATH" >&6; }
46105  fi
46106
46107          fi
46108        else
46109          FREETYPE_BASE_DIR="$SYSROOT/usr"
46110
46111  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46112  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46113  METHOD="well-known location"
46114
46115  # Let's start with an optimistic view of the world :-)
46116  FOUND_FREETYPE=yes
46117
46118  # First look for the canonical freetype main include file ft2build.h.
46119  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46120    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46121    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46122    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46123      # Fail.
46124      FOUND_FREETYPE=no
46125    fi
46126  fi
46127
46128  if test "x$FOUND_FREETYPE" = xyes; then
46129    # Include file found, let's continue the sanity check.
46130    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46131$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46132
46133    # Reset to default value
46134    FREETYPE_BASE_NAME=freetype
46135    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46136    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46137      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46138          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46139        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46140        # for the .6 version explicitly.
46141        FREETYPE_BASE_NAME=freetype.6
46142        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46143        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46144$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46145      else
46146        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46147$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46148        FOUND_FREETYPE=no
46149      fi
46150    else
46151      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46152        # On Windows, we will need both .lib and .dll file.
46153        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46154          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46155$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46156          FOUND_FREETYPE=no
46157        fi
46158      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46159          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46160        # Found lib in isa dir, use that instead.
46161        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46162        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46163$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46164      fi
46165    fi
46166  fi
46167
46168  if test "x$FOUND_FREETYPE" = xyes; then
46169
46170  # Only process if variable expands to non-empty
46171
46172  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46174
46175  # Input might be given as Windows format, start by converting to
46176  # unix format.
46177  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46178  new_path=`$CYGPATH -u "$path"`
46179
46180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46183  # "foo.exe" is OK but "foo" is an error.
46184  #
46185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46186  # It is also a way to make sure we got the proper file name for the real test later on.
46187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46188  if test "x$test_shortpath" = x; then
46189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46191    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46192  fi
46193
46194  # Call helper function which possibly converts this using DOS-style short mode.
46195  # If so, the updated path is stored in $new_path.
46196
46197  input_path="$new_path"
46198  # Check if we need to convert this using DOS-style short mode. If the path
46199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46200  # take no chances and rewrite it.
46201  # Note: m4 eats our [], so we need to use [ and ] instead.
46202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46203  if test "x$has_forbidden_chars" != x; then
46204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46208      # Going to short mode and back again did indeed matter. Since short mode is
46209      # case insensitive, let's make it lowercase to improve readability.
46210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46211      # Now convert it back to Unix-style (cygpath)
46212      input_path=`$CYGPATH -u "$shortmode_path"`
46213      new_path="$input_path"
46214    fi
46215  fi
46216
46217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46218  if test "x$test_cygdrive_prefix" = x; then
46219    # As a simple fix, exclude /usr/bin since it's not a real path.
46220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46222      # a path prefixed by /cygdrive for fixpath to work.
46223      new_path="$CYGWIN_ROOT_PATH$input_path"
46224    fi
46225  fi
46226
46227
46228  if test "x$path" != "x$new_path"; then
46229    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46232  fi
46233
46234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46235
46236  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46237  has_colon=`$ECHO $path | $GREP ^.:`
46238  new_path="$path"
46239  if test "x$has_colon" = x; then
46240    # Not in mixed or Windows style, start by that.
46241    new_path=`cmd //c echo $path`
46242  fi
46243
46244
46245  input_path="$new_path"
46246  # Check if we need to convert this using DOS-style short mode. If the path
46247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46248  # take no chances and rewrite it.
46249  # Note: m4 eats our [], so we need to use [ and ] instead.
46250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46251  if test "x$has_forbidden_chars" != x; then
46252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46254  fi
46255
46256
46257  windows_path="$new_path"
46258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46259    unix_path=`$CYGPATH -u "$windows_path"`
46260    new_path="$unix_path"
46261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46263    new_path="$unix_path"
46264  fi
46265
46266  if test "x$path" != "x$new_path"; then
46267    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46270  fi
46271
46272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46274
46275    else
46276      # We're on a unix platform. Hooray! :)
46277      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46278      has_space=`$ECHO "$path" | $GREP " "`
46279      if test "x$has_space" != x; then
46280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46283      fi
46284
46285      # Use eval to expand a potential ~
46286      eval path="$path"
46287      if test ! -f "$path" && test ! -d "$path"; then
46288        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46289      fi
46290
46291      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46292    fi
46293  fi
46294
46295
46296  # Only process if variable expands to non-empty
46297
46298  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46300
46301  # Input might be given as Windows format, start by converting to
46302  # unix format.
46303  path="$POTENTIAL_FREETYPE_LIB_PATH"
46304  new_path=`$CYGPATH -u "$path"`
46305
46306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46309  # "foo.exe" is OK but "foo" is an error.
46310  #
46311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46312  # It is also a way to make sure we got the proper file name for the real test later on.
46313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46314  if test "x$test_shortpath" = x; then
46315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46316$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46317    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46318  fi
46319
46320  # Call helper function which possibly converts this using DOS-style short mode.
46321  # If so, the updated path is stored in $new_path.
46322
46323  input_path="$new_path"
46324  # Check if we need to convert this using DOS-style short mode. If the path
46325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46326  # take no chances and rewrite it.
46327  # Note: m4 eats our [], so we need to use [ and ] instead.
46328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46329  if test "x$has_forbidden_chars" != x; then
46330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46334      # Going to short mode and back again did indeed matter. Since short mode is
46335      # case insensitive, let's make it lowercase to improve readability.
46336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46337      # Now convert it back to Unix-style (cygpath)
46338      input_path=`$CYGPATH -u "$shortmode_path"`
46339      new_path="$input_path"
46340    fi
46341  fi
46342
46343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46344  if test "x$test_cygdrive_prefix" = x; then
46345    # As a simple fix, exclude /usr/bin since it's not a real path.
46346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46348      # a path prefixed by /cygdrive for fixpath to work.
46349      new_path="$CYGWIN_ROOT_PATH$input_path"
46350    fi
46351  fi
46352
46353
46354  if test "x$path" != "x$new_path"; then
46355    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46357$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46358  fi
46359
46360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46361
46362  path="$POTENTIAL_FREETYPE_LIB_PATH"
46363  has_colon=`$ECHO $path | $GREP ^.:`
46364  new_path="$path"
46365  if test "x$has_colon" = x; then
46366    # Not in mixed or Windows style, start by that.
46367    new_path=`cmd //c echo $path`
46368  fi
46369
46370
46371  input_path="$new_path"
46372  # Check if we need to convert this using DOS-style short mode. If the path
46373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46374  # take no chances and rewrite it.
46375  # Note: m4 eats our [], so we need to use [ and ] instead.
46376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46377  if test "x$has_forbidden_chars" != x; then
46378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46380  fi
46381
46382
46383  windows_path="$new_path"
46384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46385    unix_path=`$CYGPATH -u "$windows_path"`
46386    new_path="$unix_path"
46387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46389    new_path="$unix_path"
46390  fi
46391
46392  if test "x$path" != "x$new_path"; then
46393    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46395$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46396  fi
46397
46398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46400
46401    else
46402      # We're on a unix platform. Hooray! :)
46403      path="$POTENTIAL_FREETYPE_LIB_PATH"
46404      has_space=`$ECHO "$path" | $GREP " "`
46405      if test "x$has_space" != x; then
46406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46407$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46409      fi
46410
46411      # Use eval to expand a potential ~
46412      eval path="$path"
46413      if test ! -f "$path" && test ! -d "$path"; then
46414        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46415      fi
46416
46417      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46418    fi
46419  fi
46420
46421
46422    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46424$as_echo_n "checking for freetype includes... " >&6; }
46425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46426$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46427    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46428    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46429$as_echo_n "checking for freetype libraries... " >&6; }
46430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46431$as_echo "$FREETYPE_LIB_PATH" >&6; }
46432  fi
46433
46434
46435          if test "x$FOUND_FREETYPE" != xyes; then
46436            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46437
46438  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46439  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46440  METHOD="well-known location"
46441
46442  # Let's start with an optimistic view of the world :-)
46443  FOUND_FREETYPE=yes
46444
46445  # First look for the canonical freetype main include file ft2build.h.
46446  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46447    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46448    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46449    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46450      # Fail.
46451      FOUND_FREETYPE=no
46452    fi
46453  fi
46454
46455  if test "x$FOUND_FREETYPE" = xyes; then
46456    # Include file found, let's continue the sanity check.
46457    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46458$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46459
46460    # Reset to default value
46461    FREETYPE_BASE_NAME=freetype
46462    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46463    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46464      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46466        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46467        # for the .6 version explicitly.
46468        FREETYPE_BASE_NAME=freetype.6
46469        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46470        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46471$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46472      else
46473        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46474$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46475        FOUND_FREETYPE=no
46476      fi
46477    else
46478      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46479        # On Windows, we will need both .lib and .dll file.
46480        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46481          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46483          FOUND_FREETYPE=no
46484        fi
46485      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46486          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46487        # Found lib in isa dir, use that instead.
46488        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46489        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46490$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46491      fi
46492    fi
46493  fi
46494
46495  if test "x$FOUND_FREETYPE" = xyes; then
46496
46497  # Only process if variable expands to non-empty
46498
46499  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46501
46502  # Input might be given as Windows format, start by converting to
46503  # unix format.
46504  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46505  new_path=`$CYGPATH -u "$path"`
46506
46507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46510  # "foo.exe" is OK but "foo" is an error.
46511  #
46512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46513  # It is also a way to make sure we got the proper file name for the real test later on.
46514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46515  if test "x$test_shortpath" = x; then
46516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46517$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46518    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46519  fi
46520
46521  # Call helper function which possibly converts this using DOS-style short mode.
46522  # If so, the updated path is stored in $new_path.
46523
46524  input_path="$new_path"
46525  # Check if we need to convert this using DOS-style short mode. If the path
46526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46527  # take no chances and rewrite it.
46528  # Note: m4 eats our [], so we need to use [ and ] instead.
46529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46530  if test "x$has_forbidden_chars" != x; then
46531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46535      # Going to short mode and back again did indeed matter. Since short mode is
46536      # case insensitive, let's make it lowercase to improve readability.
46537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46538      # Now convert it back to Unix-style (cygpath)
46539      input_path=`$CYGPATH -u "$shortmode_path"`
46540      new_path="$input_path"
46541    fi
46542  fi
46543
46544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46545  if test "x$test_cygdrive_prefix" = x; then
46546    # As a simple fix, exclude /usr/bin since it's not a real path.
46547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46549      # a path prefixed by /cygdrive for fixpath to work.
46550      new_path="$CYGWIN_ROOT_PATH$input_path"
46551    fi
46552  fi
46553
46554
46555  if test "x$path" != "x$new_path"; then
46556    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46559  fi
46560
46561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46562
46563  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46564  has_colon=`$ECHO $path | $GREP ^.:`
46565  new_path="$path"
46566  if test "x$has_colon" = x; then
46567    # Not in mixed or Windows style, start by that.
46568    new_path=`cmd //c echo $path`
46569  fi
46570
46571
46572  input_path="$new_path"
46573  # Check if we need to convert this using DOS-style short mode. If the path
46574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46575  # take no chances and rewrite it.
46576  # Note: m4 eats our [], so we need to use [ and ] instead.
46577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46578  if test "x$has_forbidden_chars" != x; then
46579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46581  fi
46582
46583
46584  windows_path="$new_path"
46585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46586    unix_path=`$CYGPATH -u "$windows_path"`
46587    new_path="$unix_path"
46588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46590    new_path="$unix_path"
46591  fi
46592
46593  if test "x$path" != "x$new_path"; then
46594    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46597  fi
46598
46599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46601
46602    else
46603      # We're on a unix platform. Hooray! :)
46604      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46605      has_space=`$ECHO "$path" | $GREP " "`
46606      if test "x$has_space" != x; then
46607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46609        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46610      fi
46611
46612      # Use eval to expand a potential ~
46613      eval path="$path"
46614      if test ! -f "$path" && test ! -d "$path"; then
46615        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46616      fi
46617
46618      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46619    fi
46620  fi
46621
46622
46623  # Only process if variable expands to non-empty
46624
46625  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46627
46628  # Input might be given as Windows format, start by converting to
46629  # unix format.
46630  path="$POTENTIAL_FREETYPE_LIB_PATH"
46631  new_path=`$CYGPATH -u "$path"`
46632
46633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46636  # "foo.exe" is OK but "foo" is an error.
46637  #
46638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46639  # It is also a way to make sure we got the proper file name for the real test later on.
46640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46641  if test "x$test_shortpath" = x; then
46642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46645  fi
46646
46647  # Call helper function which possibly converts this using DOS-style short mode.
46648  # If so, the updated path is stored in $new_path.
46649
46650  input_path="$new_path"
46651  # Check if we need to convert this using DOS-style short mode. If the path
46652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46653  # take no chances and rewrite it.
46654  # Note: m4 eats our [], so we need to use [ and ] instead.
46655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46656  if test "x$has_forbidden_chars" != x; then
46657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46661      # Going to short mode and back again did indeed matter. Since short mode is
46662      # case insensitive, let's make it lowercase to improve readability.
46663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46664      # Now convert it back to Unix-style (cygpath)
46665      input_path=`$CYGPATH -u "$shortmode_path"`
46666      new_path="$input_path"
46667    fi
46668  fi
46669
46670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46671  if test "x$test_cygdrive_prefix" = x; then
46672    # As a simple fix, exclude /usr/bin since it's not a real path.
46673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46675      # a path prefixed by /cygdrive for fixpath to work.
46676      new_path="$CYGWIN_ROOT_PATH$input_path"
46677    fi
46678  fi
46679
46680
46681  if test "x$path" != "x$new_path"; then
46682    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46685  fi
46686
46687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46688
46689  path="$POTENTIAL_FREETYPE_LIB_PATH"
46690  has_colon=`$ECHO $path | $GREP ^.:`
46691  new_path="$path"
46692  if test "x$has_colon" = x; then
46693    # Not in mixed or Windows style, start by that.
46694    new_path=`cmd //c echo $path`
46695  fi
46696
46697
46698  input_path="$new_path"
46699  # Check if we need to convert this using DOS-style short mode. If the path
46700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46701  # take no chances and rewrite it.
46702  # Note: m4 eats our [], so we need to use [ and ] instead.
46703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46704  if test "x$has_forbidden_chars" != x; then
46705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46707  fi
46708
46709
46710  windows_path="$new_path"
46711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46712    unix_path=`$CYGPATH -u "$windows_path"`
46713    new_path="$unix_path"
46714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46716    new_path="$unix_path"
46717  fi
46718
46719  if test "x$path" != "x$new_path"; then
46720    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46723  fi
46724
46725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46727
46728    else
46729      # We're on a unix platform. Hooray! :)
46730      path="$POTENTIAL_FREETYPE_LIB_PATH"
46731      has_space=`$ECHO "$path" | $GREP " "`
46732      if test "x$has_space" != x; then
46733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46736      fi
46737
46738      # Use eval to expand a potential ~
46739      eval path="$path"
46740      if test ! -f "$path" && test ! -d "$path"; then
46741        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46742      fi
46743
46744      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46745    fi
46746  fi
46747
46748
46749    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46751$as_echo_n "checking for freetype includes... " >&6; }
46752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46753$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46754    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46756$as_echo_n "checking for freetype libraries... " >&6; }
46757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46758$as_echo "$FREETYPE_LIB_PATH" >&6; }
46759  fi
46760
46761          fi
46762
46763          if test "x$FOUND_FREETYPE" != xyes; then
46764            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46765
46766  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46767  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46768  METHOD="well-known location"
46769
46770  # Let's start with an optimistic view of the world :-)
46771  FOUND_FREETYPE=yes
46772
46773  # First look for the canonical freetype main include file ft2build.h.
46774  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46775    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46776    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46777    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46778      # Fail.
46779      FOUND_FREETYPE=no
46780    fi
46781  fi
46782
46783  if test "x$FOUND_FREETYPE" = xyes; then
46784    # Include file found, let's continue the sanity check.
46785    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46786$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46787
46788    # Reset to default value
46789    FREETYPE_BASE_NAME=freetype
46790    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46791    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46792      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46793          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46794        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46795        # for the .6 version explicitly.
46796        FREETYPE_BASE_NAME=freetype.6
46797        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46798        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46799$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46800      else
46801        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46802$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46803        FOUND_FREETYPE=no
46804      fi
46805    else
46806      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46807        # On Windows, we will need both .lib and .dll file.
46808        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46809          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46811          FOUND_FREETYPE=no
46812        fi
46813      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46814          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46815        # Found lib in isa dir, use that instead.
46816        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46817        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46818$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46819      fi
46820    fi
46821  fi
46822
46823  if test "x$FOUND_FREETYPE" = xyes; then
46824
46825  # Only process if variable expands to non-empty
46826
46827  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46829
46830  # Input might be given as Windows format, start by converting to
46831  # unix format.
46832  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46833  new_path=`$CYGPATH -u "$path"`
46834
46835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46838  # "foo.exe" is OK but "foo" is an error.
46839  #
46840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46841  # It is also a way to make sure we got the proper file name for the real test later on.
46842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46843  if test "x$test_shortpath" = x; then
46844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46845$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46846    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46847  fi
46848
46849  # Call helper function which possibly converts this using DOS-style short mode.
46850  # If so, the updated path is stored in $new_path.
46851
46852  input_path="$new_path"
46853  # Check if we need to convert this using DOS-style short mode. If the path
46854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46855  # take no chances and rewrite it.
46856  # Note: m4 eats our [], so we need to use [ and ] instead.
46857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46858  if test "x$has_forbidden_chars" != x; then
46859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46863      # Going to short mode and back again did indeed matter. Since short mode is
46864      # case insensitive, let's make it lowercase to improve readability.
46865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46866      # Now convert it back to Unix-style (cygpath)
46867      input_path=`$CYGPATH -u "$shortmode_path"`
46868      new_path="$input_path"
46869    fi
46870  fi
46871
46872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46873  if test "x$test_cygdrive_prefix" = x; then
46874    # As a simple fix, exclude /usr/bin since it's not a real path.
46875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46877      # a path prefixed by /cygdrive for fixpath to work.
46878      new_path="$CYGWIN_ROOT_PATH$input_path"
46879    fi
46880  fi
46881
46882
46883  if test "x$path" != "x$new_path"; then
46884    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46887  fi
46888
46889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46890
46891  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46892  has_colon=`$ECHO $path | $GREP ^.:`
46893  new_path="$path"
46894  if test "x$has_colon" = x; then
46895    # Not in mixed or Windows style, start by that.
46896    new_path=`cmd //c echo $path`
46897  fi
46898
46899
46900  input_path="$new_path"
46901  # Check if we need to convert this using DOS-style short mode. If the path
46902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46903  # take no chances and rewrite it.
46904  # Note: m4 eats our [], so we need to use [ and ] instead.
46905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46906  if test "x$has_forbidden_chars" != x; then
46907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46909  fi
46910
46911
46912  windows_path="$new_path"
46913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46914    unix_path=`$CYGPATH -u "$windows_path"`
46915    new_path="$unix_path"
46916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46918    new_path="$unix_path"
46919  fi
46920
46921  if test "x$path" != "x$new_path"; then
46922    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46925  fi
46926
46927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46929
46930    else
46931      # We're on a unix platform. Hooray! :)
46932      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46933      has_space=`$ECHO "$path" | $GREP " "`
46934      if test "x$has_space" != x; then
46935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46936$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46938      fi
46939
46940      # Use eval to expand a potential ~
46941      eval path="$path"
46942      if test ! -f "$path" && test ! -d "$path"; then
46943        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46944      fi
46945
46946      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46947    fi
46948  fi
46949
46950
46951  # Only process if variable expands to non-empty
46952
46953  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46955
46956  # Input might be given as Windows format, start by converting to
46957  # unix format.
46958  path="$POTENTIAL_FREETYPE_LIB_PATH"
46959  new_path=`$CYGPATH -u "$path"`
46960
46961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46964  # "foo.exe" is OK but "foo" is an error.
46965  #
46966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46967  # It is also a way to make sure we got the proper file name for the real test later on.
46968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46969  if test "x$test_shortpath" = x; then
46970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46973  fi
46974
46975  # Call helper function which possibly converts this using DOS-style short mode.
46976  # If so, the updated path is stored in $new_path.
46977
46978  input_path="$new_path"
46979  # Check if we need to convert this using DOS-style short mode. If the path
46980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46981  # take no chances and rewrite it.
46982  # Note: m4 eats our [], so we need to use [ and ] instead.
46983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46984  if test "x$has_forbidden_chars" != x; then
46985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46989      # Going to short mode and back again did indeed matter. Since short mode is
46990      # case insensitive, let's make it lowercase to improve readability.
46991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46992      # Now convert it back to Unix-style (cygpath)
46993      input_path=`$CYGPATH -u "$shortmode_path"`
46994      new_path="$input_path"
46995    fi
46996  fi
46997
46998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46999  if test "x$test_cygdrive_prefix" = x; then
47000    # As a simple fix, exclude /usr/bin since it's not a real path.
47001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47003      # a path prefixed by /cygdrive for fixpath to work.
47004      new_path="$CYGWIN_ROOT_PATH$input_path"
47005    fi
47006  fi
47007
47008
47009  if test "x$path" != "x$new_path"; then
47010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47013  fi
47014
47015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47016
47017  path="$POTENTIAL_FREETYPE_LIB_PATH"
47018  has_colon=`$ECHO $path | $GREP ^.:`
47019  new_path="$path"
47020  if test "x$has_colon" = x; then
47021    # Not in mixed or Windows style, start by that.
47022    new_path=`cmd //c echo $path`
47023  fi
47024
47025
47026  input_path="$new_path"
47027  # Check if we need to convert this using DOS-style short mode. If the path
47028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47029  # take no chances and rewrite it.
47030  # Note: m4 eats our [], so we need to use [ and ] instead.
47031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47032  if test "x$has_forbidden_chars" != x; then
47033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47035  fi
47036
47037
47038  windows_path="$new_path"
47039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47040    unix_path=`$CYGPATH -u "$windows_path"`
47041    new_path="$unix_path"
47042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47044    new_path="$unix_path"
47045  fi
47046
47047  if test "x$path" != "x$new_path"; then
47048    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47051  fi
47052
47053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47055
47056    else
47057      # We're on a unix platform. Hooray! :)
47058      path="$POTENTIAL_FREETYPE_LIB_PATH"
47059      has_space=`$ECHO "$path" | $GREP " "`
47060      if test "x$has_space" != x; then
47061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47063        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47064      fi
47065
47066      # Use eval to expand a potential ~
47067      eval path="$path"
47068      if test ! -f "$path" && test ! -d "$path"; then
47069        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47070      fi
47071
47072      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47073    fi
47074  fi
47075
47076
47077    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47079$as_echo_n "checking for freetype includes... " >&6; }
47080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47081$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47082    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47084$as_echo_n "checking for freetype libraries... " >&6; }
47085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47086$as_echo "$FREETYPE_LIB_PATH" >&6; }
47087  fi
47088
47089          fi
47090
47091          if test "x$FOUND_FREETYPE" != xyes; then
47092            FREETYPE_BASE_DIR="$SYSROOT/usr"
47093            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47094
47095  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47096  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47097  METHOD="well-known location"
47098
47099  # Let's start with an optimistic view of the world :-)
47100  FOUND_FREETYPE=yes
47101
47102  # First look for the canonical freetype main include file ft2build.h.
47103  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47104    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47105    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47106    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47107      # Fail.
47108      FOUND_FREETYPE=no
47109    fi
47110  fi
47111
47112  if test "x$FOUND_FREETYPE" = xyes; then
47113    # Include file found, let's continue the sanity check.
47114    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47115$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47116
47117    # Reset to default value
47118    FREETYPE_BASE_NAME=freetype
47119    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47120    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47121      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47122          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47123        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47124        # for the .6 version explicitly.
47125        FREETYPE_BASE_NAME=freetype.6
47126        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47127        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47128$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47129      else
47130        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47131$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47132        FOUND_FREETYPE=no
47133      fi
47134    else
47135      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47136        # On Windows, we will need both .lib and .dll file.
47137        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47138          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47139$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47140          FOUND_FREETYPE=no
47141        fi
47142      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47143          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47144        # Found lib in isa dir, use that instead.
47145        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47146        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47147$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47148      fi
47149    fi
47150  fi
47151
47152  if test "x$FOUND_FREETYPE" = xyes; then
47153
47154  # Only process if variable expands to non-empty
47155
47156  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47158
47159  # Input might be given as Windows format, start by converting to
47160  # unix format.
47161  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47162  new_path=`$CYGPATH -u "$path"`
47163
47164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47167  # "foo.exe" is OK but "foo" is an error.
47168  #
47169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47170  # It is also a way to make sure we got the proper file name for the real test later on.
47171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47172  if test "x$test_shortpath" = x; then
47173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47174$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47175    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47176  fi
47177
47178  # Call helper function which possibly converts this using DOS-style short mode.
47179  # If so, the updated path is stored in $new_path.
47180
47181  input_path="$new_path"
47182  # Check if we need to convert this using DOS-style short mode. If the path
47183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47184  # take no chances and rewrite it.
47185  # Note: m4 eats our [], so we need to use [ and ] instead.
47186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47187  if test "x$has_forbidden_chars" != x; then
47188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47192      # Going to short mode and back again did indeed matter. Since short mode is
47193      # case insensitive, let's make it lowercase to improve readability.
47194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47195      # Now convert it back to Unix-style (cygpath)
47196      input_path=`$CYGPATH -u "$shortmode_path"`
47197      new_path="$input_path"
47198    fi
47199  fi
47200
47201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47202  if test "x$test_cygdrive_prefix" = x; then
47203    # As a simple fix, exclude /usr/bin since it's not a real path.
47204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47206      # a path prefixed by /cygdrive for fixpath to work.
47207      new_path="$CYGWIN_ROOT_PATH$input_path"
47208    fi
47209  fi
47210
47211
47212  if test "x$path" != "x$new_path"; then
47213    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47215$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47216  fi
47217
47218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47219
47220  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47221  has_colon=`$ECHO $path | $GREP ^.:`
47222  new_path="$path"
47223  if test "x$has_colon" = x; then
47224    # Not in mixed or Windows style, start by that.
47225    new_path=`cmd //c echo $path`
47226  fi
47227
47228
47229  input_path="$new_path"
47230  # Check if we need to convert this using DOS-style short mode. If the path
47231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47232  # take no chances and rewrite it.
47233  # Note: m4 eats our [], so we need to use [ and ] instead.
47234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47235  if test "x$has_forbidden_chars" != x; then
47236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47238  fi
47239
47240
47241  windows_path="$new_path"
47242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47243    unix_path=`$CYGPATH -u "$windows_path"`
47244    new_path="$unix_path"
47245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47247    new_path="$unix_path"
47248  fi
47249
47250  if test "x$path" != "x$new_path"; then
47251    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47254  fi
47255
47256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47258
47259    else
47260      # We're on a unix platform. Hooray! :)
47261      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47262      has_space=`$ECHO "$path" | $GREP " "`
47263      if test "x$has_space" != x; then
47264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47267      fi
47268
47269      # Use eval to expand a potential ~
47270      eval path="$path"
47271      if test ! -f "$path" && test ! -d "$path"; then
47272        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47273      fi
47274
47275      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47276    fi
47277  fi
47278
47279
47280  # Only process if variable expands to non-empty
47281
47282  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47284
47285  # Input might be given as Windows format, start by converting to
47286  # unix format.
47287  path="$POTENTIAL_FREETYPE_LIB_PATH"
47288  new_path=`$CYGPATH -u "$path"`
47289
47290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47293  # "foo.exe" is OK but "foo" is an error.
47294  #
47295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47296  # It is also a way to make sure we got the proper file name for the real test later on.
47297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47298  if test "x$test_shortpath" = x; then
47299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47301    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47302  fi
47303
47304  # Call helper function which possibly converts this using DOS-style short mode.
47305  # If so, the updated path is stored in $new_path.
47306
47307  input_path="$new_path"
47308  # Check if we need to convert this using DOS-style short mode. If the path
47309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47310  # take no chances and rewrite it.
47311  # Note: m4 eats our [], so we need to use [ and ] instead.
47312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47313  if test "x$has_forbidden_chars" != x; then
47314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47318      # Going to short mode and back again did indeed matter. Since short mode is
47319      # case insensitive, let's make it lowercase to improve readability.
47320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47321      # Now convert it back to Unix-style (cygpath)
47322      input_path=`$CYGPATH -u "$shortmode_path"`
47323      new_path="$input_path"
47324    fi
47325  fi
47326
47327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47328  if test "x$test_cygdrive_prefix" = x; then
47329    # As a simple fix, exclude /usr/bin since it's not a real path.
47330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47332      # a path prefixed by /cygdrive for fixpath to work.
47333      new_path="$CYGWIN_ROOT_PATH$input_path"
47334    fi
47335  fi
47336
47337
47338  if test "x$path" != "x$new_path"; then
47339    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47341$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47342  fi
47343
47344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47345
47346  path="$POTENTIAL_FREETYPE_LIB_PATH"
47347  has_colon=`$ECHO $path | $GREP ^.:`
47348  new_path="$path"
47349  if test "x$has_colon" = x; then
47350    # Not in mixed or Windows style, start by that.
47351    new_path=`cmd //c echo $path`
47352  fi
47353
47354
47355  input_path="$new_path"
47356  # Check if we need to convert this using DOS-style short mode. If the path
47357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47358  # take no chances and rewrite it.
47359  # Note: m4 eats our [], so we need to use [ and ] instead.
47360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47361  if test "x$has_forbidden_chars" != x; then
47362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47364  fi
47365
47366
47367  windows_path="$new_path"
47368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47369    unix_path=`$CYGPATH -u "$windows_path"`
47370    new_path="$unix_path"
47371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47373    new_path="$unix_path"
47374  fi
47375
47376  if test "x$path" != "x$new_path"; then
47377    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47380  fi
47381
47382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47384
47385    else
47386      # We're on a unix platform. Hooray! :)
47387      path="$POTENTIAL_FREETYPE_LIB_PATH"
47388      has_space=`$ECHO "$path" | $GREP " "`
47389      if test "x$has_space" != x; then
47390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47391$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47393      fi
47394
47395      # Use eval to expand a potential ~
47396      eval path="$path"
47397      if test ! -f "$path" && test ! -d "$path"; then
47398        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47399      fi
47400
47401      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47402    fi
47403  fi
47404
47405
47406    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47408$as_echo_n "checking for freetype includes... " >&6; }
47409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47410$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47411    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47413$as_echo_n "checking for freetype libraries... " >&6; }
47414    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47415$as_echo "$FREETYPE_LIB_PATH" >&6; }
47416  fi
47417
47418            else
47419
47420  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47421  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47422  METHOD="well-known location"
47423
47424  # Let's start with an optimistic view of the world :-)
47425  FOUND_FREETYPE=yes
47426
47427  # First look for the canonical freetype main include file ft2build.h.
47428  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47429    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47430    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47431    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47432      # Fail.
47433      FOUND_FREETYPE=no
47434    fi
47435  fi
47436
47437  if test "x$FOUND_FREETYPE" = xyes; then
47438    # Include file found, let's continue the sanity check.
47439    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47440$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47441
47442    # Reset to default value
47443    FREETYPE_BASE_NAME=freetype
47444    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47445    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47446      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47447          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47448        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47449        # for the .6 version explicitly.
47450        FREETYPE_BASE_NAME=freetype.6
47451        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47452        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47453$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47454      else
47455        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47456$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47457        FOUND_FREETYPE=no
47458      fi
47459    else
47460      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47461        # On Windows, we will need both .lib and .dll file.
47462        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47463          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47464$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47465          FOUND_FREETYPE=no
47466        fi
47467      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47468          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47469        # Found lib in isa dir, use that instead.
47470        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47471        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47472$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47473      fi
47474    fi
47475  fi
47476
47477  if test "x$FOUND_FREETYPE" = xyes; then
47478
47479  # Only process if variable expands to non-empty
47480
47481  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47483
47484  # Input might be given as Windows format, start by converting to
47485  # unix format.
47486  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47487  new_path=`$CYGPATH -u "$path"`
47488
47489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47492  # "foo.exe" is OK but "foo" is an error.
47493  #
47494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47495  # It is also a way to make sure we got the proper file name for the real test later on.
47496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47497  if test "x$test_shortpath" = x; then
47498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47500    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47501  fi
47502
47503  # Call helper function which possibly converts this using DOS-style short mode.
47504  # If so, the updated path is stored in $new_path.
47505
47506  input_path="$new_path"
47507  # Check if we need to convert this using DOS-style short mode. If the path
47508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47509  # take no chances and rewrite it.
47510  # Note: m4 eats our [], so we need to use [ and ] instead.
47511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47512  if test "x$has_forbidden_chars" != x; then
47513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47517      # Going to short mode and back again did indeed matter. Since short mode is
47518      # case insensitive, let's make it lowercase to improve readability.
47519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47520      # Now convert it back to Unix-style (cygpath)
47521      input_path=`$CYGPATH -u "$shortmode_path"`
47522      new_path="$input_path"
47523    fi
47524  fi
47525
47526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47527  if test "x$test_cygdrive_prefix" = x; then
47528    # As a simple fix, exclude /usr/bin since it's not a real path.
47529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47531      # a path prefixed by /cygdrive for fixpath to work.
47532      new_path="$CYGWIN_ROOT_PATH$input_path"
47533    fi
47534  fi
47535
47536
47537  if test "x$path" != "x$new_path"; then
47538    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47540$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47541  fi
47542
47543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47544
47545  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47546  has_colon=`$ECHO $path | $GREP ^.:`
47547  new_path="$path"
47548  if test "x$has_colon" = x; then
47549    # Not in mixed or Windows style, start by that.
47550    new_path=`cmd //c echo $path`
47551  fi
47552
47553
47554  input_path="$new_path"
47555  # Check if we need to convert this using DOS-style short mode. If the path
47556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47557  # take no chances and rewrite it.
47558  # Note: m4 eats our [], so we need to use [ and ] instead.
47559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47560  if test "x$has_forbidden_chars" != x; then
47561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47563  fi
47564
47565
47566  windows_path="$new_path"
47567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47568    unix_path=`$CYGPATH -u "$windows_path"`
47569    new_path="$unix_path"
47570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47572    new_path="$unix_path"
47573  fi
47574
47575  if test "x$path" != "x$new_path"; then
47576    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47578$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47579  fi
47580
47581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47583
47584    else
47585      # We're on a unix platform. Hooray! :)
47586      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47587      has_space=`$ECHO "$path" | $GREP " "`
47588      if test "x$has_space" != x; then
47589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47590$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47592      fi
47593
47594      # Use eval to expand a potential ~
47595      eval path="$path"
47596      if test ! -f "$path" && test ! -d "$path"; then
47597        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47598      fi
47599
47600      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47601    fi
47602  fi
47603
47604
47605  # Only process if variable expands to non-empty
47606
47607  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47609
47610  # Input might be given as Windows format, start by converting to
47611  # unix format.
47612  path="$POTENTIAL_FREETYPE_LIB_PATH"
47613  new_path=`$CYGPATH -u "$path"`
47614
47615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47618  # "foo.exe" is OK but "foo" is an error.
47619  #
47620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47621  # It is also a way to make sure we got the proper file name for the real test later on.
47622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47623  if test "x$test_shortpath" = x; then
47624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47626    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47627  fi
47628
47629  # Call helper function which possibly converts this using DOS-style short mode.
47630  # If so, the updated path is stored in $new_path.
47631
47632  input_path="$new_path"
47633  # Check if we need to convert this using DOS-style short mode. If the path
47634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47635  # take no chances and rewrite it.
47636  # Note: m4 eats our [], so we need to use [ and ] instead.
47637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47638  if test "x$has_forbidden_chars" != x; then
47639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47643      # Going to short mode and back again did indeed matter. Since short mode is
47644      # case insensitive, let's make it lowercase to improve readability.
47645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47646      # Now convert it back to Unix-style (cygpath)
47647      input_path=`$CYGPATH -u "$shortmode_path"`
47648      new_path="$input_path"
47649    fi
47650  fi
47651
47652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47653  if test "x$test_cygdrive_prefix" = x; then
47654    # As a simple fix, exclude /usr/bin since it's not a real path.
47655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47657      # a path prefixed by /cygdrive for fixpath to work.
47658      new_path="$CYGWIN_ROOT_PATH$input_path"
47659    fi
47660  fi
47661
47662
47663  if test "x$path" != "x$new_path"; then
47664    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47666$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47667  fi
47668
47669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47670
47671  path="$POTENTIAL_FREETYPE_LIB_PATH"
47672  has_colon=`$ECHO $path | $GREP ^.:`
47673  new_path="$path"
47674  if test "x$has_colon" = x; then
47675    # Not in mixed or Windows style, start by that.
47676    new_path=`cmd //c echo $path`
47677  fi
47678
47679
47680  input_path="$new_path"
47681  # Check if we need to convert this using DOS-style short mode. If the path
47682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47683  # take no chances and rewrite it.
47684  # Note: m4 eats our [], so we need to use [ and ] instead.
47685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47686  if test "x$has_forbidden_chars" != x; then
47687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47689  fi
47690
47691
47692  windows_path="$new_path"
47693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47694    unix_path=`$CYGPATH -u "$windows_path"`
47695    new_path="$unix_path"
47696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47698    new_path="$unix_path"
47699  fi
47700
47701  if test "x$path" != "x$new_path"; then
47702    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47705  fi
47706
47707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47709
47710    else
47711      # We're on a unix platform. Hooray! :)
47712      path="$POTENTIAL_FREETYPE_LIB_PATH"
47713      has_space=`$ECHO "$path" | $GREP " "`
47714      if test "x$has_space" != x; then
47715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47718      fi
47719
47720      # Use eval to expand a potential ~
47721      eval path="$path"
47722      if test ! -f "$path" && test ! -d "$path"; then
47723        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47724      fi
47725
47726      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47727    fi
47728  fi
47729
47730
47731    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47733$as_echo_n "checking for freetype includes... " >&6; }
47734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47735$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47736    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47738$as_echo_n "checking for freetype libraries... " >&6; }
47739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47740$as_echo "$FREETYPE_LIB_PATH" >&6; }
47741  fi
47742
47743              if test "x$FOUND_FREETYPE" != xyes; then
47744
47745  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47746  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47747  METHOD="well-known location"
47748
47749  # Let's start with an optimistic view of the world :-)
47750  FOUND_FREETYPE=yes
47751
47752  # First look for the canonical freetype main include file ft2build.h.
47753  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47754    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47755    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47756    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47757      # Fail.
47758      FOUND_FREETYPE=no
47759    fi
47760  fi
47761
47762  if test "x$FOUND_FREETYPE" = xyes; then
47763    # Include file found, let's continue the sanity check.
47764    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47765$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47766
47767    # Reset to default value
47768    FREETYPE_BASE_NAME=freetype
47769    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47770    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47771      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47772          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47773        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47774        # for the .6 version explicitly.
47775        FREETYPE_BASE_NAME=freetype.6
47776        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47777        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47778$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47779      else
47780        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47781$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47782        FOUND_FREETYPE=no
47783      fi
47784    else
47785      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47786        # On Windows, we will need both .lib and .dll file.
47787        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47788          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47789$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47790          FOUND_FREETYPE=no
47791        fi
47792      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47793          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47794        # Found lib in isa dir, use that instead.
47795        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47796        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47797$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47798      fi
47799    fi
47800  fi
47801
47802  if test "x$FOUND_FREETYPE" = xyes; then
47803
47804  # Only process if variable expands to non-empty
47805
47806  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47808
47809  # Input might be given as Windows format, start by converting to
47810  # unix format.
47811  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47812  new_path=`$CYGPATH -u "$path"`
47813
47814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47817  # "foo.exe" is OK but "foo" is an error.
47818  #
47819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47820  # It is also a way to make sure we got the proper file name for the real test later on.
47821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47822  if test "x$test_shortpath" = x; then
47823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47825    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47826  fi
47827
47828  # Call helper function which possibly converts this using DOS-style short mode.
47829  # If so, the updated path is stored in $new_path.
47830
47831  input_path="$new_path"
47832  # Check if we need to convert this using DOS-style short mode. If the path
47833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47834  # take no chances and rewrite it.
47835  # Note: m4 eats our [], so we need to use [ and ] instead.
47836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47837  if test "x$has_forbidden_chars" != x; then
47838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47842      # Going to short mode and back again did indeed matter. Since short mode is
47843      # case insensitive, let's make it lowercase to improve readability.
47844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47845      # Now convert it back to Unix-style (cygpath)
47846      input_path=`$CYGPATH -u "$shortmode_path"`
47847      new_path="$input_path"
47848    fi
47849  fi
47850
47851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47852  if test "x$test_cygdrive_prefix" = x; then
47853    # As a simple fix, exclude /usr/bin since it's not a real path.
47854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47856      # a path prefixed by /cygdrive for fixpath to work.
47857      new_path="$CYGWIN_ROOT_PATH$input_path"
47858    fi
47859  fi
47860
47861
47862  if test "x$path" != "x$new_path"; then
47863    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47865$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47866  fi
47867
47868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47869
47870  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47871  has_colon=`$ECHO $path | $GREP ^.:`
47872  new_path="$path"
47873  if test "x$has_colon" = x; then
47874    # Not in mixed or Windows style, start by that.
47875    new_path=`cmd //c echo $path`
47876  fi
47877
47878
47879  input_path="$new_path"
47880  # Check if we need to convert this using DOS-style short mode. If the path
47881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47882  # take no chances and rewrite it.
47883  # Note: m4 eats our [], so we need to use [ and ] instead.
47884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47885  if test "x$has_forbidden_chars" != x; then
47886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47888  fi
47889
47890
47891  windows_path="$new_path"
47892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47893    unix_path=`$CYGPATH -u "$windows_path"`
47894    new_path="$unix_path"
47895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47897    new_path="$unix_path"
47898  fi
47899
47900  if test "x$path" != "x$new_path"; then
47901    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47903$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47904  fi
47905
47906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47908
47909    else
47910      # We're on a unix platform. Hooray! :)
47911      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47912      has_space=`$ECHO "$path" | $GREP " "`
47913      if test "x$has_space" != x; then
47914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47915$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47917      fi
47918
47919      # Use eval to expand a potential ~
47920      eval path="$path"
47921      if test ! -f "$path" && test ! -d "$path"; then
47922        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47923      fi
47924
47925      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47926    fi
47927  fi
47928
47929
47930  # Only process if variable expands to non-empty
47931
47932  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47934
47935  # Input might be given as Windows format, start by converting to
47936  # unix format.
47937  path="$POTENTIAL_FREETYPE_LIB_PATH"
47938  new_path=`$CYGPATH -u "$path"`
47939
47940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47943  # "foo.exe" is OK but "foo" is an error.
47944  #
47945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47946  # It is also a way to make sure we got the proper file name for the real test later on.
47947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47948  if test "x$test_shortpath" = x; then
47949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47950$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47951    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47952  fi
47953
47954  # Call helper function which possibly converts this using DOS-style short mode.
47955  # If so, the updated path is stored in $new_path.
47956
47957  input_path="$new_path"
47958  # Check if we need to convert this using DOS-style short mode. If the path
47959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47960  # take no chances and rewrite it.
47961  # Note: m4 eats our [], so we need to use [ and ] instead.
47962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47963  if test "x$has_forbidden_chars" != x; then
47964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47968      # Going to short mode and back again did indeed matter. Since short mode is
47969      # case insensitive, let's make it lowercase to improve readability.
47970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47971      # Now convert it back to Unix-style (cygpath)
47972      input_path=`$CYGPATH -u "$shortmode_path"`
47973      new_path="$input_path"
47974    fi
47975  fi
47976
47977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47978  if test "x$test_cygdrive_prefix" = x; then
47979    # As a simple fix, exclude /usr/bin since it's not a real path.
47980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47982      # a path prefixed by /cygdrive for fixpath to work.
47983      new_path="$CYGWIN_ROOT_PATH$input_path"
47984    fi
47985  fi
47986
47987
47988  if test "x$path" != "x$new_path"; then
47989    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47992  fi
47993
47994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47995
47996  path="$POTENTIAL_FREETYPE_LIB_PATH"
47997  has_colon=`$ECHO $path | $GREP ^.:`
47998  new_path="$path"
47999  if test "x$has_colon" = x; then
48000    # Not in mixed or Windows style, start by that.
48001    new_path=`cmd //c echo $path`
48002  fi
48003
48004
48005  input_path="$new_path"
48006  # Check if we need to convert this using DOS-style short mode. If the path
48007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48008  # take no chances and rewrite it.
48009  # Note: m4 eats our [], so we need to use [ and ] instead.
48010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48011  if test "x$has_forbidden_chars" != x; then
48012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48014  fi
48015
48016
48017  windows_path="$new_path"
48018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48019    unix_path=`$CYGPATH -u "$windows_path"`
48020    new_path="$unix_path"
48021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48023    new_path="$unix_path"
48024  fi
48025
48026  if test "x$path" != "x$new_path"; then
48027    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48030  fi
48031
48032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48034
48035    else
48036      # We're on a unix platform. Hooray! :)
48037      path="$POTENTIAL_FREETYPE_LIB_PATH"
48038      has_space=`$ECHO "$path" | $GREP " "`
48039      if test "x$has_space" != x; then
48040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48043      fi
48044
48045      # Use eval to expand a potential ~
48046      eval path="$path"
48047      if test ! -f "$path" && test ! -d "$path"; then
48048        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48049      fi
48050
48051      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48052    fi
48053  fi
48054
48055
48056    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48058$as_echo_n "checking for freetype includes... " >&6; }
48059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48060$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48061    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48063$as_echo_n "checking for freetype libraries... " >&6; }
48064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48065$as_echo "$FREETYPE_LIB_PATH" >&6; }
48066  fi
48067
48068              fi
48069            fi
48070          fi
48071        fi
48072      fi # end check in well-known locations
48073
48074      if test "x$FOUND_FREETYPE" != xyes; then
48075
48076  # Print a helpful message on how to acquire the necessary build dependency.
48077  # freetype is the help tag: freetype, cups, pulse, alsa etc
48078  MISSING_DEPENDENCY=freetype
48079
48080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48081    cygwin_help $MISSING_DEPENDENCY
48082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48083    msys_help $MISSING_DEPENDENCY
48084  else
48085    PKGHANDLER_COMMAND=
48086
48087    case $PKGHANDLER in
48088      apt-get)
48089        apt_help     $MISSING_DEPENDENCY ;;
48090      yum)
48091        yum_help     $MISSING_DEPENDENCY ;;
48092      port)
48093        port_help    $MISSING_DEPENDENCY ;;
48094      pkgutil)
48095        pkgutil_help $MISSING_DEPENDENCY ;;
48096      pkgadd)
48097        pkgadd_help  $MISSING_DEPENDENCY ;;
48098    esac
48099
48100    if test "x$PKGHANDLER_COMMAND" != x; then
48101      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48102    fi
48103  fi
48104
48105        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48106      fi
48107    fi # end user specified settings
48108
48109    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48110    if test "x$FREETYPE_CFLAGS" = x; then
48111
48112  # Only process if variable expands to non-empty
48113
48114  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48116
48117  # Input might be given as Windows format, start by converting to
48118  # unix format.
48119  path="$FREETYPE_INCLUDE_PATH"
48120  new_path=`$CYGPATH -u "$path"`
48121
48122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48125  # "foo.exe" is OK but "foo" is an error.
48126  #
48127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48128  # It is also a way to make sure we got the proper file name for the real test later on.
48129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48130  if test "x$test_shortpath" = x; then
48131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48132$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48133    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48134  fi
48135
48136  # Call helper function which possibly converts this using DOS-style short mode.
48137  # If so, the updated path is stored in $new_path.
48138
48139  input_path="$new_path"
48140  # Check if we need to convert this using DOS-style short mode. If the path
48141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48142  # take no chances and rewrite it.
48143  # Note: m4 eats our [], so we need to use [ and ] instead.
48144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48145  if test "x$has_forbidden_chars" != x; then
48146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48150      # Going to short mode and back again did indeed matter. Since short mode is
48151      # case insensitive, let's make it lowercase to improve readability.
48152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48153      # Now convert it back to Unix-style (cygpath)
48154      input_path=`$CYGPATH -u "$shortmode_path"`
48155      new_path="$input_path"
48156    fi
48157  fi
48158
48159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48160  if test "x$test_cygdrive_prefix" = x; then
48161    # As a simple fix, exclude /usr/bin since it's not a real path.
48162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48164      # a path prefixed by /cygdrive for fixpath to work.
48165      new_path="$CYGWIN_ROOT_PATH$input_path"
48166    fi
48167  fi
48168
48169
48170  if test "x$path" != "x$new_path"; then
48171    FREETYPE_INCLUDE_PATH="$new_path"
48172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48173$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48174  fi
48175
48176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48177
48178  path="$FREETYPE_INCLUDE_PATH"
48179  has_colon=`$ECHO $path | $GREP ^.:`
48180  new_path="$path"
48181  if test "x$has_colon" = x; then
48182    # Not in mixed or Windows style, start by that.
48183    new_path=`cmd //c echo $path`
48184  fi
48185
48186
48187  input_path="$new_path"
48188  # Check if we need to convert this using DOS-style short mode. If the path
48189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48190  # take no chances and rewrite it.
48191  # Note: m4 eats our [], so we need to use [ and ] instead.
48192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48193  if test "x$has_forbidden_chars" != x; then
48194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48196  fi
48197
48198
48199  windows_path="$new_path"
48200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48201    unix_path=`$CYGPATH -u "$windows_path"`
48202    new_path="$unix_path"
48203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48205    new_path="$unix_path"
48206  fi
48207
48208  if test "x$path" != "x$new_path"; then
48209    FREETYPE_INCLUDE_PATH="$new_path"
48210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48211$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48212  fi
48213
48214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48216
48217    else
48218      # We're on a unix platform. Hooray! :)
48219      path="$FREETYPE_INCLUDE_PATH"
48220      has_space=`$ECHO "$path" | $GREP " "`
48221      if test "x$has_space" != x; then
48222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48223$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48224        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48225      fi
48226
48227      # Use eval to expand a potential ~
48228      eval path="$path"
48229      if test ! -f "$path" && test ! -d "$path"; then
48230        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48231      fi
48232
48233      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48234    fi
48235  fi
48236
48237      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48238        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48239      else
48240        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48241      fi
48242    fi
48243
48244    if test "x$FREETYPE_LIBS" = x; then
48245
48246  # Only process if variable expands to non-empty
48247
48248  if test "x$FREETYPE_LIB_PATH" != x; then
48249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48250
48251  # Input might be given as Windows format, start by converting to
48252  # unix format.
48253  path="$FREETYPE_LIB_PATH"
48254  new_path=`$CYGPATH -u "$path"`
48255
48256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48259  # "foo.exe" is OK but "foo" is an error.
48260  #
48261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48262  # It is also a way to make sure we got the proper file name for the real test later on.
48263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48264  if test "x$test_shortpath" = x; then
48265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48266$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48267    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48268  fi
48269
48270  # Call helper function which possibly converts this using DOS-style short mode.
48271  # If so, the updated path is stored in $new_path.
48272
48273  input_path="$new_path"
48274  # Check if we need to convert this using DOS-style short mode. If the path
48275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48276  # take no chances and rewrite it.
48277  # Note: m4 eats our [], so we need to use [ and ] instead.
48278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48279  if test "x$has_forbidden_chars" != x; then
48280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48284      # Going to short mode and back again did indeed matter. Since short mode is
48285      # case insensitive, let's make it lowercase to improve readability.
48286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48287      # Now convert it back to Unix-style (cygpath)
48288      input_path=`$CYGPATH -u "$shortmode_path"`
48289      new_path="$input_path"
48290    fi
48291  fi
48292
48293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48294  if test "x$test_cygdrive_prefix" = x; then
48295    # As a simple fix, exclude /usr/bin since it's not a real path.
48296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48298      # a path prefixed by /cygdrive for fixpath to work.
48299      new_path="$CYGWIN_ROOT_PATH$input_path"
48300    fi
48301  fi
48302
48303
48304  if test "x$path" != "x$new_path"; then
48305    FREETYPE_LIB_PATH="$new_path"
48306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48307$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48308  fi
48309
48310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48311
48312  path="$FREETYPE_LIB_PATH"
48313  has_colon=`$ECHO $path | $GREP ^.:`
48314  new_path="$path"
48315  if test "x$has_colon" = x; then
48316    # Not in mixed or Windows style, start by that.
48317    new_path=`cmd //c echo $path`
48318  fi
48319
48320
48321  input_path="$new_path"
48322  # Check if we need to convert this using DOS-style short mode. If the path
48323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48324  # take no chances and rewrite it.
48325  # Note: m4 eats our [], so we need to use [ and ] instead.
48326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48327  if test "x$has_forbidden_chars" != x; then
48328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48330  fi
48331
48332
48333  windows_path="$new_path"
48334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48335    unix_path=`$CYGPATH -u "$windows_path"`
48336    new_path="$unix_path"
48337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48339    new_path="$unix_path"
48340  fi
48341
48342  if test "x$path" != "x$new_path"; then
48343    FREETYPE_LIB_PATH="$new_path"
48344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48345$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48346  fi
48347
48348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48350
48351    else
48352      # We're on a unix platform. Hooray! :)
48353      path="$FREETYPE_LIB_PATH"
48354      has_space=`$ECHO "$path" | $GREP " "`
48355      if test "x$has_space" != x; then
48356        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48357$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48358        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48359      fi
48360
48361      # Use eval to expand a potential ~
48362      eval path="$path"
48363      if test ! -f "$path" && test ! -d "$path"; then
48364        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48365      fi
48366
48367      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48368    fi
48369  fi
48370
48371      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48372        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48373      else
48374        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48375      fi
48376    fi
48377
48378    # Try to compile it
48379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48380$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48381    ac_ext=cpp
48382ac_cpp='$CXXCPP $CPPFLAGS'
48383ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48384ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48385ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48386
48387    PREV_CXXCFLAGS="$CXXFLAGS"
48388    PREV_LIBS="$LIBS"
48389    PREV_CXX="$CXX"
48390    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48391    LIBS="$LIBS $FREETYPE_LIBS"
48392    CXX="$FIXPATH $CXX"
48393    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48394/* end confdefs.h.  */
48395
48396          #include<ft2build.h>
48397          #include FT_FREETYPE_H
48398          int main () {
48399            FT_Init_FreeType(NULL);
48400            return 0;
48401          }
48402
48403_ACEOF
48404if ac_fn_cxx_try_link "$LINENO"; then :
48405
48406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48407$as_echo "yes" >&6; }
48408
48409else
48410
48411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48412$as_echo "no" >&6; }
48413          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48414$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48415          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48416$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48417
48418
48419  # Print a helpful message on how to acquire the necessary build dependency.
48420  # freetype is the help tag: freetype, cups, pulse, alsa etc
48421  MISSING_DEPENDENCY=freetype
48422
48423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48424    cygwin_help $MISSING_DEPENDENCY
48425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48426    msys_help $MISSING_DEPENDENCY
48427  else
48428    PKGHANDLER_COMMAND=
48429
48430    case $PKGHANDLER in
48431      apt-get)
48432        apt_help     $MISSING_DEPENDENCY ;;
48433      yum)
48434        yum_help     $MISSING_DEPENDENCY ;;
48435      port)
48436        port_help    $MISSING_DEPENDENCY ;;
48437      pkgutil)
48438        pkgutil_help $MISSING_DEPENDENCY ;;
48439      pkgadd)
48440        pkgadd_help  $MISSING_DEPENDENCY ;;
48441    esac
48442
48443    if test "x$PKGHANDLER_COMMAND" != x; then
48444      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48445    fi
48446  fi
48447
48448
48449          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48450
48451
48452fi
48453rm -f core conftest.err conftest.$ac_objext \
48454    conftest$ac_exeext conftest.$ac_ext
48455    CXXCFLAGS="$PREV_CXXFLAGS"
48456    LIBS="$PREV_LIBS"
48457    CXX="$PREV_CXX"
48458    ac_ext=cpp
48459ac_cpp='$CXXCPP $CPPFLAGS'
48460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48463
48464
48465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48466$as_echo_n "checking if we should bundle freetype... " >&6; }
48467    if test "x$BUNDLE_FREETYPE" = xyes; then
48468      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48469    fi
48470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48471$as_echo "$BUNDLE_FREETYPE" >&6; }
48472
48473  fi # end freetype needed
48474
48475
48476
48477
48478
48479
48480
48481  ###############################################################################
48482  #
48483  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48484  #
48485
48486# Check whether --with-alsa was given.
48487if test "${with_alsa+set}" = set; then :
48488  withval=$with_alsa;
48489fi
48490
48491
48492# Check whether --with-alsa-include was given.
48493if test "${with_alsa_include+set}" = set; then :
48494  withval=$with_alsa_include;
48495fi
48496
48497
48498# Check whether --with-alsa-lib was given.
48499if test "${with_alsa_lib+set}" = set; then :
48500  withval=$with_alsa_lib;
48501fi
48502
48503
48504  if test "x$ALSA_NOT_NEEDED" = xyes; then
48505    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48506      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48507$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48508    fi
48509    ALSA_CFLAGS=
48510    ALSA_LIBS=
48511  else
48512    ALSA_FOUND=no
48513
48514    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48515      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48516    fi
48517
48518    if test "x${with_alsa}" != x; then
48519      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48520      ALSA_CFLAGS="-I${with_alsa}/include"
48521      ALSA_FOUND=yes
48522    fi
48523    if test "x${with_alsa_include}" != x; then
48524      ALSA_CFLAGS="-I${with_alsa_include}"
48525      ALSA_FOUND=yes
48526    fi
48527    if test "x${with_alsa_lib}" != x; then
48528      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48529      ALSA_FOUND=yes
48530    fi
48531    if test "x$ALSA_FOUND" = xno; then
48532
48533
48534  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48535    # Source the builddeps file again, to make sure it uses the latest variables!
48536    . $builddepsfile
48537    # Look for a target and build machine specific resource!
48538    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48539    if test "x$resource" = x; then
48540      # Ok, lets instead look for a target specific resource
48541      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48542    fi
48543    if test "x$resource" = x; then
48544      # Ok, lets instead look for a build specific resource
48545      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48546    fi
48547    if test "x$resource" = x; then
48548      # Ok, lets instead look for a generic resource
48549      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48550      resource=${builddep_alsa}
48551    fi
48552    if test "x$resource" != x; then
48553      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48554$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48555      # If the resource in the builddeps.conf file is an existing directory,
48556      # for example /java/linux/cups
48557      if test -d ${resource}; then
48558        depdir=${resource}
48559      else
48560
48561  # alsa is for example mymodule
48562  # $resource is for example libs/general/libmymod_1_2_3.zip
48563  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48564  # $with_builddeps_dir is for example /localhome/builddeps
48565  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48566  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48567  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48568  filename=`basename $resource`
48569  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48570  filebase=${filename%%.*}
48571  extension=${filename#*.}
48572  installdir=$with_builddeps_dir/$filebase
48573  if test ! -f $installdir/$filename.unpacked; then
48574    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48575$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48576    if test ! -d $installdir; then
48577      mkdir -p $installdir
48578    fi
48579    if test ! -d $installdir; then
48580      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48581    fi
48582    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48583    touch $tmpfile
48584    if test ! -f $tmpfile; then
48585      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48586    fi
48587
48588  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48589  # $tmpfile is the local file name for the downloaded file.
48590  VALID_TOOL=no
48591  if test "x$BDEPS_FTP" = xwget; then
48592    VALID_TOOL=yes
48593    wget -O $tmpfile $with_builddeps_server/$resource
48594  fi
48595  if test "x$BDEPS_FTP" = xlftp; then
48596    VALID_TOOL=yes
48597    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48598  fi
48599  if test "x$BDEPS_FTP" = xftp; then
48600    VALID_TOOL=yes
48601    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48602    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48603    FTPUSERPWD=${FTPSERVER%%@*}
48604    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48605      FTPUSER=${userpwd%%:*}
48606      FTPPWD=${userpwd#*@}
48607      FTPSERVER=${FTPSERVER#*@}
48608    else
48609      FTPUSER=ftp
48610      FTPPWD=ftp
48611    fi
48612    # the "pass" command does not work on some
48613    # ftp clients (read ftp.exe) but if it works,
48614    # passive mode is better!
48615    ( \
48616        echo "user $FTPUSER $FTPPWD"        ; \
48617        echo "pass"                         ; \
48618        echo "bin"                          ; \
48619        echo "get $FTPPATH $tmpfile"              ; \
48620    ) | ftp -in $FTPSERVER
48621  fi
48622  if test "x$VALID_TOOL" != xyes; then
48623    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48624  fi
48625
48626    mv $tmpfile $installdir/$filename
48627    if test ! -s $installdir/$filename; then
48628      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48629    fi
48630    case "$extension" in
48631      zip)  echo "Unzipping $installdir/$filename..."
48632        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48633        ;;
48634      tar.gz) echo "Untaring $installdir/$filename..."
48635        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48636        ;;
48637      tgz) echo "Untaring $installdir/$filename..."
48638        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48639        ;;
48640      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48641        ;;
48642    esac
48643  fi
48644  if test -f $installdir/$filename.unpacked; then
48645    depdir=$installdir
48646  fi
48647
48648      fi
48649      # Source the builddeps file again, because in the previous command, the depdir
48650      # was updated to point at the current build dependency install directory.
48651      . $builddepsfile
48652      # Now extract variables from the builddeps.conf files.
48653      theroot=${builddep_alsa_ROOT}
48654      thecflags=${builddep_alsa_CFLAGS}
48655      thelibs=${builddep_alsa_LIBS}
48656      if test "x$depdir" = x; then
48657        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48658      fi
48659      ALSA=$depdir
48660      if test "x$theroot" != x; then
48661        ALSA="$theroot"
48662      fi
48663      if test "x$thecflags" != x; then
48664        ALSA_CFLAGS="$thecflags"
48665      fi
48666      if test "x$thelibs" != x; then
48667        ALSA_LIBS="$thelibs"
48668      fi
48669      ALSA_FOUND=yes
48670      else ALSA_FOUND=no
48671
48672    fi
48673    else ALSA_FOUND=no
48674
48675  fi
48676
48677    fi
48678    # Do not try pkg-config if we have a sysroot set.
48679    if test "x$SYSROOT" = x; then
48680      if test "x$ALSA_FOUND" = xno; then
48681
48682pkg_failed=no
48683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48684$as_echo_n "checking for ALSA... " >&6; }
48685
48686if test -n "$ALSA_CFLAGS"; then
48687    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48688 elif test -n "$PKG_CONFIG"; then
48689    if test -n "$PKG_CONFIG" && \
48690    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48691  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48692  ac_status=$?
48693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48694  test $ac_status = 0; }; then
48695  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48696else
48697  pkg_failed=yes
48698fi
48699 else
48700    pkg_failed=untried
48701fi
48702if test -n "$ALSA_LIBS"; then
48703    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48704 elif test -n "$PKG_CONFIG"; then
48705    if test -n "$PKG_CONFIG" && \
48706    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48707  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48708  ac_status=$?
48709  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48710  test $ac_status = 0; }; then
48711  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48712else
48713  pkg_failed=yes
48714fi
48715 else
48716    pkg_failed=untried
48717fi
48718
48719
48720
48721if test $pkg_failed = yes; then
48722
48723if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48724        _pkg_short_errors_supported=yes
48725else
48726        _pkg_short_errors_supported=no
48727fi
48728        if test $_pkg_short_errors_supported = yes; then
48729	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48730        else
48731	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48732        fi
48733	# Put the nasty error message in config.log where it belongs
48734	echo "$ALSA_PKG_ERRORS" >&5
48735
48736	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48737$as_echo "no" >&6; }
48738                ALSA_FOUND=no
48739elif test $pkg_failed = untried; then
48740	ALSA_FOUND=no
48741else
48742	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48743	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48745$as_echo "yes" >&6; }
48746	ALSA_FOUND=yes
48747fi
48748      fi
48749    fi
48750    if test "x$ALSA_FOUND" = xno; then
48751      for ac_header in alsa/asoundlib.h
48752do :
48753  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48754if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48755  cat >>confdefs.h <<_ACEOF
48756#define HAVE_ALSA_ASOUNDLIB_H 1
48757_ACEOF
48758
48759            ALSA_FOUND=yes
48760            ALSA_CFLAGS=-Iignoreme
48761            ALSA_LIBS=-lasound
48762            DEFAULT_ALSA=yes
48763
48764else
48765  ALSA_FOUND=no
48766fi
48767
48768done
48769
48770    fi
48771    if test "x$ALSA_FOUND" = xno; then
48772
48773  # Print a helpful message on how to acquire the necessary build dependency.
48774  # alsa is the help tag: freetype, cups, pulse, alsa etc
48775  MISSING_DEPENDENCY=alsa
48776
48777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48778    cygwin_help $MISSING_DEPENDENCY
48779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48780    msys_help $MISSING_DEPENDENCY
48781  else
48782    PKGHANDLER_COMMAND=
48783
48784    case $PKGHANDLER in
48785      apt-get)
48786        apt_help     $MISSING_DEPENDENCY ;;
48787      yum)
48788        yum_help     $MISSING_DEPENDENCY ;;
48789      port)
48790        port_help    $MISSING_DEPENDENCY ;;
48791      pkgutil)
48792        pkgutil_help $MISSING_DEPENDENCY ;;
48793      pkgadd)
48794        pkgadd_help  $MISSING_DEPENDENCY ;;
48795    esac
48796
48797    if test "x$PKGHANDLER_COMMAND" != x; then
48798      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48799    fi
48800  fi
48801
48802      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48803    fi
48804  fi
48805
48806
48807
48808
48809
48810
48811  ###############################################################################
48812  #
48813  # Check for the jpeg library
48814  #
48815
48816
48817# Check whether --with-libjpeg was given.
48818if test "${with_libjpeg+set}" = set; then :
48819  withval=$with_libjpeg;
48820fi
48821
48822
48823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48824$as_echo_n "checking for which libjpeg to use... " >&6; }
48825
48826  # default is bundled
48827  DEFAULT_LIBJPEG=bundled
48828
48829  #
48830  # if user didn't specify, use DEFAULT_LIBJPEG
48831  #
48832  if test "x${with_libjpeg}" = "x"; then
48833    with_libjpeg=${DEFAULT_LIBJPEG}
48834  fi
48835
48836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48837$as_echo "${with_libjpeg}" >&6; }
48838
48839  if test "x${with_libjpeg}" = "xbundled"; then
48840    USE_EXTERNAL_LIBJPEG=false
48841  elif test "x${with_libjpeg}" = "xsystem"; then
48842    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48843if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48844
48845else
48846   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48847fi
48848
48849
48850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48851$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48852if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48853  $as_echo_n "(cached) " >&6
48854else
48855  ac_check_lib_save_LIBS=$LIBS
48856LIBS="-ljpeg  $LIBS"
48857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48858/* end confdefs.h.  */
48859
48860/* Override any GCC internal prototype to avoid an error.
48861   Use char because int might match the return type of a GCC
48862   builtin and then its argument prototype would still apply.  */
48863#ifdef __cplusplus
48864extern "C"
48865#endif
48866char jpeg_CreateDecompress ();
48867int
48868main ()
48869{
48870return jpeg_CreateDecompress ();
48871  ;
48872  return 0;
48873}
48874_ACEOF
48875if ac_fn_cxx_try_link "$LINENO"; then :
48876  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48877else
48878  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48879fi
48880rm -f core conftest.err conftest.$ac_objext \
48881    conftest$ac_exeext conftest.$ac_ext
48882LIBS=$ac_check_lib_save_LIBS
48883fi
48884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48885$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48886if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48887  cat >>confdefs.h <<_ACEOF
48888#define HAVE_LIBJPEG 1
48889_ACEOF
48890
48891  LIBS="-ljpeg $LIBS"
48892
48893else
48894   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48895fi
48896
48897
48898    USE_EXTERNAL_LIBJPEG=true
48899  else
48900    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48901  fi
48902
48903
48904
48905  ###############################################################################
48906  #
48907  # Check for the gif library
48908  #
48909
48910
48911# Check whether --with-giflib was given.
48912if test "${with_giflib+set}" = set; then :
48913  withval=$with_giflib;
48914fi
48915
48916
48917
48918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48919$as_echo_n "checking for which giflib to use... " >&6; }
48920
48921  # default is bundled
48922  DEFAULT_GIFLIB=bundled
48923
48924  #
48925  # if user didn't specify, use DEFAULT_GIFLIB
48926  #
48927  if test "x${with_giflib}" = "x"; then
48928    with_giflib=${DEFAULT_GIFLIB}
48929  fi
48930
48931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48932$as_echo "${with_giflib}" >&6; }
48933
48934  if test "x${with_giflib}" = "xbundled"; then
48935    USE_EXTERNAL_LIBGIF=false
48936  elif test "x${with_giflib}" = "xsystem"; then
48937    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48938if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48939
48940else
48941   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48942fi
48943
48944
48945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48946$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48947if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48948  $as_echo_n "(cached) " >&6
48949else
48950  ac_check_lib_save_LIBS=$LIBS
48951LIBS="-lgif  $LIBS"
48952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48953/* end confdefs.h.  */
48954
48955/* Override any GCC internal prototype to avoid an error.
48956   Use char because int might match the return type of a GCC
48957   builtin and then its argument prototype would still apply.  */
48958#ifdef __cplusplus
48959extern "C"
48960#endif
48961char DGifGetCode ();
48962int
48963main ()
48964{
48965return DGifGetCode ();
48966  ;
48967  return 0;
48968}
48969_ACEOF
48970if ac_fn_cxx_try_link "$LINENO"; then :
48971  ac_cv_lib_gif_DGifGetCode=yes
48972else
48973  ac_cv_lib_gif_DGifGetCode=no
48974fi
48975rm -f core conftest.err conftest.$ac_objext \
48976    conftest$ac_exeext conftest.$ac_ext
48977LIBS=$ac_check_lib_save_LIBS
48978fi
48979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48980$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48981if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48982  cat >>confdefs.h <<_ACEOF
48983#define HAVE_LIBGIF 1
48984_ACEOF
48985
48986  LIBS="-lgif $LIBS"
48987
48988else
48989   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48990fi
48991
48992
48993    USE_EXTERNAL_LIBGIF=true
48994  else
48995    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48996  fi
48997
48998
48999  ###############################################################################
49000  #
49001  # Check for the lcms2 library
49002  #
49003
49004
49005# Check whether --with-lcms was given.
49006if test "${with_lcms+set}" = set; then :
49007  withval=$with_lcms;
49008fi
49009
49010
49011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49012$as_echo_n "checking for which lcms to use... " >&6; }
49013
49014  DEFAULT_LCMS=bundled
49015
49016  #
49017  # If user didn't specify, use DEFAULT_LCMS
49018  #
49019  if test "x${with_lcms}" = "x"; then
49020      with_lcms=${DEFAULT_LCMS}
49021  fi
49022
49023  if test "x${with_lcms}" = "xbundled"; then
49024    USE_EXTERNAL_LCMS=false
49025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49026$as_echo "bundled" >&6; }
49027  elif test "x${with_lcms}" = "xsystem"; then
49028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49029$as_echo "system" >&6; }
49030
49031pkg_failed=no
49032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49033$as_echo_n "checking for LCMS... " >&6; }
49034
49035if test -n "$LCMS_CFLAGS"; then
49036    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49037 elif test -n "$PKG_CONFIG"; then
49038    if test -n "$PKG_CONFIG" && \
49039    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49040  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49041  ac_status=$?
49042  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49043  test $ac_status = 0; }; then
49044  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49045else
49046  pkg_failed=yes
49047fi
49048 else
49049    pkg_failed=untried
49050fi
49051if test -n "$LCMS_LIBS"; then
49052    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49053 elif test -n "$PKG_CONFIG"; then
49054    if test -n "$PKG_CONFIG" && \
49055    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49056  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49057  ac_status=$?
49058  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49059  test $ac_status = 0; }; then
49060  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49061else
49062  pkg_failed=yes
49063fi
49064 else
49065    pkg_failed=untried
49066fi
49067
49068
49069
49070if test $pkg_failed = yes; then
49071
49072if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49073        _pkg_short_errors_supported=yes
49074else
49075        _pkg_short_errors_supported=no
49076fi
49077        if test $_pkg_short_errors_supported = yes; then
49078	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49079        else
49080	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49081        fi
49082	# Put the nasty error message in config.log where it belongs
49083	echo "$LCMS_PKG_ERRORS" >&5
49084
49085	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49086$as_echo "no" >&6; }
49087                LCMS_FOUND=no
49088elif test $pkg_failed = untried; then
49089	LCMS_FOUND=no
49090else
49091	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49092	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49094$as_echo "yes" >&6; }
49095	LCMS_FOUND=yes
49096fi
49097    if test "x${LCMS_FOUND}" = "xyes"; then
49098      USE_EXTERNAL_LCMS=true
49099    else
49100      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49101    fi
49102  else
49103    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49104  fi
49105
49106
49107
49108  ###############################################################################
49109  #
49110  # Check for the png library
49111  #
49112
49113
49114# Check whether --with-libpng was given.
49115if test "${with_libpng+set}" = set; then :
49116  withval=$with_libpng;
49117fi
49118
49119
49120
49121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49122$as_echo_n "checking for which libpng to use... " >&6; }
49123
49124  # default is bundled
49125  DEFAULT_LIBPNG=bundled
49126
49127  #
49128  # if user didn't specify, use DEFAULT_LIBPNG
49129  #
49130  if test "x${with_libpng}" = "x"; then
49131      with_libpng=${DEFAULT_LIBPNG}
49132  fi
49133
49134  if test "x${with_libpng}" = "xbundled"; then
49135      USE_EXTERNAL_LIBPNG=false
49136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49137$as_echo "bundled" >&6; }
49138  elif test "x${with_libpng}" = "xsystem"; then
49139
49140pkg_failed=no
49141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49142$as_echo_n "checking for PNG... " >&6; }
49143
49144if test -n "$PNG_CFLAGS"; then
49145    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49146 elif test -n "$PKG_CONFIG"; then
49147    if test -n "$PKG_CONFIG" && \
49148    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49149  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49150  ac_status=$?
49151  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49152  test $ac_status = 0; }; then
49153  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49154else
49155  pkg_failed=yes
49156fi
49157 else
49158    pkg_failed=untried
49159fi
49160if test -n "$PNG_LIBS"; then
49161    pkg_cv_PNG_LIBS="$PNG_LIBS"
49162 elif test -n "$PKG_CONFIG"; then
49163    if test -n "$PKG_CONFIG" && \
49164    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49165  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49166  ac_status=$?
49167  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49168  test $ac_status = 0; }; then
49169  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49170else
49171  pkg_failed=yes
49172fi
49173 else
49174    pkg_failed=untried
49175fi
49176
49177
49178
49179if test $pkg_failed = yes; then
49180
49181if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49182        _pkg_short_errors_supported=yes
49183else
49184        _pkg_short_errors_supported=no
49185fi
49186        if test $_pkg_short_errors_supported = yes; then
49187	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49188        else
49189	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49190        fi
49191	# Put the nasty error message in config.log where it belongs
49192	echo "$PNG_PKG_ERRORS" >&5
49193
49194	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49195$as_echo "no" >&6; }
49196                 LIBPNG_FOUND=no
49197elif test $pkg_failed = untried; then
49198	 LIBPNG_FOUND=no
49199else
49200	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49201	PNG_LIBS=$pkg_cv_PNG_LIBS
49202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49203$as_echo "yes" >&6; }
49204	 LIBPNG_FOUND=yes
49205fi
49206      if test "x${LIBPNG_FOUND}" = "xyes"; then
49207          USE_EXTERNAL_LIBPNG=true
49208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49209$as_echo "system" >&6; }
49210      else
49211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49212$as_echo "system not found" >&6; }
49213          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49214      fi
49215  else
49216      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49217  fi
49218
49219
49220  ###############################################################################
49221  #
49222  # Check for the zlib library
49223  #
49224
49225
49226# Check whether --with-zlib was given.
49227if test "${with_zlib+set}" = set; then :
49228  withval=$with_zlib;
49229fi
49230
49231
49232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49233$as_echo_n "checking for compress in -lz... " >&6; }
49234if ${ac_cv_lib_z_compress+:} false; then :
49235  $as_echo_n "(cached) " >&6
49236else
49237  ac_check_lib_save_LIBS=$LIBS
49238LIBS="-lz  $LIBS"
49239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49240/* end confdefs.h.  */
49241
49242/* Override any GCC internal prototype to avoid an error.
49243   Use char because int might match the return type of a GCC
49244   builtin and then its argument prototype would still apply.  */
49245#ifdef __cplusplus
49246extern "C"
49247#endif
49248char compress ();
49249int
49250main ()
49251{
49252return compress ();
49253  ;
49254  return 0;
49255}
49256_ACEOF
49257if ac_fn_cxx_try_link "$LINENO"; then :
49258  ac_cv_lib_z_compress=yes
49259else
49260  ac_cv_lib_z_compress=no
49261fi
49262rm -f core conftest.err conftest.$ac_objext \
49263    conftest$ac_exeext conftest.$ac_ext
49264LIBS=$ac_check_lib_save_LIBS
49265fi
49266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49267$as_echo "$ac_cv_lib_z_compress" >&6; }
49268if test "x$ac_cv_lib_z_compress" = xyes; then :
49269   ZLIB_FOUND=yes
49270else
49271   ZLIB_FOUND=no
49272fi
49273
49274
49275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49276$as_echo_n "checking for which zlib to use... " >&6; }
49277
49278  DEFAULT_ZLIB=bundled
49279  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49280    #
49281    # On macosx default is system...on others default is
49282    #
49283    DEFAULT_ZLIB=system
49284  fi
49285
49286  if test "x${ZLIB_FOUND}" != "xyes"; then
49287    #
49288    # If we don't find any system...set default to bundled
49289    #
49290    DEFAULT_ZLIB=bundled
49291  fi
49292
49293  #
49294  # If user didn't specify, use DEFAULT_ZLIB
49295  #
49296  if test "x${with_zlib}" = "x"; then
49297    with_zlib=${DEFAULT_ZLIB}
49298  fi
49299
49300  if test "x${with_zlib}" = "xbundled"; then
49301    USE_EXTERNAL_LIBZ=false
49302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49303$as_echo "bundled" >&6; }
49304  elif test "x${with_zlib}" = "xsystem"; then
49305    if test "x${ZLIB_FOUND}" = "xyes"; then
49306      USE_EXTERNAL_LIBZ=true
49307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49308$as_echo "system" >&6; }
49309    else
49310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49311$as_echo "system not found" >&6; }
49312      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49313    fi
49314  else
49315    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49316  fi
49317
49318
49319
49320  ###############################################################################
49321  LIBZIP_CAN_USE_MMAP=true
49322
49323
49324
49325  ###############################################################################
49326  #
49327  # Check if altzone exists in time.h
49328  #
49329
49330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49331/* end confdefs.h.  */
49332#include <time.h>
49333int
49334main ()
49335{
49336return (int)altzone;
49337  ;
49338  return 0;
49339}
49340_ACEOF
49341if ac_fn_cxx_try_link "$LINENO"; then :
49342  has_altzone=yes
49343else
49344  has_altzone=no
49345fi
49346rm -f core conftest.err conftest.$ac_objext \
49347    conftest$ac_exeext conftest.$ac_ext
49348  if test "x$has_altzone" = xyes; then
49349
49350$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49351
49352  fi
49353
49354  ###############################################################################
49355  #
49356  # Check the maths library
49357  #
49358
49359  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49360$as_echo_n "checking for cos in -lm... " >&6; }
49361if ${ac_cv_lib_m_cos+:} false; then :
49362  $as_echo_n "(cached) " >&6
49363else
49364  ac_check_lib_save_LIBS=$LIBS
49365LIBS="-lm  $LIBS"
49366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49367/* end confdefs.h.  */
49368
49369/* Override any GCC internal prototype to avoid an error.
49370   Use char because int might match the return type of a GCC
49371   builtin and then its argument prototype would still apply.  */
49372#ifdef __cplusplus
49373extern "C"
49374#endif
49375char cos ();
49376int
49377main ()
49378{
49379return cos ();
49380  ;
49381  return 0;
49382}
49383_ACEOF
49384if ac_fn_cxx_try_link "$LINENO"; then :
49385  ac_cv_lib_m_cos=yes
49386else
49387  ac_cv_lib_m_cos=no
49388fi
49389rm -f core conftest.err conftest.$ac_objext \
49390    conftest$ac_exeext conftest.$ac_ext
49391LIBS=$ac_check_lib_save_LIBS
49392fi
49393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49394$as_echo "$ac_cv_lib_m_cos" >&6; }
49395if test "x$ac_cv_lib_m_cos" = xyes; then :
49396  cat >>confdefs.h <<_ACEOF
49397#define HAVE_LIBM 1
49398_ACEOF
49399
49400  LIBS="-lm $LIBS"
49401
49402else
49403
49404        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49405$as_echo "$as_me: Maths library was not found" >&6;}
49406
49407
49408fi
49409
49410
49411
49412  ###############################################################################
49413  #
49414  # Check for libdl.so
49415
49416  save_LIBS="$LIBS"
49417  LIBS=""
49418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49419$as_echo_n "checking for dlopen in -ldl... " >&6; }
49420if ${ac_cv_lib_dl_dlopen+:} false; then :
49421  $as_echo_n "(cached) " >&6
49422else
49423  ac_check_lib_save_LIBS=$LIBS
49424LIBS="-ldl  $LIBS"
49425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49426/* end confdefs.h.  */
49427
49428/* Override any GCC internal prototype to avoid an error.
49429   Use char because int might match the return type of a GCC
49430   builtin and then its argument prototype would still apply.  */
49431#ifdef __cplusplus
49432extern "C"
49433#endif
49434char dlopen ();
49435int
49436main ()
49437{
49438return dlopen ();
49439  ;
49440  return 0;
49441}
49442_ACEOF
49443if ac_fn_cxx_try_link "$LINENO"; then :
49444  ac_cv_lib_dl_dlopen=yes
49445else
49446  ac_cv_lib_dl_dlopen=no
49447fi
49448rm -f core conftest.err conftest.$ac_objext \
49449    conftest$ac_exeext conftest.$ac_ext
49450LIBS=$ac_check_lib_save_LIBS
49451fi
49452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49453$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49454if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49455  cat >>confdefs.h <<_ACEOF
49456#define HAVE_LIBDL 1
49457_ACEOF
49458
49459  LIBS="-ldl $LIBS"
49460
49461fi
49462
49463  LIBDL="$LIBS"
49464
49465  LIBS="$save_LIBS"
49466
49467
49468  ###############################################################################
49469  #
49470  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49471  # dynamic build is configured on command line.
49472  #
49473
49474# Check whether --with-stdc++lib was given.
49475if test "${with_stdc__lib+set}" = set; then :
49476  withval=$with_stdc__lib;
49477        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49478                && test "x$with_stdc__lib" != xdefault; then
49479          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49480        fi
49481
49482else
49483  with_stdc__lib=default
49484
49485fi
49486
49487
49488  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49489    # Test if -lstdc++ works.
49490    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49491$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49492    ac_ext=cpp
49493ac_cpp='$CXXCPP $CPPFLAGS'
49494ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49495ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49496ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49497
49498    OLD_CXXFLAGS="$CXXFLAGS"
49499    CXXFLAGS="$CXXFLAGS -lstdc++"
49500    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49501/* end confdefs.h.  */
49502
49503int
49504main ()
49505{
49506return 0;
49507  ;
49508  return 0;
49509}
49510_ACEOF
49511if ac_fn_cxx_try_link "$LINENO"; then :
49512  has_dynamic_libstdcxx=yes
49513else
49514  has_dynamic_libstdcxx=no
49515fi
49516rm -f core conftest.err conftest.$ac_objext \
49517    conftest$ac_exeext conftest.$ac_ext
49518    CXXFLAGS="$OLD_CXXFLAGS"
49519    ac_ext=cpp
49520ac_cpp='$CXXCPP $CPPFLAGS'
49521ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49522ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49523ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49524
49525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49526$as_echo "$has_dynamic_libstdcxx" >&6; }
49527
49528    # Test if stdc++ can be linked statically.
49529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49530$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49531    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49532    ac_ext=cpp
49533ac_cpp='$CXXCPP $CPPFLAGS'
49534ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49535ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49536ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49537
49538    OLD_LIBS="$LIBS"
49539    OLD_CXX="$CXX"
49540    LIBS="$STATIC_STDCXX_FLAGS"
49541    CXX="$CC"
49542    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49543/* end confdefs.h.  */
49544
49545int
49546main ()
49547{
49548return 0;
49549  ;
49550  return 0;
49551}
49552_ACEOF
49553if ac_fn_cxx_try_link "$LINENO"; then :
49554  has_static_libstdcxx=yes
49555else
49556  has_static_libstdcxx=no
49557fi
49558rm -f core conftest.err conftest.$ac_objext \
49559    conftest$ac_exeext conftest.$ac_ext
49560    LIBS="$OLD_LIBS"
49561    CXX="$OLD_CXX"
49562    ac_ext=cpp
49563ac_cpp='$CXXCPP $CPPFLAGS'
49564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49567
49568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49569$as_echo "$has_static_libstdcxx" >&6; }
49570
49571    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49572      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49573    fi
49574
49575    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49576      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49577    fi
49578
49579    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49580      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49581    fi
49582
49583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49584$as_echo_n "checking how to link with libstdc++... " >&6; }
49585    # If dynamic was requested, it's available since it would fail above otherwise.
49586    # If dynamic wasn't requested, go with static unless it isn't available.
49587    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49588      LIBCXX="$LIBCXX -lstdc++"
49589      LDCXX="$CXX"
49590      STATIC_CXX_SETTING="STATIC_CXX=false"
49591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49592$as_echo "dynamic" >&6; }
49593    else
49594      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49595      LDCXX="$CC"
49596      STATIC_CXX_SETTING="STATIC_CXX=true"
49597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49598$as_echo "static" >&6; }
49599    fi
49600  fi
49601
49602
49603  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49604    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49605
49606pkg_failed=no
49607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49608$as_echo_n "checking for LIBFFI... " >&6; }
49609
49610if test -n "$LIBFFI_CFLAGS"; then
49611    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49612 elif test -n "$PKG_CONFIG"; then
49613    if test -n "$PKG_CONFIG" && \
49614    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49615  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49616  ac_status=$?
49617  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49618  test $ac_status = 0; }; then
49619  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49620else
49621  pkg_failed=yes
49622fi
49623 else
49624    pkg_failed=untried
49625fi
49626if test -n "$LIBFFI_LIBS"; then
49627    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49628 elif test -n "$PKG_CONFIG"; then
49629    if test -n "$PKG_CONFIG" && \
49630    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49631  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49632  ac_status=$?
49633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49634  test $ac_status = 0; }; then
49635  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49636else
49637  pkg_failed=yes
49638fi
49639 else
49640    pkg_failed=untried
49641fi
49642
49643
49644
49645if test $pkg_failed = yes; then
49646
49647if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49648        _pkg_short_errors_supported=yes
49649else
49650        _pkg_short_errors_supported=no
49651fi
49652        if test $_pkg_short_errors_supported = yes; then
49653	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49654        else
49655	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49656        fi
49657	# Put the nasty error message in config.log where it belongs
49658	echo "$LIBFFI_PKG_ERRORS" >&5
49659
49660	as_fn_error $? "Package requirements (libffi) were not met:
49661
49662$LIBFFI_PKG_ERRORS
49663
49664Consider adjusting the PKG_CONFIG_PATH environment variable if you
49665installed software in a non-standard prefix.
49666
49667Alternatively, you may set the environment variables LIBFFI_CFLAGS
49668and LIBFFI_LIBS to avoid the need to call pkg-config.
49669See the pkg-config man page for more details.
49670" "$LINENO" 5
49671elif test $pkg_failed = untried; then
49672	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49674as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49675is in your PATH or set the PKG_CONFIG environment variable to the full
49676path to pkg-config.
49677
49678Alternatively, you may set the environment variables LIBFFI_CFLAGS
49679and LIBFFI_LIBS to avoid the need to call pkg-config.
49680See the pkg-config man page for more details.
49681
49682To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49683See \`config.log' for more details" "$LINENO" 5; }
49684else
49685	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49686	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49688$as_echo "yes" >&6; }
49689	:
49690fi
49691
49692  fi
49693
49694  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49695    # Extract the first word of "llvm-config", so it can be a program name with args.
49696set dummy llvm-config; ac_word=$2
49697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49698$as_echo_n "checking for $ac_word... " >&6; }
49699if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49700  $as_echo_n "(cached) " >&6
49701else
49702  if test -n "$LLVM_CONFIG"; then
49703  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49704else
49705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49706for as_dir in $PATH
49707do
49708  IFS=$as_save_IFS
49709  test -z "$as_dir" && as_dir=.
49710    for ac_exec_ext in '' $ac_executable_extensions; do
49711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49712    ac_cv_prog_LLVM_CONFIG="llvm-config"
49713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49714    break 2
49715  fi
49716done
49717  done
49718IFS=$as_save_IFS
49719
49720fi
49721fi
49722LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49723if test -n "$LLVM_CONFIG"; then
49724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49725$as_echo "$LLVM_CONFIG" >&6; }
49726else
49727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49728$as_echo "no" >&6; }
49729fi
49730
49731
49732
49733    if test "x$LLVM_CONFIG" != xllvm-config; then
49734      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49735    fi
49736
49737    llvm_components="jit mcjit engine nativecodegen native"
49738    unset LLVM_CFLAGS
49739    for flag in $("$LLVM_CONFIG" --cxxflags); do
49740      if echo "${flag}" | grep -q '^-[ID]'; then
49741        if test "${flag}" != "-D_DEBUG" ; then
49742          if test "${LLVM_CFLAGS}" != "" ; then
49743            LLVM_CFLAGS="${LLVM_CFLAGS} "
49744          fi
49745          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49746        fi
49747      fi
49748    done
49749    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49750    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49751
49752    unset LLVM_LDFLAGS
49753    for flag in $("${LLVM_CONFIG}" --ldflags); do
49754      if echo "${flag}" | grep -q '^-L'; then
49755        if test "${LLVM_LDFLAGS}" != ""; then
49756          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49757        fi
49758        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49759      fi
49760    done
49761
49762    unset LLVM_LIBS
49763    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49764      if echo "${flag}" | grep -q '^-l'; then
49765        if test "${LLVM_LIBS}" != ""; then
49766          LLVM_LIBS="${LLVM_LIBS} "
49767        fi
49768        LLVM_LIBS="${LLVM_LIBS}${flag}"
49769      fi
49770    done
49771
49772
49773
49774
49775  fi
49776
49777  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49778  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49779    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49780  fi
49781
49782  # TODO better (platform agnostic) test
49783  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49784    LIBCXX="-lstdc++"
49785  fi
49786
49787
49788
49789
49790  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49791
49792
49793# Check whether --with-msvcr-dll was given.
49794if test "${with_msvcr_dll+set}" = set; then :
49795  withval=$with_msvcr_dll;
49796fi
49797
49798
49799  if test "x$with_msvcr_dll" != x; then
49800    # If given explicitely by user, do not probe. If not present, fail directly.
49801
49802  DLL_NAME="$MSVCR_NAME"
49803  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49804  METHOD="--with-msvcr-dll"
49805  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49806    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49807$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49808
49809    # Need to check if the found msvcr is correct architecture
49810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49811$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49812    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49814      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49815      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49816      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49817        CORRECT_MSVCR_ARCH="PE32 executable"
49818      else
49819        CORRECT_MSVCR_ARCH="PE32+ executable"
49820      fi
49821    else
49822      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49823        CORRECT_MSVCR_ARCH=386
49824      else
49825        CORRECT_MSVCR_ARCH=x86-64
49826      fi
49827    fi
49828    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49830$as_echo "ok" >&6; }
49831      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49832
49833  # Only process if variable expands to non-empty
49834
49835  if test "x$MSVC_DLL" != x; then
49836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49837
49838  # Input might be given as Windows format, start by converting to
49839  # unix format.
49840  path="$MSVC_DLL"
49841  new_path=`$CYGPATH -u "$path"`
49842
49843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49846  # "foo.exe" is OK but "foo" is an error.
49847  #
49848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49849  # It is also a way to make sure we got the proper file name for the real test later on.
49850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49851  if test "x$test_shortpath" = x; then
49852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49853$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49854    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49855  fi
49856
49857  # Call helper function which possibly converts this using DOS-style short mode.
49858  # If so, the updated path is stored in $new_path.
49859
49860  input_path="$new_path"
49861  # Check if we need to convert this using DOS-style short mode. If the path
49862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49863  # take no chances and rewrite it.
49864  # Note: m4 eats our [], so we need to use [ and ] instead.
49865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49866  if test "x$has_forbidden_chars" != x; then
49867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49871      # Going to short mode and back again did indeed matter. Since short mode is
49872      # case insensitive, let's make it lowercase to improve readability.
49873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49874      # Now convert it back to Unix-style (cygpath)
49875      input_path=`$CYGPATH -u "$shortmode_path"`
49876      new_path="$input_path"
49877    fi
49878  fi
49879
49880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49881  if test "x$test_cygdrive_prefix" = x; then
49882    # As a simple fix, exclude /usr/bin since it's not a real path.
49883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49885      # a path prefixed by /cygdrive for fixpath to work.
49886      new_path="$CYGWIN_ROOT_PATH$input_path"
49887    fi
49888  fi
49889
49890
49891  if test "x$path" != "x$new_path"; then
49892    MSVC_DLL="$new_path"
49893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49894$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49895  fi
49896
49897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49898
49899  path="$MSVC_DLL"
49900  has_colon=`$ECHO $path | $GREP ^.:`
49901  new_path="$path"
49902  if test "x$has_colon" = x; then
49903    # Not in mixed or Windows style, start by that.
49904    new_path=`cmd //c echo $path`
49905  fi
49906
49907
49908  input_path="$new_path"
49909  # Check if we need to convert this using DOS-style short mode. If the path
49910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49911  # take no chances and rewrite it.
49912  # Note: m4 eats our [], so we need to use [ and ] instead.
49913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49914  if test "x$has_forbidden_chars" != x; then
49915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49917  fi
49918
49919
49920  windows_path="$new_path"
49921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49922    unix_path=`$CYGPATH -u "$windows_path"`
49923    new_path="$unix_path"
49924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49926    new_path="$unix_path"
49927  fi
49928
49929  if test "x$path" != "x$new_path"; then
49930    MSVC_DLL="$new_path"
49931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49932$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49933  fi
49934
49935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49937
49938    else
49939      # We're on a unix platform. Hooray! :)
49940      path="$MSVC_DLL"
49941      has_space=`$ECHO "$path" | $GREP " "`
49942      if test "x$has_space" != x; then
49943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49944$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49946      fi
49947
49948      # Use eval to expand a potential ~
49949      eval path="$path"
49950      if test ! -f "$path" && test ! -d "$path"; then
49951        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49952      fi
49953
49954      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49955    fi
49956  fi
49957
49958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49959$as_echo_n "checking for $DLL_NAME... " >&6; }
49960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49961$as_echo "$MSVC_DLL" >&6; }
49962    else
49963      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49964$as_echo "incorrect, ignoring" >&6; }
49965      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49966$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49967    fi
49968  fi
49969
49970    if test "x$MSVC_DLL" = x; then
49971      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49972    fi
49973    MSVCR_DLL="$MSVC_DLL"
49974  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49975
49976  DLL_NAME="$MSVCR_NAME"
49977  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49978  METHOD="devkit"
49979  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49980    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49981$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49982
49983    # Need to check if the found msvcr is correct architecture
49984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49985$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49986    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49988      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49989      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49990      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49991        CORRECT_MSVCR_ARCH="PE32 executable"
49992      else
49993        CORRECT_MSVCR_ARCH="PE32+ executable"
49994      fi
49995    else
49996      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49997        CORRECT_MSVCR_ARCH=386
49998      else
49999        CORRECT_MSVCR_ARCH=x86-64
50000      fi
50001    fi
50002    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50004$as_echo "ok" >&6; }
50005      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50006
50007  # Only process if variable expands to non-empty
50008
50009  if test "x$MSVC_DLL" != x; then
50010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50011
50012  # Input might be given as Windows format, start by converting to
50013  # unix format.
50014  path="$MSVC_DLL"
50015  new_path=`$CYGPATH -u "$path"`
50016
50017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50020  # "foo.exe" is OK but "foo" is an error.
50021  #
50022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50023  # It is also a way to make sure we got the proper file name for the real test later on.
50024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50025  if test "x$test_shortpath" = x; then
50026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50027$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50028    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50029  fi
50030
50031  # Call helper function which possibly converts this using DOS-style short mode.
50032  # If so, the updated path is stored in $new_path.
50033
50034  input_path="$new_path"
50035  # Check if we need to convert this using DOS-style short mode. If the path
50036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50037  # take no chances and rewrite it.
50038  # Note: m4 eats our [], so we need to use [ and ] instead.
50039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50040  if test "x$has_forbidden_chars" != x; then
50041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50045      # Going to short mode and back again did indeed matter. Since short mode is
50046      # case insensitive, let's make it lowercase to improve readability.
50047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50048      # Now convert it back to Unix-style (cygpath)
50049      input_path=`$CYGPATH -u "$shortmode_path"`
50050      new_path="$input_path"
50051    fi
50052  fi
50053
50054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50055  if test "x$test_cygdrive_prefix" = x; then
50056    # As a simple fix, exclude /usr/bin since it's not a real path.
50057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50059      # a path prefixed by /cygdrive for fixpath to work.
50060      new_path="$CYGWIN_ROOT_PATH$input_path"
50061    fi
50062  fi
50063
50064
50065  if test "x$path" != "x$new_path"; then
50066    MSVC_DLL="$new_path"
50067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50068$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50069  fi
50070
50071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50072
50073  path="$MSVC_DLL"
50074  has_colon=`$ECHO $path | $GREP ^.:`
50075  new_path="$path"
50076  if test "x$has_colon" = x; then
50077    # Not in mixed or Windows style, start by that.
50078    new_path=`cmd //c echo $path`
50079  fi
50080
50081
50082  input_path="$new_path"
50083  # Check if we need to convert this using DOS-style short mode. If the path
50084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50085  # take no chances and rewrite it.
50086  # Note: m4 eats our [], so we need to use [ and ] instead.
50087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50088  if test "x$has_forbidden_chars" != x; then
50089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50091  fi
50092
50093
50094  windows_path="$new_path"
50095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50096    unix_path=`$CYGPATH -u "$windows_path"`
50097    new_path="$unix_path"
50098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50100    new_path="$unix_path"
50101  fi
50102
50103  if test "x$path" != "x$new_path"; then
50104    MSVC_DLL="$new_path"
50105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50106$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50107  fi
50108
50109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50111
50112    else
50113      # We're on a unix platform. Hooray! :)
50114      path="$MSVC_DLL"
50115      has_space=`$ECHO "$path" | $GREP " "`
50116      if test "x$has_space" != x; then
50117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50118$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50120      fi
50121
50122      # Use eval to expand a potential ~
50123      eval path="$path"
50124      if test ! -f "$path" && test ! -d "$path"; then
50125        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50126      fi
50127
50128      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50129    fi
50130  fi
50131
50132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50133$as_echo_n "checking for $DLL_NAME... " >&6; }
50134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50135$as_echo "$MSVC_DLL" >&6; }
50136    else
50137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50138$as_echo "incorrect, ignoring" >&6; }
50139      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50140$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50141    fi
50142  fi
50143
50144    if test "x$MSVC_DLL" = x; then
50145      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50146    fi
50147    MSVCR_DLL="$MSVC_DLL"
50148  else
50149
50150  DLL_NAME="${MSVCR_NAME}"
50151  MSVC_DLL=
50152
50153  if test "x$MSVC_DLL" = x; then
50154    # Probe: Using well-known location from Visual Studio 10.0
50155    if test "x$VCINSTALLDIR" != x; then
50156      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50157
50158  windows_path="$CYGWIN_VC_INSTALL_DIR"
50159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50160    unix_path=`$CYGPATH -u "$windows_path"`
50161    CYGWIN_VC_INSTALL_DIR="$unix_path"
50162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50164    CYGWIN_VC_INSTALL_DIR="$unix_path"
50165  fi
50166
50167      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50168        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50169      else
50170        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50171      fi
50172      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50173
50174  DLL_NAME="$DLL_NAME"
50175  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50176  METHOD="well-known location in VCINSTALLDIR"
50177  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50178    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50179$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50180
50181    # Need to check if the found msvcr is correct architecture
50182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50183$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50184    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50186      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50187      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50188      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50189        CORRECT_MSVCR_ARCH="PE32 executable"
50190      else
50191        CORRECT_MSVCR_ARCH="PE32+ executable"
50192      fi
50193    else
50194      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50195        CORRECT_MSVCR_ARCH=386
50196      else
50197        CORRECT_MSVCR_ARCH=x86-64
50198      fi
50199    fi
50200    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50201      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50202$as_echo "ok" >&6; }
50203      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50204
50205  # Only process if variable expands to non-empty
50206
50207  if test "x$MSVC_DLL" != x; then
50208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50209
50210  # Input might be given as Windows format, start by converting to
50211  # unix format.
50212  path="$MSVC_DLL"
50213  new_path=`$CYGPATH -u "$path"`
50214
50215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50218  # "foo.exe" is OK but "foo" is an error.
50219  #
50220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50221  # It is also a way to make sure we got the proper file name for the real test later on.
50222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50223  if test "x$test_shortpath" = x; then
50224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50225$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50226    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50227  fi
50228
50229  # Call helper function which possibly converts this using DOS-style short mode.
50230  # If so, the updated path is stored in $new_path.
50231
50232  input_path="$new_path"
50233  # Check if we need to convert this using DOS-style short mode. If the path
50234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50235  # take no chances and rewrite it.
50236  # Note: m4 eats our [], so we need to use [ and ] instead.
50237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50238  if test "x$has_forbidden_chars" != x; then
50239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50243      # Going to short mode and back again did indeed matter. Since short mode is
50244      # case insensitive, let's make it lowercase to improve readability.
50245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50246      # Now convert it back to Unix-style (cygpath)
50247      input_path=`$CYGPATH -u "$shortmode_path"`
50248      new_path="$input_path"
50249    fi
50250  fi
50251
50252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50253  if test "x$test_cygdrive_prefix" = x; then
50254    # As a simple fix, exclude /usr/bin since it's not a real path.
50255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50257      # a path prefixed by /cygdrive for fixpath to work.
50258      new_path="$CYGWIN_ROOT_PATH$input_path"
50259    fi
50260  fi
50261
50262
50263  if test "x$path" != "x$new_path"; then
50264    MSVC_DLL="$new_path"
50265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50266$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50267  fi
50268
50269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50270
50271  path="$MSVC_DLL"
50272  has_colon=`$ECHO $path | $GREP ^.:`
50273  new_path="$path"
50274  if test "x$has_colon" = x; then
50275    # Not in mixed or Windows style, start by that.
50276    new_path=`cmd //c echo $path`
50277  fi
50278
50279
50280  input_path="$new_path"
50281  # Check if we need to convert this using DOS-style short mode. If the path
50282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50283  # take no chances and rewrite it.
50284  # Note: m4 eats our [], so we need to use [ and ] instead.
50285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50286  if test "x$has_forbidden_chars" != x; then
50287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50289  fi
50290
50291
50292  windows_path="$new_path"
50293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50294    unix_path=`$CYGPATH -u "$windows_path"`
50295    new_path="$unix_path"
50296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50298    new_path="$unix_path"
50299  fi
50300
50301  if test "x$path" != "x$new_path"; then
50302    MSVC_DLL="$new_path"
50303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50304$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50305  fi
50306
50307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50309
50310    else
50311      # We're on a unix platform. Hooray! :)
50312      path="$MSVC_DLL"
50313      has_space=`$ECHO "$path" | $GREP " "`
50314      if test "x$has_space" != x; then
50315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50316$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50317        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50318      fi
50319
50320      # Use eval to expand a potential ~
50321      eval path="$path"
50322      if test ! -f "$path" && test ! -d "$path"; then
50323        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50324      fi
50325
50326      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50327    fi
50328  fi
50329
50330      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50331$as_echo_n "checking for $DLL_NAME... " >&6; }
50332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50333$as_echo "$MSVC_DLL" >&6; }
50334    else
50335      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50336$as_echo "incorrect, ignoring" >&6; }
50337      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50338$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50339    fi
50340  fi
50341
50342    fi
50343  fi
50344
50345  if test "x$MSVC_DLL" = x; then
50346    # Probe: Check in the Boot JDK directory.
50347    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50348
50349  DLL_NAME="$DLL_NAME"
50350  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50351  METHOD="well-known location in Boot JDK"
50352  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50353    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50354$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50355
50356    # Need to check if the found msvcr is correct architecture
50357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50358$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50359    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50361      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50362      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50363      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50364        CORRECT_MSVCR_ARCH="PE32 executable"
50365      else
50366        CORRECT_MSVCR_ARCH="PE32+ executable"
50367      fi
50368    else
50369      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50370        CORRECT_MSVCR_ARCH=386
50371      else
50372        CORRECT_MSVCR_ARCH=x86-64
50373      fi
50374    fi
50375    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50377$as_echo "ok" >&6; }
50378      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50379
50380  # Only process if variable expands to non-empty
50381
50382  if test "x$MSVC_DLL" != x; then
50383    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50384
50385  # Input might be given as Windows format, start by converting to
50386  # unix format.
50387  path="$MSVC_DLL"
50388  new_path=`$CYGPATH -u "$path"`
50389
50390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50393  # "foo.exe" is OK but "foo" is an error.
50394  #
50395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50396  # It is also a way to make sure we got the proper file name for the real test later on.
50397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50398  if test "x$test_shortpath" = x; then
50399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50400$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50401    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50402  fi
50403
50404  # Call helper function which possibly converts this using DOS-style short mode.
50405  # If so, the updated path is stored in $new_path.
50406
50407  input_path="$new_path"
50408  # Check if we need to convert this using DOS-style short mode. If the path
50409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50410  # take no chances and rewrite it.
50411  # Note: m4 eats our [], so we need to use [ and ] instead.
50412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50413  if test "x$has_forbidden_chars" != x; then
50414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50418      # Going to short mode and back again did indeed matter. Since short mode is
50419      # case insensitive, let's make it lowercase to improve readability.
50420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50421      # Now convert it back to Unix-style (cygpath)
50422      input_path=`$CYGPATH -u "$shortmode_path"`
50423      new_path="$input_path"
50424    fi
50425  fi
50426
50427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50428  if test "x$test_cygdrive_prefix" = x; then
50429    # As a simple fix, exclude /usr/bin since it's not a real path.
50430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50432      # a path prefixed by /cygdrive for fixpath to work.
50433      new_path="$CYGWIN_ROOT_PATH$input_path"
50434    fi
50435  fi
50436
50437
50438  if test "x$path" != "x$new_path"; then
50439    MSVC_DLL="$new_path"
50440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50441$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50442  fi
50443
50444    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50445
50446  path="$MSVC_DLL"
50447  has_colon=`$ECHO $path | $GREP ^.:`
50448  new_path="$path"
50449  if test "x$has_colon" = x; then
50450    # Not in mixed or Windows style, start by that.
50451    new_path=`cmd //c echo $path`
50452  fi
50453
50454
50455  input_path="$new_path"
50456  # Check if we need to convert this using DOS-style short mode. If the path
50457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50458  # take no chances and rewrite it.
50459  # Note: m4 eats our [], so we need to use [ and ] instead.
50460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50461  if test "x$has_forbidden_chars" != x; then
50462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50464  fi
50465
50466
50467  windows_path="$new_path"
50468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50469    unix_path=`$CYGPATH -u "$windows_path"`
50470    new_path="$unix_path"
50471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50473    new_path="$unix_path"
50474  fi
50475
50476  if test "x$path" != "x$new_path"; then
50477    MSVC_DLL="$new_path"
50478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50479$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50480  fi
50481
50482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50484
50485    else
50486      # We're on a unix platform. Hooray! :)
50487      path="$MSVC_DLL"
50488      has_space=`$ECHO "$path" | $GREP " "`
50489      if test "x$has_space" != x; then
50490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50491$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50492        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50493      fi
50494
50495      # Use eval to expand a potential ~
50496      eval path="$path"
50497      if test ! -f "$path" && test ! -d "$path"; then
50498        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50499      fi
50500
50501      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50502    fi
50503  fi
50504
50505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50506$as_echo_n "checking for $DLL_NAME... " >&6; }
50507      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50508$as_echo "$MSVC_DLL" >&6; }
50509    else
50510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50511$as_echo "incorrect, ignoring" >&6; }
50512      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50513$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50514    fi
50515  fi
50516
50517  fi
50518
50519  if test "x$MSVC_DLL" = x; then
50520    # Probe: Look in the Windows system32 directory
50521    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50522
50523  windows_path="$CYGWIN_SYSTEMROOT"
50524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50525    unix_path=`$CYGPATH -u "$windows_path"`
50526    CYGWIN_SYSTEMROOT="$unix_path"
50527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50529    CYGWIN_SYSTEMROOT="$unix_path"
50530  fi
50531
50532    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50533
50534  DLL_NAME="$DLL_NAME"
50535  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50536  METHOD="well-known location in SYSTEMROOT"
50537  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50538    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50539$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50540
50541    # Need to check if the found msvcr is correct architecture
50542    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50543$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50544    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50545    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50546      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50547      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50548      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50549        CORRECT_MSVCR_ARCH="PE32 executable"
50550      else
50551        CORRECT_MSVCR_ARCH="PE32+ executable"
50552      fi
50553    else
50554      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50555        CORRECT_MSVCR_ARCH=386
50556      else
50557        CORRECT_MSVCR_ARCH=x86-64
50558      fi
50559    fi
50560    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50562$as_echo "ok" >&6; }
50563      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50564
50565  # Only process if variable expands to non-empty
50566
50567  if test "x$MSVC_DLL" != x; then
50568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50569
50570  # Input might be given as Windows format, start by converting to
50571  # unix format.
50572  path="$MSVC_DLL"
50573  new_path=`$CYGPATH -u "$path"`
50574
50575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50578  # "foo.exe" is OK but "foo" is an error.
50579  #
50580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50581  # It is also a way to make sure we got the proper file name for the real test later on.
50582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50583  if test "x$test_shortpath" = x; then
50584    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50585$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50586    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50587  fi
50588
50589  # Call helper function which possibly converts this using DOS-style short mode.
50590  # If so, the updated path is stored in $new_path.
50591
50592  input_path="$new_path"
50593  # Check if we need to convert this using DOS-style short mode. If the path
50594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50595  # take no chances and rewrite it.
50596  # Note: m4 eats our [], so we need to use [ and ] instead.
50597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50598  if test "x$has_forbidden_chars" != x; then
50599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50603      # Going to short mode and back again did indeed matter. Since short mode is
50604      # case insensitive, let's make it lowercase to improve readability.
50605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50606      # Now convert it back to Unix-style (cygpath)
50607      input_path=`$CYGPATH -u "$shortmode_path"`
50608      new_path="$input_path"
50609    fi
50610  fi
50611
50612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50613  if test "x$test_cygdrive_prefix" = x; then
50614    # As a simple fix, exclude /usr/bin since it's not a real path.
50615    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50617      # a path prefixed by /cygdrive for fixpath to work.
50618      new_path="$CYGWIN_ROOT_PATH$input_path"
50619    fi
50620  fi
50621
50622
50623  if test "x$path" != "x$new_path"; then
50624    MSVC_DLL="$new_path"
50625    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50626$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50627  fi
50628
50629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50630
50631  path="$MSVC_DLL"
50632  has_colon=`$ECHO $path | $GREP ^.:`
50633  new_path="$path"
50634  if test "x$has_colon" = x; then
50635    # Not in mixed or Windows style, start by that.
50636    new_path=`cmd //c echo $path`
50637  fi
50638
50639
50640  input_path="$new_path"
50641  # Check if we need to convert this using DOS-style short mode. If the path
50642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50643  # take no chances and rewrite it.
50644  # Note: m4 eats our [], so we need to use [ and ] instead.
50645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50646  if test "x$has_forbidden_chars" != x; then
50647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50648    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50649  fi
50650
50651
50652  windows_path="$new_path"
50653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50654    unix_path=`$CYGPATH -u "$windows_path"`
50655    new_path="$unix_path"
50656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50658    new_path="$unix_path"
50659  fi
50660
50661  if test "x$path" != "x$new_path"; then
50662    MSVC_DLL="$new_path"
50663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50664$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50665  fi
50666
50667  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50668  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50669
50670    else
50671      # We're on a unix platform. Hooray! :)
50672      path="$MSVC_DLL"
50673      has_space=`$ECHO "$path" | $GREP " "`
50674      if test "x$has_space" != x; then
50675        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50676$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50677        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50678      fi
50679
50680      # Use eval to expand a potential ~
50681      eval path="$path"
50682      if test ! -f "$path" && test ! -d "$path"; then
50683        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50684      fi
50685
50686      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50687    fi
50688  fi
50689
50690      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50691$as_echo_n "checking for $DLL_NAME... " >&6; }
50692      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50693$as_echo "$MSVC_DLL" >&6; }
50694    else
50695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50696$as_echo "incorrect, ignoring" >&6; }
50697      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50698$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50699    fi
50700  fi
50701
50702  fi
50703
50704  if test "x$MSVC_DLL" = x; then
50705    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50706    if test "x$VS100COMNTOOLS" != x; then
50707      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50708
50709  windows_path="$CYGWIN_VS_TOOLS_DIR"
50710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50711    unix_path=`$CYGPATH -u "$windows_path"`
50712    CYGWIN_VS_TOOLS_DIR="$unix_path"
50713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50715    CYGWIN_VS_TOOLS_DIR="$unix_path"
50716  fi
50717
50718      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50719        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50720	    | $GREP -i /x64/ | $HEAD --lines 1`
50721      else
50722        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50723	    | $GREP -i /x86/ | $HEAD --lines 1`
50724      fi
50725
50726  DLL_NAME="$DLL_NAME"
50727  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50728  METHOD="search of VS100COMNTOOLS"
50729  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50730    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50731$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50732
50733    # Need to check if the found msvcr is correct architecture
50734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50735$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50736    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50738      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50739      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50740      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50741        CORRECT_MSVCR_ARCH="PE32 executable"
50742      else
50743        CORRECT_MSVCR_ARCH="PE32+ executable"
50744      fi
50745    else
50746      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50747        CORRECT_MSVCR_ARCH=386
50748      else
50749        CORRECT_MSVCR_ARCH=x86-64
50750      fi
50751    fi
50752    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50754$as_echo "ok" >&6; }
50755      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50756
50757  # Only process if variable expands to non-empty
50758
50759  if test "x$MSVC_DLL" != x; then
50760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50761
50762  # Input might be given as Windows format, start by converting to
50763  # unix format.
50764  path="$MSVC_DLL"
50765  new_path=`$CYGPATH -u "$path"`
50766
50767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50770  # "foo.exe" is OK but "foo" is an error.
50771  #
50772  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50773  # It is also a way to make sure we got the proper file name for the real test later on.
50774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50775  if test "x$test_shortpath" = x; then
50776    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50777$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50778    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50779  fi
50780
50781  # Call helper function which possibly converts this using DOS-style short mode.
50782  # If so, the updated path is stored in $new_path.
50783
50784  input_path="$new_path"
50785  # Check if we need to convert this using DOS-style short mode. If the path
50786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50787  # take no chances and rewrite it.
50788  # Note: m4 eats our [], so we need to use [ and ] instead.
50789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50790  if test "x$has_forbidden_chars" != x; then
50791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50792    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50793    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50794    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50795      # Going to short mode and back again did indeed matter. Since short mode is
50796      # case insensitive, let's make it lowercase to improve readability.
50797      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50798      # Now convert it back to Unix-style (cygpath)
50799      input_path=`$CYGPATH -u "$shortmode_path"`
50800      new_path="$input_path"
50801    fi
50802  fi
50803
50804  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50805  if test "x$test_cygdrive_prefix" = x; then
50806    # As a simple fix, exclude /usr/bin since it's not a real path.
50807    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50808      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50809      # a path prefixed by /cygdrive for fixpath to work.
50810      new_path="$CYGWIN_ROOT_PATH$input_path"
50811    fi
50812  fi
50813
50814
50815  if test "x$path" != "x$new_path"; then
50816    MSVC_DLL="$new_path"
50817    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50818$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50819  fi
50820
50821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50822
50823  path="$MSVC_DLL"
50824  has_colon=`$ECHO $path | $GREP ^.:`
50825  new_path="$path"
50826  if test "x$has_colon" = x; then
50827    # Not in mixed or Windows style, start by that.
50828    new_path=`cmd //c echo $path`
50829  fi
50830
50831
50832  input_path="$new_path"
50833  # Check if we need to convert this using DOS-style short mode. If the path
50834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50835  # take no chances and rewrite it.
50836  # Note: m4 eats our [], so we need to use [ and ] instead.
50837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50838  if test "x$has_forbidden_chars" != x; then
50839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50841  fi
50842
50843
50844  windows_path="$new_path"
50845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50846    unix_path=`$CYGPATH -u "$windows_path"`
50847    new_path="$unix_path"
50848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50850    new_path="$unix_path"
50851  fi
50852
50853  if test "x$path" != "x$new_path"; then
50854    MSVC_DLL="$new_path"
50855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50856$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50857  fi
50858
50859  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50860  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50861
50862    else
50863      # We're on a unix platform. Hooray! :)
50864      path="$MSVC_DLL"
50865      has_space=`$ECHO "$path" | $GREP " "`
50866      if test "x$has_space" != x; then
50867        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50868$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50869        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50870      fi
50871
50872      # Use eval to expand a potential ~
50873      eval path="$path"
50874      if test ! -f "$path" && test ! -d "$path"; then
50875        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50876      fi
50877
50878      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50879    fi
50880  fi
50881
50882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50883$as_echo_n "checking for $DLL_NAME... " >&6; }
50884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50885$as_echo "$MSVC_DLL" >&6; }
50886    else
50887      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50888$as_echo "incorrect, ignoring" >&6; }
50889      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50890$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50891    fi
50892  fi
50893
50894    fi
50895  fi
50896
50897  if test "x$MSVC_DLL" = x; then
50898    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50899    # (This was the original behaviour; kept since it might turn something up)
50900    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50901      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50902        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50903	    | $GREP x64 | $HEAD --lines 1`
50904      else
50905        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50906	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50907        if test "x$POSSIBLE_MSVC_DLL" = x; then
50908          # We're grasping at straws now...
50909          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50910	      | $HEAD --lines 1`
50911        fi
50912      fi
50913
50914
50915  DLL_NAME="$DLL_NAME"
50916  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50917  METHOD="search of VCINSTALLDIR"
50918  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50919    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50920$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50921
50922    # Need to check if the found msvcr is correct architecture
50923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50924$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50925    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50927      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50928      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50929      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50930        CORRECT_MSVCR_ARCH="PE32 executable"
50931      else
50932        CORRECT_MSVCR_ARCH="PE32+ executable"
50933      fi
50934    else
50935      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50936        CORRECT_MSVCR_ARCH=386
50937      else
50938        CORRECT_MSVCR_ARCH=x86-64
50939      fi
50940    fi
50941    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50943$as_echo "ok" >&6; }
50944      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50945
50946  # Only process if variable expands to non-empty
50947
50948  if test "x$MSVC_DLL" != x; then
50949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50950
50951  # Input might be given as Windows format, start by converting to
50952  # unix format.
50953  path="$MSVC_DLL"
50954  new_path=`$CYGPATH -u "$path"`
50955
50956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50959  # "foo.exe" is OK but "foo" is an error.
50960  #
50961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50962  # It is also a way to make sure we got the proper file name for the real test later on.
50963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50964  if test "x$test_shortpath" = x; then
50965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50966$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50967    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50968  fi
50969
50970  # Call helper function which possibly converts this using DOS-style short mode.
50971  # If so, the updated path is stored in $new_path.
50972
50973  input_path="$new_path"
50974  # Check if we need to convert this using DOS-style short mode. If the path
50975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50976  # take no chances and rewrite it.
50977  # Note: m4 eats our [], so we need to use [ and ] instead.
50978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50979  if test "x$has_forbidden_chars" != x; then
50980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50984      # Going to short mode and back again did indeed matter. Since short mode is
50985      # case insensitive, let's make it lowercase to improve readability.
50986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50987      # Now convert it back to Unix-style (cygpath)
50988      input_path=`$CYGPATH -u "$shortmode_path"`
50989      new_path="$input_path"
50990    fi
50991  fi
50992
50993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50994  if test "x$test_cygdrive_prefix" = x; then
50995    # As a simple fix, exclude /usr/bin since it's not a real path.
50996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50998      # a path prefixed by /cygdrive for fixpath to work.
50999      new_path="$CYGWIN_ROOT_PATH$input_path"
51000    fi
51001  fi
51002
51003
51004  if test "x$path" != "x$new_path"; then
51005    MSVC_DLL="$new_path"
51006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51007$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51008  fi
51009
51010    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51011
51012  path="$MSVC_DLL"
51013  has_colon=`$ECHO $path | $GREP ^.:`
51014  new_path="$path"
51015  if test "x$has_colon" = x; then
51016    # Not in mixed or Windows style, start by that.
51017    new_path=`cmd //c echo $path`
51018  fi
51019
51020
51021  input_path="$new_path"
51022  # Check if we need to convert this using DOS-style short mode. If the path
51023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51024  # take no chances and rewrite it.
51025  # Note: m4 eats our [], so we need to use [ and ] instead.
51026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51027  if test "x$has_forbidden_chars" != x; then
51028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51030  fi
51031
51032
51033  windows_path="$new_path"
51034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51035    unix_path=`$CYGPATH -u "$windows_path"`
51036    new_path="$unix_path"
51037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51039    new_path="$unix_path"
51040  fi
51041
51042  if test "x$path" != "x$new_path"; then
51043    MSVC_DLL="$new_path"
51044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51045$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51046  fi
51047
51048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51050
51051    else
51052      # We're on a unix platform. Hooray! :)
51053      path="$MSVC_DLL"
51054      has_space=`$ECHO "$path" | $GREP " "`
51055      if test "x$has_space" != x; then
51056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51057$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51058        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51059      fi
51060
51061      # Use eval to expand a potential ~
51062      eval path="$path"
51063      if test ! -f "$path" && test ! -d "$path"; then
51064        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51065      fi
51066
51067      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51068    fi
51069  fi
51070
51071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51072$as_echo_n "checking for $DLL_NAME... " >&6; }
51073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51074$as_echo "$MSVC_DLL" >&6; }
51075    else
51076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51077$as_echo "incorrect, ignoring" >&6; }
51078      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51079$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51080    fi
51081  fi
51082
51083    fi
51084  fi
51085
51086  if test "x$MSVC_DLL" = x; then
51087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51088$as_echo_n "checking for $DLL_NAME... " >&6; }
51089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51090$as_echo "no" >&6; }
51091    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51092  fi
51093
51094    MSVCR_DLL="$MSVC_DLL"
51095  fi
51096
51097
51098
51099# Check whether --with-msvcp-dll was given.
51100if test "${with_msvcp_dll+set}" = set; then :
51101  withval=$with_msvcp_dll;
51102fi
51103
51104
51105  if test "x$MSVCP_NAME" != "x"; then
51106    if test "x$with_msvcp_dll" != x; then
51107      # If given explicitely by user, do not probe. If not present, fail directly.
51108
51109  DLL_NAME="$MSVCP_NAME"
51110  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51111  METHOD="--with-msvcp-dll"
51112  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51113    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51114$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51115
51116    # Need to check if the found msvcr is correct architecture
51117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51118$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51119    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51121      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51122      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51123      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51124        CORRECT_MSVCR_ARCH="PE32 executable"
51125      else
51126        CORRECT_MSVCR_ARCH="PE32+ executable"
51127      fi
51128    else
51129      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51130        CORRECT_MSVCR_ARCH=386
51131      else
51132        CORRECT_MSVCR_ARCH=x86-64
51133      fi
51134    fi
51135    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51137$as_echo "ok" >&6; }
51138      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51139
51140  # Only process if variable expands to non-empty
51141
51142  if test "x$MSVC_DLL" != x; then
51143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51144
51145  # Input might be given as Windows format, start by converting to
51146  # unix format.
51147  path="$MSVC_DLL"
51148  new_path=`$CYGPATH -u "$path"`
51149
51150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51153  # "foo.exe" is OK but "foo" is an error.
51154  #
51155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51156  # It is also a way to make sure we got the proper file name for the real test later on.
51157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51158  if test "x$test_shortpath" = x; then
51159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51160$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51161    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51162  fi
51163
51164  # Call helper function which possibly converts this using DOS-style short mode.
51165  # If so, the updated path is stored in $new_path.
51166
51167  input_path="$new_path"
51168  # Check if we need to convert this using DOS-style short mode. If the path
51169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51170  # take no chances and rewrite it.
51171  # Note: m4 eats our [], so we need to use [ and ] instead.
51172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51173  if test "x$has_forbidden_chars" != x; then
51174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51178      # Going to short mode and back again did indeed matter. Since short mode is
51179      # case insensitive, let's make it lowercase to improve readability.
51180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51181      # Now convert it back to Unix-style (cygpath)
51182      input_path=`$CYGPATH -u "$shortmode_path"`
51183      new_path="$input_path"
51184    fi
51185  fi
51186
51187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51188  if test "x$test_cygdrive_prefix" = x; then
51189    # As a simple fix, exclude /usr/bin since it's not a real path.
51190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51192      # a path prefixed by /cygdrive for fixpath to work.
51193      new_path="$CYGWIN_ROOT_PATH$input_path"
51194    fi
51195  fi
51196
51197
51198  if test "x$path" != "x$new_path"; then
51199    MSVC_DLL="$new_path"
51200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51201$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51202  fi
51203
51204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51205
51206  path="$MSVC_DLL"
51207  has_colon=`$ECHO $path | $GREP ^.:`
51208  new_path="$path"
51209  if test "x$has_colon" = x; then
51210    # Not in mixed or Windows style, start by that.
51211    new_path=`cmd //c echo $path`
51212  fi
51213
51214
51215  input_path="$new_path"
51216  # Check if we need to convert this using DOS-style short mode. If the path
51217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51218  # take no chances and rewrite it.
51219  # Note: m4 eats our [], so we need to use [ and ] instead.
51220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51221  if test "x$has_forbidden_chars" != x; then
51222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51224  fi
51225
51226
51227  windows_path="$new_path"
51228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51229    unix_path=`$CYGPATH -u "$windows_path"`
51230    new_path="$unix_path"
51231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51233    new_path="$unix_path"
51234  fi
51235
51236  if test "x$path" != "x$new_path"; then
51237    MSVC_DLL="$new_path"
51238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51239$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51240  fi
51241
51242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51244
51245    else
51246      # We're on a unix platform. Hooray! :)
51247      path="$MSVC_DLL"
51248      has_space=`$ECHO "$path" | $GREP " "`
51249      if test "x$has_space" != x; then
51250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51251$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51253      fi
51254
51255      # Use eval to expand a potential ~
51256      eval path="$path"
51257      if test ! -f "$path" && test ! -d "$path"; then
51258        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51259      fi
51260
51261      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51262    fi
51263  fi
51264
51265      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51266$as_echo_n "checking for $DLL_NAME... " >&6; }
51267      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51268$as_echo "$MSVC_DLL" >&6; }
51269    else
51270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51271$as_echo "incorrect, ignoring" >&6; }
51272      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51273$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51274    fi
51275  fi
51276
51277      if test "x$MSVC_DLL" = x; then
51278        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51279      fi
51280      MSVCP_DLL="$MSVC_DLL"
51281    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51282
51283  DLL_NAME="$MSVCP_NAME"
51284  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51285  METHOD="devkit"
51286  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51287    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51288$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51289
51290    # Need to check if the found msvcr is correct architecture
51291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51292$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51293    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51295      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51296      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51297      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51298        CORRECT_MSVCR_ARCH="PE32 executable"
51299      else
51300        CORRECT_MSVCR_ARCH="PE32+ executable"
51301      fi
51302    else
51303      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51304        CORRECT_MSVCR_ARCH=386
51305      else
51306        CORRECT_MSVCR_ARCH=x86-64
51307      fi
51308    fi
51309    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51311$as_echo "ok" >&6; }
51312      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51313
51314  # Only process if variable expands to non-empty
51315
51316  if test "x$MSVC_DLL" != x; then
51317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51318
51319  # Input might be given as Windows format, start by converting to
51320  # unix format.
51321  path="$MSVC_DLL"
51322  new_path=`$CYGPATH -u "$path"`
51323
51324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51327  # "foo.exe" is OK but "foo" is an error.
51328  #
51329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51330  # It is also a way to make sure we got the proper file name for the real test later on.
51331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51332  if test "x$test_shortpath" = x; then
51333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51334$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51335    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51336  fi
51337
51338  # Call helper function which possibly converts this using DOS-style short mode.
51339  # If so, the updated path is stored in $new_path.
51340
51341  input_path="$new_path"
51342  # Check if we need to convert this using DOS-style short mode. If the path
51343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51344  # take no chances and rewrite it.
51345  # Note: m4 eats our [], so we need to use [ and ] instead.
51346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51347  if test "x$has_forbidden_chars" != x; then
51348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51352      # Going to short mode and back again did indeed matter. Since short mode is
51353      # case insensitive, let's make it lowercase to improve readability.
51354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51355      # Now convert it back to Unix-style (cygpath)
51356      input_path=`$CYGPATH -u "$shortmode_path"`
51357      new_path="$input_path"
51358    fi
51359  fi
51360
51361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51362  if test "x$test_cygdrive_prefix" = x; then
51363    # As a simple fix, exclude /usr/bin since it's not a real path.
51364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51366      # a path prefixed by /cygdrive for fixpath to work.
51367      new_path="$CYGWIN_ROOT_PATH$input_path"
51368    fi
51369  fi
51370
51371
51372  if test "x$path" != "x$new_path"; then
51373    MSVC_DLL="$new_path"
51374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51375$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51376  fi
51377
51378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51379
51380  path="$MSVC_DLL"
51381  has_colon=`$ECHO $path | $GREP ^.:`
51382  new_path="$path"
51383  if test "x$has_colon" = x; then
51384    # Not in mixed or Windows style, start by that.
51385    new_path=`cmd //c echo $path`
51386  fi
51387
51388
51389  input_path="$new_path"
51390  # Check if we need to convert this using DOS-style short mode. If the path
51391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51392  # take no chances and rewrite it.
51393  # Note: m4 eats our [], so we need to use [ and ] instead.
51394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51395  if test "x$has_forbidden_chars" != x; then
51396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51398  fi
51399
51400
51401  windows_path="$new_path"
51402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51403    unix_path=`$CYGPATH -u "$windows_path"`
51404    new_path="$unix_path"
51405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51407    new_path="$unix_path"
51408  fi
51409
51410  if test "x$path" != "x$new_path"; then
51411    MSVC_DLL="$new_path"
51412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51413$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51414  fi
51415
51416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51418
51419    else
51420      # We're on a unix platform. Hooray! :)
51421      path="$MSVC_DLL"
51422      has_space=`$ECHO "$path" | $GREP " "`
51423      if test "x$has_space" != x; then
51424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51425$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51427      fi
51428
51429      # Use eval to expand a potential ~
51430      eval path="$path"
51431      if test ! -f "$path" && test ! -d "$path"; then
51432        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51433      fi
51434
51435      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51436    fi
51437  fi
51438
51439      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51440$as_echo_n "checking for $DLL_NAME... " >&6; }
51441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51442$as_echo "$MSVC_DLL" >&6; }
51443    else
51444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51445$as_echo "incorrect, ignoring" >&6; }
51446      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51447$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51448    fi
51449  fi
51450
51451      if test "x$MSVC_DLL" = x; then
51452        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51453      fi
51454      MSVCP_DLL="$MSVC_DLL"
51455    else
51456
51457  DLL_NAME="${MSVCP_NAME}"
51458  MSVC_DLL=
51459
51460  if test "x$MSVC_DLL" = x; then
51461    # Probe: Using well-known location from Visual Studio 10.0
51462    if test "x$VCINSTALLDIR" != x; then
51463      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51464
51465  windows_path="$CYGWIN_VC_INSTALL_DIR"
51466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51467    unix_path=`$CYGPATH -u "$windows_path"`
51468    CYGWIN_VC_INSTALL_DIR="$unix_path"
51469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51471    CYGWIN_VC_INSTALL_DIR="$unix_path"
51472  fi
51473
51474      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51475        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51476      else
51477        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51478      fi
51479      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51480
51481  DLL_NAME="$DLL_NAME"
51482  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51483  METHOD="well-known location in VCINSTALLDIR"
51484  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51485    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51486$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51487
51488    # Need to check if the found msvcr is correct architecture
51489    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51490$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51491    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51492    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51493      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51494      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51495      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51496        CORRECT_MSVCR_ARCH="PE32 executable"
51497      else
51498        CORRECT_MSVCR_ARCH="PE32+ executable"
51499      fi
51500    else
51501      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51502        CORRECT_MSVCR_ARCH=386
51503      else
51504        CORRECT_MSVCR_ARCH=x86-64
51505      fi
51506    fi
51507    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51509$as_echo "ok" >&6; }
51510      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51511
51512  # Only process if variable expands to non-empty
51513
51514  if test "x$MSVC_DLL" != x; then
51515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51516
51517  # Input might be given as Windows format, start by converting to
51518  # unix format.
51519  path="$MSVC_DLL"
51520  new_path=`$CYGPATH -u "$path"`
51521
51522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51525  # "foo.exe" is OK but "foo" is an error.
51526  #
51527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51528  # It is also a way to make sure we got the proper file name for the real test later on.
51529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51530  if test "x$test_shortpath" = x; then
51531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51532$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51533    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51534  fi
51535
51536  # Call helper function which possibly converts this using DOS-style short mode.
51537  # If so, the updated path is stored in $new_path.
51538
51539  input_path="$new_path"
51540  # Check if we need to convert this using DOS-style short mode. If the path
51541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51542  # take no chances and rewrite it.
51543  # Note: m4 eats our [], so we need to use [ and ] instead.
51544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51545  if test "x$has_forbidden_chars" != x; then
51546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51550      # Going to short mode and back again did indeed matter. Since short mode is
51551      # case insensitive, let's make it lowercase to improve readability.
51552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51553      # Now convert it back to Unix-style (cygpath)
51554      input_path=`$CYGPATH -u "$shortmode_path"`
51555      new_path="$input_path"
51556    fi
51557  fi
51558
51559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51560  if test "x$test_cygdrive_prefix" = x; then
51561    # As a simple fix, exclude /usr/bin since it's not a real path.
51562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51564      # a path prefixed by /cygdrive for fixpath to work.
51565      new_path="$CYGWIN_ROOT_PATH$input_path"
51566    fi
51567  fi
51568
51569
51570  if test "x$path" != "x$new_path"; then
51571    MSVC_DLL="$new_path"
51572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51573$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51574  fi
51575
51576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51577
51578  path="$MSVC_DLL"
51579  has_colon=`$ECHO $path | $GREP ^.:`
51580  new_path="$path"
51581  if test "x$has_colon" = x; then
51582    # Not in mixed or Windows style, start by that.
51583    new_path=`cmd //c echo $path`
51584  fi
51585
51586
51587  input_path="$new_path"
51588  # Check if we need to convert this using DOS-style short mode. If the path
51589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51590  # take no chances and rewrite it.
51591  # Note: m4 eats our [], so we need to use [ and ] instead.
51592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51593  if test "x$has_forbidden_chars" != x; then
51594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51596  fi
51597
51598
51599  windows_path="$new_path"
51600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51601    unix_path=`$CYGPATH -u "$windows_path"`
51602    new_path="$unix_path"
51603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51605    new_path="$unix_path"
51606  fi
51607
51608  if test "x$path" != "x$new_path"; then
51609    MSVC_DLL="$new_path"
51610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51611$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51612  fi
51613
51614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51616
51617    else
51618      # We're on a unix platform. Hooray! :)
51619      path="$MSVC_DLL"
51620      has_space=`$ECHO "$path" | $GREP " "`
51621      if test "x$has_space" != x; then
51622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51623$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51625      fi
51626
51627      # Use eval to expand a potential ~
51628      eval path="$path"
51629      if test ! -f "$path" && test ! -d "$path"; then
51630        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51631      fi
51632
51633      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51634    fi
51635  fi
51636
51637      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51638$as_echo_n "checking for $DLL_NAME... " >&6; }
51639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51640$as_echo "$MSVC_DLL" >&6; }
51641    else
51642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51643$as_echo "incorrect, ignoring" >&6; }
51644      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51645$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51646    fi
51647  fi
51648
51649    fi
51650  fi
51651
51652  if test "x$MSVC_DLL" = x; then
51653    # Probe: Check in the Boot JDK directory.
51654    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51655
51656  DLL_NAME="$DLL_NAME"
51657  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51658  METHOD="well-known location in Boot JDK"
51659  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51660    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51661$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51662
51663    # Need to check if the found msvcr is correct architecture
51664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51665$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51666    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51667    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51668      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51669      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51670      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51671        CORRECT_MSVCR_ARCH="PE32 executable"
51672      else
51673        CORRECT_MSVCR_ARCH="PE32+ executable"
51674      fi
51675    else
51676      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51677        CORRECT_MSVCR_ARCH=386
51678      else
51679        CORRECT_MSVCR_ARCH=x86-64
51680      fi
51681    fi
51682    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51684$as_echo "ok" >&6; }
51685      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51686
51687  # Only process if variable expands to non-empty
51688
51689  if test "x$MSVC_DLL" != x; then
51690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51691
51692  # Input might be given as Windows format, start by converting to
51693  # unix format.
51694  path="$MSVC_DLL"
51695  new_path=`$CYGPATH -u "$path"`
51696
51697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51700  # "foo.exe" is OK but "foo" is an error.
51701  #
51702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51703  # It is also a way to make sure we got the proper file name for the real test later on.
51704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51705  if test "x$test_shortpath" = x; then
51706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51707$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51708    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51709  fi
51710
51711  # Call helper function which possibly converts this using DOS-style short mode.
51712  # If so, the updated path is stored in $new_path.
51713
51714  input_path="$new_path"
51715  # Check if we need to convert this using DOS-style short mode. If the path
51716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51717  # take no chances and rewrite it.
51718  # Note: m4 eats our [], so we need to use [ and ] instead.
51719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51720  if test "x$has_forbidden_chars" != x; then
51721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51725      # Going to short mode and back again did indeed matter. Since short mode is
51726      # case insensitive, let's make it lowercase to improve readability.
51727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51728      # Now convert it back to Unix-style (cygpath)
51729      input_path=`$CYGPATH -u "$shortmode_path"`
51730      new_path="$input_path"
51731    fi
51732  fi
51733
51734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51735  if test "x$test_cygdrive_prefix" = x; then
51736    # As a simple fix, exclude /usr/bin since it's not a real path.
51737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51739      # a path prefixed by /cygdrive for fixpath to work.
51740      new_path="$CYGWIN_ROOT_PATH$input_path"
51741    fi
51742  fi
51743
51744
51745  if test "x$path" != "x$new_path"; then
51746    MSVC_DLL="$new_path"
51747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51748$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51749  fi
51750
51751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51752
51753  path="$MSVC_DLL"
51754  has_colon=`$ECHO $path | $GREP ^.:`
51755  new_path="$path"
51756  if test "x$has_colon" = x; then
51757    # Not in mixed or Windows style, start by that.
51758    new_path=`cmd //c echo $path`
51759  fi
51760
51761
51762  input_path="$new_path"
51763  # Check if we need to convert this using DOS-style short mode. If the path
51764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51765  # take no chances and rewrite it.
51766  # Note: m4 eats our [], so we need to use [ and ] instead.
51767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51768  if test "x$has_forbidden_chars" != x; then
51769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51771  fi
51772
51773
51774  windows_path="$new_path"
51775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51776    unix_path=`$CYGPATH -u "$windows_path"`
51777    new_path="$unix_path"
51778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51780    new_path="$unix_path"
51781  fi
51782
51783  if test "x$path" != "x$new_path"; then
51784    MSVC_DLL="$new_path"
51785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51786$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51787  fi
51788
51789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51791
51792    else
51793      # We're on a unix platform. Hooray! :)
51794      path="$MSVC_DLL"
51795      has_space=`$ECHO "$path" | $GREP " "`
51796      if test "x$has_space" != x; then
51797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51798$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51800      fi
51801
51802      # Use eval to expand a potential ~
51803      eval path="$path"
51804      if test ! -f "$path" && test ! -d "$path"; then
51805        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51806      fi
51807
51808      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51809    fi
51810  fi
51811
51812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51813$as_echo_n "checking for $DLL_NAME... " >&6; }
51814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51815$as_echo "$MSVC_DLL" >&6; }
51816    else
51817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51818$as_echo "incorrect, ignoring" >&6; }
51819      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51820$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51821    fi
51822  fi
51823
51824  fi
51825
51826  if test "x$MSVC_DLL" = x; then
51827    # Probe: Look in the Windows system32 directory
51828    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51829
51830  windows_path="$CYGWIN_SYSTEMROOT"
51831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51832    unix_path=`$CYGPATH -u "$windows_path"`
51833    CYGWIN_SYSTEMROOT="$unix_path"
51834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51836    CYGWIN_SYSTEMROOT="$unix_path"
51837  fi
51838
51839    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51840
51841  DLL_NAME="$DLL_NAME"
51842  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51843  METHOD="well-known location in SYSTEMROOT"
51844  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51845    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51846$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51847
51848    # Need to check if the found msvcr is correct architecture
51849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51850$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51851    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51853      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51854      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51855      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51856        CORRECT_MSVCR_ARCH="PE32 executable"
51857      else
51858        CORRECT_MSVCR_ARCH="PE32+ executable"
51859      fi
51860    else
51861      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51862        CORRECT_MSVCR_ARCH=386
51863      else
51864        CORRECT_MSVCR_ARCH=x86-64
51865      fi
51866    fi
51867    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51869$as_echo "ok" >&6; }
51870      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51871
51872  # Only process if variable expands to non-empty
51873
51874  if test "x$MSVC_DLL" != x; then
51875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51876
51877  # Input might be given as Windows format, start by converting to
51878  # unix format.
51879  path="$MSVC_DLL"
51880  new_path=`$CYGPATH -u "$path"`
51881
51882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51885  # "foo.exe" is OK but "foo" is an error.
51886  #
51887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51888  # It is also a way to make sure we got the proper file name for the real test later on.
51889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51890  if test "x$test_shortpath" = x; then
51891    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51892$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51893    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51894  fi
51895
51896  # Call helper function which possibly converts this using DOS-style short mode.
51897  # If so, the updated path is stored in $new_path.
51898
51899  input_path="$new_path"
51900  # Check if we need to convert this using DOS-style short mode. If the path
51901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51902  # take no chances and rewrite it.
51903  # Note: m4 eats our [], so we need to use [ and ] instead.
51904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51905  if test "x$has_forbidden_chars" != x; then
51906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51910      # Going to short mode and back again did indeed matter. Since short mode is
51911      # case insensitive, let's make it lowercase to improve readability.
51912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51913      # Now convert it back to Unix-style (cygpath)
51914      input_path=`$CYGPATH -u "$shortmode_path"`
51915      new_path="$input_path"
51916    fi
51917  fi
51918
51919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51920  if test "x$test_cygdrive_prefix" = x; then
51921    # As a simple fix, exclude /usr/bin since it's not a real path.
51922    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51924      # a path prefixed by /cygdrive for fixpath to work.
51925      new_path="$CYGWIN_ROOT_PATH$input_path"
51926    fi
51927  fi
51928
51929
51930  if test "x$path" != "x$new_path"; then
51931    MSVC_DLL="$new_path"
51932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51933$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51934  fi
51935
51936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51937
51938  path="$MSVC_DLL"
51939  has_colon=`$ECHO $path | $GREP ^.:`
51940  new_path="$path"
51941  if test "x$has_colon" = x; then
51942    # Not in mixed or Windows style, start by that.
51943    new_path=`cmd //c echo $path`
51944  fi
51945
51946
51947  input_path="$new_path"
51948  # Check if we need to convert this using DOS-style short mode. If the path
51949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51950  # take no chances and rewrite it.
51951  # Note: m4 eats our [], so we need to use [ and ] instead.
51952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51953  if test "x$has_forbidden_chars" != x; then
51954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51956  fi
51957
51958
51959  windows_path="$new_path"
51960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51961    unix_path=`$CYGPATH -u "$windows_path"`
51962    new_path="$unix_path"
51963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51965    new_path="$unix_path"
51966  fi
51967
51968  if test "x$path" != "x$new_path"; then
51969    MSVC_DLL="$new_path"
51970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51971$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51972  fi
51973
51974  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51975  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51976
51977    else
51978      # We're on a unix platform. Hooray! :)
51979      path="$MSVC_DLL"
51980      has_space=`$ECHO "$path" | $GREP " "`
51981      if test "x$has_space" != x; then
51982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51983$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51984        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51985      fi
51986
51987      # Use eval to expand a potential ~
51988      eval path="$path"
51989      if test ! -f "$path" && test ! -d "$path"; then
51990        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51991      fi
51992
51993      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51994    fi
51995  fi
51996
51997      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51998$as_echo_n "checking for $DLL_NAME... " >&6; }
51999      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52000$as_echo "$MSVC_DLL" >&6; }
52001    else
52002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52003$as_echo "incorrect, ignoring" >&6; }
52004      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52005$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52006    fi
52007  fi
52008
52009  fi
52010
52011  if test "x$MSVC_DLL" = x; then
52012    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52013    if test "x$VS100COMNTOOLS" != x; then
52014      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52015
52016  windows_path="$CYGWIN_VS_TOOLS_DIR"
52017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52018    unix_path=`$CYGPATH -u "$windows_path"`
52019    CYGWIN_VS_TOOLS_DIR="$unix_path"
52020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52022    CYGWIN_VS_TOOLS_DIR="$unix_path"
52023  fi
52024
52025      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52026        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52027	    | $GREP -i /x64/ | $HEAD --lines 1`
52028      else
52029        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52030	    | $GREP -i /x86/ | $HEAD --lines 1`
52031      fi
52032
52033  DLL_NAME="$DLL_NAME"
52034  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52035  METHOD="search of VS100COMNTOOLS"
52036  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52037    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52038$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52039
52040    # Need to check if the found msvcr is correct architecture
52041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52042$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52043    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52045      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52046      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52047      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52048        CORRECT_MSVCR_ARCH="PE32 executable"
52049      else
52050        CORRECT_MSVCR_ARCH="PE32+ executable"
52051      fi
52052    else
52053      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52054        CORRECT_MSVCR_ARCH=386
52055      else
52056        CORRECT_MSVCR_ARCH=x86-64
52057      fi
52058    fi
52059    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52061$as_echo "ok" >&6; }
52062      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52063
52064  # Only process if variable expands to non-empty
52065
52066  if test "x$MSVC_DLL" != x; then
52067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52068
52069  # Input might be given as Windows format, start by converting to
52070  # unix format.
52071  path="$MSVC_DLL"
52072  new_path=`$CYGPATH -u "$path"`
52073
52074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52077  # "foo.exe" is OK but "foo" is an error.
52078  #
52079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52080  # It is also a way to make sure we got the proper file name for the real test later on.
52081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52082  if test "x$test_shortpath" = x; then
52083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52084$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52085    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52086  fi
52087
52088  # Call helper function which possibly converts this using DOS-style short mode.
52089  # If so, the updated path is stored in $new_path.
52090
52091  input_path="$new_path"
52092  # Check if we need to convert this using DOS-style short mode. If the path
52093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52094  # take no chances and rewrite it.
52095  # Note: m4 eats our [], so we need to use [ and ] instead.
52096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52097  if test "x$has_forbidden_chars" != x; then
52098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52102      # Going to short mode and back again did indeed matter. Since short mode is
52103      # case insensitive, let's make it lowercase to improve readability.
52104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52105      # Now convert it back to Unix-style (cygpath)
52106      input_path=`$CYGPATH -u "$shortmode_path"`
52107      new_path="$input_path"
52108    fi
52109  fi
52110
52111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52112  if test "x$test_cygdrive_prefix" = x; then
52113    # As a simple fix, exclude /usr/bin since it's not a real path.
52114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52116      # a path prefixed by /cygdrive for fixpath to work.
52117      new_path="$CYGWIN_ROOT_PATH$input_path"
52118    fi
52119  fi
52120
52121
52122  if test "x$path" != "x$new_path"; then
52123    MSVC_DLL="$new_path"
52124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52125$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52126  fi
52127
52128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52129
52130  path="$MSVC_DLL"
52131  has_colon=`$ECHO $path | $GREP ^.:`
52132  new_path="$path"
52133  if test "x$has_colon" = x; then
52134    # Not in mixed or Windows style, start by that.
52135    new_path=`cmd //c echo $path`
52136  fi
52137
52138
52139  input_path="$new_path"
52140  # Check if we need to convert this using DOS-style short mode. If the path
52141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52142  # take no chances and rewrite it.
52143  # Note: m4 eats our [], so we need to use [ and ] instead.
52144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52145  if test "x$has_forbidden_chars" != x; then
52146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52148  fi
52149
52150
52151  windows_path="$new_path"
52152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52153    unix_path=`$CYGPATH -u "$windows_path"`
52154    new_path="$unix_path"
52155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52157    new_path="$unix_path"
52158  fi
52159
52160  if test "x$path" != "x$new_path"; then
52161    MSVC_DLL="$new_path"
52162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52163$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52164  fi
52165
52166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52168
52169    else
52170      # We're on a unix platform. Hooray! :)
52171      path="$MSVC_DLL"
52172      has_space=`$ECHO "$path" | $GREP " "`
52173      if test "x$has_space" != x; then
52174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52175$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52177      fi
52178
52179      # Use eval to expand a potential ~
52180      eval path="$path"
52181      if test ! -f "$path" && test ! -d "$path"; then
52182        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52183      fi
52184
52185      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52186    fi
52187  fi
52188
52189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52190$as_echo_n "checking for $DLL_NAME... " >&6; }
52191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52192$as_echo "$MSVC_DLL" >&6; }
52193    else
52194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52195$as_echo "incorrect, ignoring" >&6; }
52196      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52197$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52198    fi
52199  fi
52200
52201    fi
52202  fi
52203
52204  if test "x$MSVC_DLL" = x; then
52205    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52206    # (This was the original behaviour; kept since it might turn something up)
52207    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52208      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52209        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52210	    | $GREP x64 | $HEAD --lines 1`
52211      else
52212        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52213	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52214        if test "x$POSSIBLE_MSVC_DLL" = x; then
52215          # We're grasping at straws now...
52216          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52217	      | $HEAD --lines 1`
52218        fi
52219      fi
52220
52221
52222  DLL_NAME="$DLL_NAME"
52223  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52224  METHOD="search of VCINSTALLDIR"
52225  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52226    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52227$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52228
52229    # Need to check if the found msvcr is correct architecture
52230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52231$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52232    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52234      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52235      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52236      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52237        CORRECT_MSVCR_ARCH="PE32 executable"
52238      else
52239        CORRECT_MSVCR_ARCH="PE32+ executable"
52240      fi
52241    else
52242      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52243        CORRECT_MSVCR_ARCH=386
52244      else
52245        CORRECT_MSVCR_ARCH=x86-64
52246      fi
52247    fi
52248    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52250$as_echo "ok" >&6; }
52251      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52252
52253  # Only process if variable expands to non-empty
52254
52255  if test "x$MSVC_DLL" != x; then
52256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52257
52258  # Input might be given as Windows format, start by converting to
52259  # unix format.
52260  path="$MSVC_DLL"
52261  new_path=`$CYGPATH -u "$path"`
52262
52263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52266  # "foo.exe" is OK but "foo" is an error.
52267  #
52268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52269  # It is also a way to make sure we got the proper file name for the real test later on.
52270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52271  if test "x$test_shortpath" = x; then
52272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52273$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52274    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52275  fi
52276
52277  # Call helper function which possibly converts this using DOS-style short mode.
52278  # If so, the updated path is stored in $new_path.
52279
52280  input_path="$new_path"
52281  # Check if we need to convert this using DOS-style short mode. If the path
52282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52283  # take no chances and rewrite it.
52284  # Note: m4 eats our [], so we need to use [ and ] instead.
52285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52286  if test "x$has_forbidden_chars" != x; then
52287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52291      # Going to short mode and back again did indeed matter. Since short mode is
52292      # case insensitive, let's make it lowercase to improve readability.
52293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52294      # Now convert it back to Unix-style (cygpath)
52295      input_path=`$CYGPATH -u "$shortmode_path"`
52296      new_path="$input_path"
52297    fi
52298  fi
52299
52300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52301  if test "x$test_cygdrive_prefix" = x; then
52302    # As a simple fix, exclude /usr/bin since it's not a real path.
52303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52305      # a path prefixed by /cygdrive for fixpath to work.
52306      new_path="$CYGWIN_ROOT_PATH$input_path"
52307    fi
52308  fi
52309
52310
52311  if test "x$path" != "x$new_path"; then
52312    MSVC_DLL="$new_path"
52313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52314$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52315  fi
52316
52317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52318
52319  path="$MSVC_DLL"
52320  has_colon=`$ECHO $path | $GREP ^.:`
52321  new_path="$path"
52322  if test "x$has_colon" = x; then
52323    # Not in mixed or Windows style, start by that.
52324    new_path=`cmd //c echo $path`
52325  fi
52326
52327
52328  input_path="$new_path"
52329  # Check if we need to convert this using DOS-style short mode. If the path
52330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52331  # take no chances and rewrite it.
52332  # Note: m4 eats our [], so we need to use [ and ] instead.
52333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52334  if test "x$has_forbidden_chars" != x; then
52335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52337  fi
52338
52339
52340  windows_path="$new_path"
52341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52342    unix_path=`$CYGPATH -u "$windows_path"`
52343    new_path="$unix_path"
52344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52346    new_path="$unix_path"
52347  fi
52348
52349  if test "x$path" != "x$new_path"; then
52350    MSVC_DLL="$new_path"
52351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52352$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52353  fi
52354
52355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52357
52358    else
52359      # We're on a unix platform. Hooray! :)
52360      path="$MSVC_DLL"
52361      has_space=`$ECHO "$path" | $GREP " "`
52362      if test "x$has_space" != x; then
52363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52364$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52366      fi
52367
52368      # Use eval to expand a potential ~
52369      eval path="$path"
52370      if test ! -f "$path" && test ! -d "$path"; then
52371        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52372      fi
52373
52374      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52375    fi
52376  fi
52377
52378      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52379$as_echo_n "checking for $DLL_NAME... " >&6; }
52380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52381$as_echo "$MSVC_DLL" >&6; }
52382    else
52383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52384$as_echo "incorrect, ignoring" >&6; }
52385      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52386$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52387    fi
52388  fi
52389
52390    fi
52391  fi
52392
52393  if test "x$MSVC_DLL" = x; then
52394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52395$as_echo_n "checking for $DLL_NAME... " >&6; }
52396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52397$as_echo "no" >&6; }
52398    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52399  fi
52400
52401      MSVCP_DLL="$MSVC_DLL"
52402    fi
52403
52404  fi
52405
52406
52407
52408# Check whether --with-dxsdk was given.
52409if test "${with_dxsdk+set}" = set; then :
52410  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52411$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52412fi
52413
52414
52415
52416
52417# Check whether --with-dxsdk-lib was given.
52418if test "${with_dxsdk_lib+set}" = set; then :
52419  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52420$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52421fi
52422
52423
52424
52425
52426# Check whether --with-dxsdk-include was given.
52427if test "${with_dxsdk_include+set}" = set; then :
52428  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52429$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52430fi
52431
52432
52433  fi
52434
52435
52436###############################################################################
52437#
52438# We need to do some final tweaking, when everything else is done.
52439#
52440###############################################################################
52441
52442
52443  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52444
52445
52446  # The name of the Service Agent jar.
52447  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52448  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52449    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52450  fi
52451
52452
52453
52454    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52455$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52456
52457    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52458      ENABLE_INTREE_EC=yes
52459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52460$as_echo "yes" >&6; }
52461    else
52462      ENABLE_INTREE_EC=no
52463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52464$as_echo "no" >&6; }
52465    fi
52466
52467
52468
52469
52470###############################################################################
52471#
52472# Configure parts of the build that only affect the build performance,
52473# not the result.
52474#
52475###############################################################################
52476
52477
52478  # How many cores do we have on this build system?
52479
52480# Check whether --with-num-cores was given.
52481if test "${with_num_cores+set}" = set; then :
52482  withval=$with_num_cores;
52483fi
52484
52485  if test "x$with_num_cores" = x; then
52486    # The number of cores were not specified, try to probe them.
52487
52488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52489$as_echo_n "checking for number of cores... " >&6; }
52490  NUM_CORES=1
52491  FOUND_CORES=no
52492
52493  if test -f /proc/cpuinfo; then
52494    # Looks like a Linux (or cygwin) system
52495    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52496    FOUND_CORES=yes
52497  elif test -x /usr/sbin/psrinfo; then
52498    # Looks like a Solaris system
52499    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52500    FOUND_CORES=yes
52501  elif test -x /usr/sbin/system_profiler; then
52502    # Looks like a MacOSX system
52503    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52504    FOUND_CORES=yes
52505  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52506    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52507    FOUND_CORES=yes
52508  elif test -n "$NUMBER_OF_PROCESSORS"; then
52509    # On windows, look in the env
52510    NUM_CORES=$NUMBER_OF_PROCESSORS
52511    FOUND_CORES=yes
52512  fi
52513
52514  if test "x$FOUND_CORES" = xyes; then
52515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52516$as_echo "$NUM_CORES" >&6; }
52517  else
52518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52519$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52520    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52521$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52522  fi
52523
52524  else
52525    NUM_CORES=$with_num_cores
52526  fi
52527
52528
52529
52530  # How much memory do we have on this build system?
52531
52532# Check whether --with-memory-size was given.
52533if test "${with_memory_size+set}" = set; then :
52534  withval=$with_memory_size;
52535fi
52536
52537  if test "x$with_memory_size" = x; then
52538    # The memory size was not specified, try to probe it.
52539
52540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52541$as_echo_n "checking for memory size... " >&6; }
52542  # Default to 1024 MB
52543  MEMORY_SIZE=1024
52544  FOUND_MEM=no
52545
52546  if test -f /proc/meminfo; then
52547    # Looks like a Linux (or cygwin) system
52548    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52549    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52550    FOUND_MEM=yes
52551  elif test -x /usr/sbin/prtconf; then
52552    # Looks like a Solaris or AIX system
52553    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52554    FOUND_MEM=yes
52555  elif test -x /usr/sbin/system_profiler; then
52556    # Looks like a MacOSX system
52557    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52558    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52559    FOUND_MEM=yes
52560  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52561    # Windows, but without cygwin
52562    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52563    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52564    FOUND_MEM=yes
52565  fi
52566
52567  if test "x$FOUND_MEM" = xyes; then
52568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52569$as_echo "$MEMORY_SIZE MB" >&6; }
52570  else
52571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52572$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52573    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52574$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52575  fi
52576
52577  else
52578    MEMORY_SIZE=$with_memory_size
52579  fi
52580
52581
52582
52583  # Provide a decent default number of parallel jobs for make depending on
52584  # number of cores, amount of memory and machine architecture.
52585
52586# Check whether --with-jobs was given.
52587if test "${with_jobs+set}" = set; then :
52588  withval=$with_jobs;
52589fi
52590
52591  if test "x$with_jobs" = x; then
52592    # Number of jobs was not specified, calculate.
52593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52594$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52595    # Approximate memory in GB.
52596    memory_gb=`expr $MEMORY_SIZE / 1024`
52597    # Pick the lowest of memory in gb and number of cores.
52598    if test "$memory_gb" -lt "$NUM_CORES"; then
52599      JOBS="$memory_gb"
52600    else
52601      JOBS="$NUM_CORES"
52602      # On bigger machines, leave some room for other processes to run
52603      if test "$JOBS" -gt "4"; then
52604        JOBS=`expr $JOBS '*' 90 / 100`
52605      fi
52606    fi
52607    # Cap number of jobs to 16
52608    if test "$JOBS" -gt "16"; then
52609      JOBS=16
52610    fi
52611    if test "$JOBS" -eq "0"; then
52612      JOBS=1
52613    fi
52614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52615$as_echo "$JOBS" >&6; }
52616  else
52617    JOBS=$with_jobs
52618  fi
52619
52620
52621
52622# Setup arguments for the boot jdk (after cores and memory have been setup)
52623
52624  ##############################################################################
52625  #
52626  # Specify jvm options for anything that is run with the Boot JDK.
52627  # Not all JVM:s accept the same arguments on the command line.
52628  #
52629
52630# Check whether --with-boot-jdk-jvmargs was given.
52631if test "${with_boot_jdk_jvmargs+set}" = set; then :
52632  withval=$with_boot_jdk_jvmargs;
52633fi
52634
52635
52636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52637$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52638
52639  # Disable special log output when a debug build is used as Boot JDK...
52640
52641  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52642  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52643  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52644  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52645  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52646  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52647    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52648    JVM_ARG_OK=true
52649  else
52650    $ECHO "Arg failed:" >&5
52651    $ECHO "$OUTPUT" >&5
52652    JVM_ARG_OK=false
52653  fi
52654
52655
52656  # Apply user provided options.
52657
52658  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52659  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52660  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52661  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52662  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52663  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52664    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52665    JVM_ARG_OK=true
52666  else
52667    $ECHO "Arg failed:" >&5
52668    $ECHO "$OUTPUT" >&5
52669    JVM_ARG_OK=false
52670  fi
52671
52672
52673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52674$as_echo "$boot_jdk_jvmargs" >&6; }
52675
52676  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52677  JAVA_FLAGS=$boot_jdk_jvmargs
52678
52679
52680
52681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52682$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52683
52684  # Starting amount of heap memory.
52685
52686  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52687  $ECHO "Command: $JAVA -Xms64M -version" >&5
52688  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52689  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52690  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52691  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52692    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52693    JVM_ARG_OK=true
52694  else
52695    $ECHO "Arg failed:" >&5
52696    $ECHO "$OUTPUT" >&5
52697    JVM_ARG_OK=false
52698  fi
52699
52700
52701  # Maximum amount of heap memory.
52702  # Maximum stack size.
52703  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52704  if test "x$BUILD_NUM_BITS" = x32; then
52705    if test "$JVM_MAX_HEAP" -gt "1100"; then
52706      JVM_MAX_HEAP=1100
52707    elif test "$JVM_MAX_HEAP" -lt "512"; then
52708      JVM_MAX_HEAP=512
52709    fi
52710    STACK_SIZE=768
52711  else
52712    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52713    # pointers are used. Apparently, we need to increase the heap and stack
52714    # space for the jvm. More specifically, when running javac to build huge
52715    # jdk batch
52716    if test "$JVM_MAX_HEAP" -gt "1600"; then
52717      JVM_MAX_HEAP=1600
52718    elif test "$JVM_MAX_HEAP" -lt "512"; then
52719      JVM_MAX_HEAP=512
52720    fi
52721    STACK_SIZE=1536
52722  fi
52723
52724  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52725  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52726  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52727  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52728  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52729  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52730    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52731    JVM_ARG_OK=true
52732  else
52733    $ECHO "Arg failed:" >&5
52734    $ECHO "$OUTPUT" >&5
52735    JVM_ARG_OK=false
52736  fi
52737
52738
52739  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52740  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52741  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52742  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52743  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52744  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52745    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52746    JVM_ARG_OK=true
52747  else
52748    $ECHO "Arg failed:" >&5
52749    $ECHO "$OUTPUT" >&5
52750    JVM_ARG_OK=false
52751  fi
52752
52753
52754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52755$as_echo "$boot_jdk_jvmargs_big" >&6; }
52756
52757  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52758
52759
52760
52761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52762$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52763
52764  # Use serial gc for small short lived tools if possible
52765
52766  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52767  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52768  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52769  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52770  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52771  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52772    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52773    JVM_ARG_OK=true
52774  else
52775    $ECHO "Arg failed:" >&5
52776    $ECHO "$OUTPUT" >&5
52777    JVM_ARG_OK=false
52778  fi
52779
52780
52781  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52782  $ECHO "Command: $JAVA -Xms32M -version" >&5
52783  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52784  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52785  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52786  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52787    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52788    JVM_ARG_OK=true
52789  else
52790    $ECHO "Arg failed:" >&5
52791    $ECHO "$OUTPUT" >&5
52792    JVM_ARG_OK=false
52793  fi
52794
52795
52796  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52797  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52798  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52799  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52800  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52801  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52802    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52803    JVM_ARG_OK=true
52804  else
52805    $ECHO "Arg failed:" >&5
52806    $ECHO "$OUTPUT" >&5
52807    JVM_ARG_OK=false
52808  fi
52809
52810
52811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52812$as_echo "$boot_jdk_jvmargs_small" >&6; }
52813
52814  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52815
52816
52817  JAVA_TOOL_FLAGS_SMALL=""
52818  for f in $JAVA_FLAGS_SMALL; do
52819    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52820  done
52821
52822
52823
52824# Setup smart javac (after cores and memory have been setup)
52825
52826
52827# Check whether --with-sjavac-server-java was given.
52828if test "${with_sjavac_server_java+set}" = set; then :
52829  withval=$with_sjavac_server_java;
52830fi
52831
52832
52833  if test "x$with_sjavac_server_java" != x; then
52834    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52835    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52836    if test "x$FOUND_VERSION" = x; then
52837      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52838    fi
52839  else
52840    SJAVAC_SERVER_JAVA="$JAVA"
52841  fi
52842
52843
52844  if test "$MEMORY_SIZE" -gt "3000"; then
52845
52846  $ECHO "Check if jvm arg is ok: -d64" >&5
52847  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52848  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52849  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52850  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52851  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52852    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52853    JVM_ARG_OK=true
52854  else
52855    $ECHO "Arg failed:" >&5
52856    $ECHO "$OUTPUT" >&5
52857    JVM_ARG_OK=false
52858  fi
52859
52860    if test "$JVM_ARG_OK" = true; then
52861      JVM_64BIT=true
52862      JVM_ARG_OK=false
52863    fi
52864  fi
52865
52866  MX_VALUE=`expr $MEMORY_SIZE / 2`
52867  if test "$JVM_64BIT" = true; then
52868    # Set ms lower than mx since more than one instance of the server might
52869    # get launched at the same time before they figure out which instance won.
52870    MS_VALUE=512
52871    if test "$MX_VALUE" -gt "2048"; then
52872      MX_VALUE=2048
52873    fi
52874  else
52875    MS_VALUE=256
52876    if test "$MX_VALUE" -gt "1500"; then
52877      MX_VALUE=1500
52878    fi
52879  fi
52880  if test "$MX_VALUE" -lt "512"; then
52881    MX_VALUE=512
52882  fi
52883
52884  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52885  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52886  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52887  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52888  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52889  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52890    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52891    JVM_ARG_OK=true
52892  else
52893    $ECHO "Arg failed:" >&5
52894    $ECHO "$OUTPUT" >&5
52895    JVM_ARG_OK=false
52896  fi
52897
52898
52899
52900  # Check whether --enable-sjavac was given.
52901if test "${enable_sjavac+set}" = set; then :
52902  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52903else
52904  ENABLE_SJAVAC='no'
52905fi
52906
52907  if test "x$JVM_ARG_OK" = "xfalse"; then
52908    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52909$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52910    ENABLE_SJAVAC=no;
52911  fi
52912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52913$as_echo_n "checking whether to use sjavac... " >&6; }
52914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52915$as_echo "$ENABLE_SJAVAC" >&6; }
52916
52917
52918
52919# Can the C/C++ compiler use precompiled headers?
52920
52921
52922  ###############################################################################
52923  #
52924  # Can the C/C++ compiler use precompiled headers?
52925  #
52926  # Check whether --enable-precompiled-headers was given.
52927if test "${enable_precompiled_headers+set}" = set; then :
52928  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52929else
52930  ENABLE_PRECOMPH=yes
52931fi
52932
52933
52934  USE_PRECOMPILED_HEADER=1
52935  if test "x$ENABLE_PRECOMPH" = xno; then
52936    USE_PRECOMPILED_HEADER=0
52937  fi
52938
52939  if test "x$ENABLE_PRECOMPH" = xyes; then
52940    # Check that the compiler actually supports precomp headers.
52941    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52942      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52943$as_echo_n "checking that precompiled headers work... " >&6; }
52944      echo "int alfa();" > conftest.h
52945      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52946      if test ! -f conftest.hpp.gch; then
52947        USE_PRECOMPILED_HEADER=0
52948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52949$as_echo "no" >&6; }
52950      else
52951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52952$as_echo "yes" >&6; }
52953      fi
52954      rm -f conftest.h conftest.hpp.gch
52955    fi
52956  fi
52957
52958
52959
52960
52961# Setup use of ccache, if available
52962
52963  # Check whether --enable-ccache was given.
52964if test "${enable_ccache+set}" = set; then :
52965  enableval=$enable_ccache;
52966fi
52967
52968
52969  CCACHE=
52970  CCACHE_STATUS=
52971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52972$as_echo_n "checking is ccache enabled... " >&6; }
52973  if test "x$enable_ccache" = xyes; then
52974    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52976$as_echo "yes" >&6; }
52977      OLD_PATH="$PATH"
52978      if test "x$TOOLCHAIN_PATH" != x; then
52979        PATH=$TOOLCHAIN_PATH:$PATH
52980      fi
52981
52982
52983
52984  # Publish this variable in the help.
52985
52986
52987  if test "x$CCACHE" = x; then
52988    # The variable is not set by user, try to locate tool using the code snippet
52989    for ac_prog in ccache
52990do
52991  # Extract the first word of "$ac_prog", so it can be a program name with args.
52992set dummy $ac_prog; ac_word=$2
52993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52994$as_echo_n "checking for $ac_word... " >&6; }
52995if ${ac_cv_path_CCACHE+:} false; then :
52996  $as_echo_n "(cached) " >&6
52997else
52998  case $CCACHE in
52999  [\\/]* | ?:[\\/]*)
53000  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53001  ;;
53002  *)
53003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53004for as_dir in $PATH
53005do
53006  IFS=$as_save_IFS
53007  test -z "$as_dir" && as_dir=.
53008    for ac_exec_ext in '' $ac_executable_extensions; do
53009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53010    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53012    break 2
53013  fi
53014done
53015  done
53016IFS=$as_save_IFS
53017
53018  ;;
53019esac
53020fi
53021CCACHE=$ac_cv_path_CCACHE
53022if test -n "$CCACHE"; then
53023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53024$as_echo "$CCACHE" >&6; }
53025else
53026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53027$as_echo "no" >&6; }
53028fi
53029
53030
53031  test -n "$CCACHE" && break
53032done
53033
53034  else
53035    # The variable is set, but is it from the command line or the environment?
53036
53037    # Try to remove the string !CCACHE! from our list.
53038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53040      # If it failed, the variable was not from the command line. Ignore it,
53041      # but warn the user (except for BASH, which is always set by the calling BASH).
53042      if test "xCCACHE" != xBASH; then
53043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53044$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53045      fi
53046      # Try to locate tool using the code snippet
53047      for ac_prog in ccache
53048do
53049  # Extract the first word of "$ac_prog", so it can be a program name with args.
53050set dummy $ac_prog; ac_word=$2
53051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53052$as_echo_n "checking for $ac_word... " >&6; }
53053if ${ac_cv_path_CCACHE+:} false; then :
53054  $as_echo_n "(cached) " >&6
53055else
53056  case $CCACHE in
53057  [\\/]* | ?:[\\/]*)
53058  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53059  ;;
53060  *)
53061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53062for as_dir in $PATH
53063do
53064  IFS=$as_save_IFS
53065  test -z "$as_dir" && as_dir=.
53066    for ac_exec_ext in '' $ac_executable_extensions; do
53067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53068    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53070    break 2
53071  fi
53072done
53073  done
53074IFS=$as_save_IFS
53075
53076  ;;
53077esac
53078fi
53079CCACHE=$ac_cv_path_CCACHE
53080if test -n "$CCACHE"; then
53081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53082$as_echo "$CCACHE" >&6; }
53083else
53084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53085$as_echo "no" >&6; }
53086fi
53087
53088
53089  test -n "$CCACHE" && break
53090done
53091
53092    else
53093      # If it succeeded, then it was overridden by the user. We will use it
53094      # for the tool.
53095
53096      # First remove it from the list of overridden variables, so we can test
53097      # for unknown variables in the end.
53098      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53099
53100      # Check if the provided tool contains a complete path.
53101      tool_specified="$CCACHE"
53102      tool_basename="${tool_specified##*/}"
53103      if test "x$tool_basename" = "x$tool_specified"; then
53104        # A command without a complete path is provided, search $PATH.
53105        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53106$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53107        # Extract the first word of "$tool_basename", so it can be a program name with args.
53108set dummy $tool_basename; ac_word=$2
53109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53110$as_echo_n "checking for $ac_word... " >&6; }
53111if ${ac_cv_path_CCACHE+:} false; then :
53112  $as_echo_n "(cached) " >&6
53113else
53114  case $CCACHE in
53115  [\\/]* | ?:[\\/]*)
53116  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53117  ;;
53118  *)
53119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53120for as_dir in $PATH
53121do
53122  IFS=$as_save_IFS
53123  test -z "$as_dir" && as_dir=.
53124    for ac_exec_ext in '' $ac_executable_extensions; do
53125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53126    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53128    break 2
53129  fi
53130done
53131  done
53132IFS=$as_save_IFS
53133
53134  ;;
53135esac
53136fi
53137CCACHE=$ac_cv_path_CCACHE
53138if test -n "$CCACHE"; then
53139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53140$as_echo "$CCACHE" >&6; }
53141else
53142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53143$as_echo "no" >&6; }
53144fi
53145
53146
53147        if test "x$CCACHE" = x; then
53148          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53149        fi
53150      else
53151        # Otherwise we believe it is a complete path. Use it as it is.
53152        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53153$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53155$as_echo_n "checking for CCACHE... " >&6; }
53156        if test ! -x "$tool_specified"; then
53157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53158$as_echo "not found" >&6; }
53159          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53160        fi
53161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53162$as_echo "$tool_specified" >&6; }
53163      fi
53164    fi
53165  fi
53166
53167
53168
53169  if test "x$CCACHE" = x; then
53170    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53171  fi
53172
53173
53174      PATH="$OLD_PATH"
53175      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53176      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53177    else
53178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53179$as_echo "no" >&6; }
53180      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53181$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53182    fi
53183  elif test "x$enable_ccache" = xno; then
53184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53185$as_echo "no, explicitly disabled" >&6; }
53186    CCACHE_STATUS="Disabled"
53187  elif test "x$enable_ccache" = x; then
53188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53189$as_echo "no" >&6; }
53190  else
53191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53192$as_echo "unknown" >&6; }
53193    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53194  fi
53195
53196
53197
53198# Check whether --with-ccache-dir was given.
53199if test "${with_ccache_dir+set}" = set; then :
53200  withval=$with_ccache_dir;
53201fi
53202
53203
53204  if test "x$with_ccache_dir" != x; then
53205    # When using a non home ccache directory, assume the use is to share ccache files
53206    # with other users. Thus change the umask.
53207    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53208    if test "x$CCACHE" = x; then
53209      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53210$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53211    fi
53212  fi
53213
53214  if test "x$CCACHE" != x; then
53215
53216  if test "x$CCACHE" != x; then
53217    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53218      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53219          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53220      if test "x$HAS_BAD_CCACHE" != "x"; then
53221        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53222      fi
53223      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53224$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53225      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53226      PUSHED_FLAGS="$CXXFLAGS"
53227      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53228      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53229/* end confdefs.h.  */
53230
53231int
53232main ()
53233{
53234
53235  ;
53236  return 0;
53237}
53238_ACEOF
53239if ac_fn_cxx_try_compile "$LINENO"; then :
53240  CC_KNOWS_CCACHE_TRICK=yes
53241else
53242  CC_KNOWS_CCACHE_TRICK=no
53243fi
53244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53245      CXXFLAGS="$PUSHED_FLAGS"
53246      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53248$as_echo "yes" >&6; }
53249        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53250
53251        CCACHE_SLOPPINESS=pch_defines,time_macros
53252      else
53253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53254$as_echo "no" >&6; }
53255        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53256      fi
53257    fi
53258
53259    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53260        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53261
53262    if test "x$SET_CCACHE_DIR" != x; then
53263      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53264      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53265    fi
53266  fi
53267
53268  fi
53269
53270
53271###############################################################################
53272#
53273# And now the finish...
53274#
53275###############################################################################
53276
53277# Check for some common pitfalls
53278
53279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53280    file_to_test="$SRC_ROOT/LICENSE"
53281    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53282      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
53283    fi
53284  fi
53285
53286
53287  # Did user specify any unknown variables?
53288
53289  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53290    # Replace the separating ! with spaces before presenting for end user.
53291    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53292    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53293$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53294  fi
53295
53296
53297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53298$as_echo_n "checking if build directory is on local disk... " >&6; }
53299
53300  # df -l lists only local disks; if the given directory is not found then
53301  # a non-zero exit code is given
53302  if test "x$DF" = x; then
53303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53304      # msys does not have df; use Windows "net use" instead.
53305      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53306      if test "x$IS_NETWORK_DISK" = x; then
53307        OUTPUT_DIR_IS_LOCAL="yes"
53308      else
53309        OUTPUT_DIR_IS_LOCAL="no"
53310      fi
53311    else
53312      # No df here, say it's local
53313      OUTPUT_DIR_IS_LOCAL="yes"
53314    fi
53315  else
53316    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53317      OUTPUT_DIR_IS_LOCAL="yes"
53318    else
53319      OUTPUT_DIR_IS_LOCAL="no"
53320    fi
53321  fi
53322
53323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53324$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53325
53326
53327
53328  # Check if the user has any old-style ALT_ variables set.
53329  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53330
53331  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53332  # Since we can't properly handle the dependencies for this, warn the user about the situation
53333  if test -e $OUTPUT_ROOT/spec.gmk; then
53334    IS_RECONFIGURE=yes
53335  else
53336    IS_RECONFIGURE=no
53337  fi
53338
53339
53340# At the end, call the custom hook. (Dummy macro if no custom sources available)
53341
53342
53343# We're messing a bit with internal autoconf variables to put the config.status
53344# in the output directory instead of the current directory.
53345CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53346
53347# Create the actual output files. Now the main work of configure is done.
53348cat >confcache <<\_ACEOF
53349# This file is a shell script that caches the results of configure
53350# tests run on this system so they can be shared between configure
53351# scripts and configure runs, see configure's option --config-cache.
53352# It is not useful on other systems.  If it contains results you don't
53353# want to keep, you may remove or edit it.
53354#
53355# config.status only pays attention to the cache file if you give it
53356# the --recheck option to rerun configure.
53357#
53358# `ac_cv_env_foo' variables (set or unset) will be overridden when
53359# loading this file, other *unset* `ac_cv_foo' will be assigned the
53360# following values.
53361
53362_ACEOF
53363
53364# The following way of writing the cache mishandles newlines in values,
53365# but we know of no workaround that is simple, portable, and efficient.
53366# So, we kill variables containing newlines.
53367# Ultrix sh set writes to stderr and can't be redirected directly,
53368# and sets the high bit in the cache file unless we assign to the vars.
53369(
53370  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53371    eval ac_val=\$$ac_var
53372    case $ac_val in #(
53373    *${as_nl}*)
53374      case $ac_var in #(
53375      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53376$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53377      esac
53378      case $ac_var in #(
53379      _ | IFS | as_nl) ;; #(
53380      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53381      *) { eval $ac_var=; unset $ac_var;} ;;
53382      esac ;;
53383    esac
53384  done
53385
53386  (set) 2>&1 |
53387    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53388    *${as_nl}ac_space=\ *)
53389      # `set' does not quote correctly, so add quotes: double-quote
53390      # substitution turns \\\\ into \\, and sed turns \\ into \.
53391      sed -n \
53392	"s/'/'\\\\''/g;
53393	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53394      ;; #(
53395    *)
53396      # `set' quotes correctly as required by POSIX, so do not add quotes.
53397      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53398      ;;
53399    esac |
53400    sort
53401) |
53402  sed '
53403     /^ac_cv_env_/b end
53404     t clear
53405     :clear
53406     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53407     t end
53408     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53409     :end' >>confcache
53410if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53411  if test -w "$cache_file"; then
53412    if test "x$cache_file" != "x/dev/null"; then
53413      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53414$as_echo "$as_me: updating cache $cache_file" >&6;}
53415      if test ! -f "$cache_file" || test -h "$cache_file"; then
53416	cat confcache >"$cache_file"
53417      else
53418        case $cache_file in #(
53419        */* | ?:*)
53420	  mv -f confcache "$cache_file"$$ &&
53421	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53422        *)
53423	  mv -f confcache "$cache_file" ;;
53424	esac
53425      fi
53426    fi
53427  else
53428    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53429$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53430  fi
53431fi
53432rm -f confcache
53433
53434test "x$prefix" = xNONE && prefix=$ac_default_prefix
53435# Let make expand exec_prefix.
53436test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53437
53438# Transform confdefs.h into DEFS.
53439# Protect against shell expansion while executing Makefile rules.
53440# Protect against Makefile macro expansion.
53441#
53442# If the first sed substitution is executed (which looks for macros that
53443# take arguments), then branch to the quote section.  Otherwise,
53444# look for a macro that doesn't take arguments.
53445ac_script='
53446:mline
53447/\\$/{
53448 N
53449 s,\\\n,,
53450 b mline
53451}
53452t clear
53453:clear
53454s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53455t quote
53456s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53457t quote
53458b any
53459:quote
53460s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53461s/\[/\\&/g
53462s/\]/\\&/g
53463s/\$/$$/g
53464H
53465:any
53466${
53467	g
53468	s/^\n//
53469	s/\n/ /g
53470	p
53471}
53472'
53473DEFS=`sed -n "$ac_script" confdefs.h`
53474
53475
53476ac_libobjs=
53477ac_ltlibobjs=
53478U=
53479for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53480  # 1. Remove the extension, and $U if already installed.
53481  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53482  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53483  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53484  #    will be set to the directory where LIBOBJS objects are built.
53485  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53486  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53487done
53488LIBOBJS=$ac_libobjs
53489
53490LTLIBOBJS=$ac_ltlibobjs
53491
53492
53493
53494: "${CONFIG_STATUS=./config.status}"
53495ac_write_fail=0
53496ac_clean_files_save=$ac_clean_files
53497ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53498{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53499$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53500as_write_fail=0
53501cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53502#! $SHELL
53503# Generated by $as_me.
53504# Run this file to recreate the current configuration.
53505# Compiler output produced by configure, useful for debugging
53506# configure, is in config.log if it exists.
53507
53508debug=false
53509ac_cs_recheck=false
53510ac_cs_silent=false
53511
53512SHELL=\${CONFIG_SHELL-$SHELL}
53513export SHELL
53514_ASEOF
53515cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53516## -------------------- ##
53517## M4sh Initialization. ##
53518## -------------------- ##
53519
53520# Be more Bourne compatible
53521DUALCASE=1; export DUALCASE # for MKS sh
53522if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53523  emulate sh
53524  NULLCMD=:
53525  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53526  # is contrary to our usage.  Disable this feature.
53527  alias -g '${1+"$@"}'='"$@"'
53528  setopt NO_GLOB_SUBST
53529else
53530  case `(set -o) 2>/dev/null` in #(
53531  *posix*) :
53532    set -o posix ;; #(
53533  *) :
53534     ;;
53535esac
53536fi
53537
53538
53539as_nl='
53540'
53541export as_nl
53542# Printing a long string crashes Solaris 7 /usr/bin/printf.
53543as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53544as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53545as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53546# Prefer a ksh shell builtin over an external printf program on Solaris,
53547# but without wasting forks for bash or zsh.
53548if test -z "$BASH_VERSION$ZSH_VERSION" \
53549    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53550  as_echo='print -r --'
53551  as_echo_n='print -rn --'
53552elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53553  as_echo='printf %s\n'
53554  as_echo_n='printf %s'
53555else
53556  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53557    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53558    as_echo_n='/usr/ucb/echo -n'
53559  else
53560    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53561    as_echo_n_body='eval
53562      arg=$1;
53563      case $arg in #(
53564      *"$as_nl"*)
53565	expr "X$arg" : "X\\(.*\\)$as_nl";
53566	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53567      esac;
53568      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53569    '
53570    export as_echo_n_body
53571    as_echo_n='sh -c $as_echo_n_body as_echo'
53572  fi
53573  export as_echo_body
53574  as_echo='sh -c $as_echo_body as_echo'
53575fi
53576
53577# The user is always right.
53578if test "${PATH_SEPARATOR+set}" != set; then
53579  PATH_SEPARATOR=:
53580  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53581    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53582      PATH_SEPARATOR=';'
53583  }
53584fi
53585
53586
53587# IFS
53588# We need space, tab and new line, in precisely that order.  Quoting is
53589# there to prevent editors from complaining about space-tab.
53590# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53591# splitting by setting IFS to empty value.)
53592IFS=" ""	$as_nl"
53593
53594# Find who we are.  Look in the path if we contain no directory separator.
53595as_myself=
53596case $0 in #((
53597  *[\\/]* ) as_myself=$0 ;;
53598  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53599for as_dir in $PATH
53600do
53601  IFS=$as_save_IFS
53602  test -z "$as_dir" && as_dir=.
53603    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53604  done
53605IFS=$as_save_IFS
53606
53607     ;;
53608esac
53609# We did not find ourselves, most probably we were run as `sh COMMAND'
53610# in which case we are not to be found in the path.
53611if test "x$as_myself" = x; then
53612  as_myself=$0
53613fi
53614if test ! -f "$as_myself"; then
53615  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53616  exit 1
53617fi
53618
53619# Unset variables that we do not need and which cause bugs (e.g. in
53620# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53621# suppresses any "Segmentation fault" message there.  '((' could
53622# trigger a bug in pdksh 5.2.14.
53623for as_var in BASH_ENV ENV MAIL MAILPATH
53624do eval test x\${$as_var+set} = xset \
53625  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53626done
53627PS1='$ '
53628PS2='> '
53629PS4='+ '
53630
53631# NLS nuisances.
53632LC_ALL=C
53633export LC_ALL
53634LANGUAGE=C
53635export LANGUAGE
53636
53637# CDPATH.
53638(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53639
53640
53641# as_fn_error STATUS ERROR [LINENO LOG_FD]
53642# ----------------------------------------
53643# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53644# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53645# script with STATUS, using 1 if that was 0.
53646as_fn_error ()
53647{
53648  as_status=$1; test $as_status -eq 0 && as_status=1
53649  if test "$4"; then
53650    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53651    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53652  fi
53653  $as_echo "$as_me: error: $2" >&2
53654  as_fn_exit $as_status
53655} # as_fn_error
53656
53657
53658# as_fn_set_status STATUS
53659# -----------------------
53660# Set $? to STATUS, without forking.
53661as_fn_set_status ()
53662{
53663  return $1
53664} # as_fn_set_status
53665
53666# as_fn_exit STATUS
53667# -----------------
53668# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53669as_fn_exit ()
53670{
53671  set +e
53672  as_fn_set_status $1
53673  exit $1
53674} # as_fn_exit
53675
53676# as_fn_unset VAR
53677# ---------------
53678# Portably unset VAR.
53679as_fn_unset ()
53680{
53681  { eval $1=; unset $1;}
53682}
53683as_unset=as_fn_unset
53684# as_fn_append VAR VALUE
53685# ----------------------
53686# Append the text in VALUE to the end of the definition contained in VAR. Take
53687# advantage of any shell optimizations that allow amortized linear growth over
53688# repeated appends, instead of the typical quadratic growth present in naive
53689# implementations.
53690if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53691  eval 'as_fn_append ()
53692  {
53693    eval $1+=\$2
53694  }'
53695else
53696  as_fn_append ()
53697  {
53698    eval $1=\$$1\$2
53699  }
53700fi # as_fn_append
53701
53702# as_fn_arith ARG...
53703# ------------------
53704# Perform arithmetic evaluation on the ARGs, and store the result in the
53705# global $as_val. Take advantage of shells that can avoid forks. The arguments
53706# must be portable across $(()) and expr.
53707if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53708  eval 'as_fn_arith ()
53709  {
53710    as_val=$(( $* ))
53711  }'
53712else
53713  as_fn_arith ()
53714  {
53715    as_val=`expr "$@" || test $? -eq 1`
53716  }
53717fi # as_fn_arith
53718
53719
53720if expr a : '\(a\)' >/dev/null 2>&1 &&
53721   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53722  as_expr=expr
53723else
53724  as_expr=false
53725fi
53726
53727if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53728  as_basename=basename
53729else
53730  as_basename=false
53731fi
53732
53733if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53734  as_dirname=dirname
53735else
53736  as_dirname=false
53737fi
53738
53739as_me=`$as_basename -- "$0" ||
53740$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53741	 X"$0" : 'X\(//\)$' \| \
53742	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53743$as_echo X/"$0" |
53744    sed '/^.*\/\([^/][^/]*\)\/*$/{
53745	    s//\1/
53746	    q
53747	  }
53748	  /^X\/\(\/\/\)$/{
53749	    s//\1/
53750	    q
53751	  }
53752	  /^X\/\(\/\).*/{
53753	    s//\1/
53754	    q
53755	  }
53756	  s/.*/./; q'`
53757
53758# Avoid depending upon Character Ranges.
53759as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53760as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53761as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53762as_cr_digits='0123456789'
53763as_cr_alnum=$as_cr_Letters$as_cr_digits
53764
53765ECHO_C= ECHO_N= ECHO_T=
53766case `echo -n x` in #(((((
53767-n*)
53768  case `echo 'xy\c'` in
53769  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53770  xy)  ECHO_C='\c';;
53771  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53772       ECHO_T='	';;
53773  esac;;
53774*)
53775  ECHO_N='-n';;
53776esac
53777
53778rm -f conf$$ conf$$.exe conf$$.file
53779if test -d conf$$.dir; then
53780  rm -f conf$$.dir/conf$$.file
53781else
53782  rm -f conf$$.dir
53783  mkdir conf$$.dir 2>/dev/null
53784fi
53785if (echo >conf$$.file) 2>/dev/null; then
53786  if ln -s conf$$.file conf$$ 2>/dev/null; then
53787    as_ln_s='ln -s'
53788    # ... but there are two gotchas:
53789    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53790    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53791    # In both cases, we have to default to `cp -pR'.
53792    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53793      as_ln_s='cp -pR'
53794  elif ln conf$$.file conf$$ 2>/dev/null; then
53795    as_ln_s=ln
53796  else
53797    as_ln_s='cp -pR'
53798  fi
53799else
53800  as_ln_s='cp -pR'
53801fi
53802rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53803rmdir conf$$.dir 2>/dev/null
53804
53805
53806# as_fn_mkdir_p
53807# -------------
53808# Create "$as_dir" as a directory, including parents if necessary.
53809as_fn_mkdir_p ()
53810{
53811
53812  case $as_dir in #(
53813  -*) as_dir=./$as_dir;;
53814  esac
53815  test -d "$as_dir" || eval $as_mkdir_p || {
53816    as_dirs=
53817    while :; do
53818      case $as_dir in #(
53819      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53820      *) as_qdir=$as_dir;;
53821      esac
53822      as_dirs="'$as_qdir' $as_dirs"
53823      as_dir=`$as_dirname -- "$as_dir" ||
53824$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53825	 X"$as_dir" : 'X\(//\)[^/]' \| \
53826	 X"$as_dir" : 'X\(//\)$' \| \
53827	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53828$as_echo X"$as_dir" |
53829    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53830	    s//\1/
53831	    q
53832	  }
53833	  /^X\(\/\/\)[^/].*/{
53834	    s//\1/
53835	    q
53836	  }
53837	  /^X\(\/\/\)$/{
53838	    s//\1/
53839	    q
53840	  }
53841	  /^X\(\/\).*/{
53842	    s//\1/
53843	    q
53844	  }
53845	  s/.*/./; q'`
53846      test -d "$as_dir" && break
53847    done
53848    test -z "$as_dirs" || eval "mkdir $as_dirs"
53849  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53850
53851
53852} # as_fn_mkdir_p
53853if mkdir -p . 2>/dev/null; then
53854  as_mkdir_p='mkdir -p "$as_dir"'
53855else
53856  test -d ./-p && rmdir ./-p
53857  as_mkdir_p=false
53858fi
53859
53860
53861# as_fn_executable_p FILE
53862# -----------------------
53863# Test if FILE is an executable regular file.
53864as_fn_executable_p ()
53865{
53866  test -f "$1" && test -x "$1"
53867} # as_fn_executable_p
53868as_test_x='test -x'
53869as_executable_p=as_fn_executable_p
53870
53871# Sed expression to map a string onto a valid CPP name.
53872as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53873
53874# Sed expression to map a string onto a valid variable name.
53875as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53876
53877
53878exec 6>&1
53879## ----------------------------------- ##
53880## Main body of $CONFIG_STATUS script. ##
53881## ----------------------------------- ##
53882_ASEOF
53883test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53884
53885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53886# Save the log message, to keep $0 and so on meaningful, and to
53887# report actual input values of CONFIG_FILES etc. instead of their
53888# values after options handling.
53889ac_log="
53890This file was extended by OpenJDK $as_me jdk9, which was
53891generated by GNU Autoconf 2.69.  Invocation command line was
53892
53893  CONFIG_FILES    = $CONFIG_FILES
53894  CONFIG_HEADERS  = $CONFIG_HEADERS
53895  CONFIG_LINKS    = $CONFIG_LINKS
53896  CONFIG_COMMANDS = $CONFIG_COMMANDS
53897  $ $0 $@
53898
53899on `(hostname || uname -n) 2>/dev/null | sed 1q`
53900"
53901
53902_ACEOF
53903
53904case $ac_config_files in *"
53905"*) set x $ac_config_files; shift; ac_config_files=$*;;
53906esac
53907
53908
53909
53910cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53911# Files that config.status was made for.
53912config_files="$ac_config_files"
53913
53914_ACEOF
53915
53916cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53917ac_cs_usage="\
53918\`$as_me' instantiates files and other configuration actions
53919from templates according to the current configuration.  Unless the files
53920and actions are specified as TAGs, all are instantiated by default.
53921
53922Usage: $0 [OPTION]... [TAG]...
53923
53924  -h, --help       print this help, then exit
53925  -V, --version    print version number and configuration settings, then exit
53926      --config     print configuration, then exit
53927  -q, --quiet, --silent
53928                   do not print progress messages
53929  -d, --debug      don't remove temporary files
53930      --recheck    update $as_me by reconfiguring in the same conditions
53931      --file=FILE[:TEMPLATE]
53932                   instantiate the configuration file FILE
53933
53934Configuration files:
53935$config_files
53936
53937Report bugs to <build-dev@openjdk.java.net>.
53938OpenJDK home page: <http://openjdk.java.net>."
53939
53940_ACEOF
53941cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53942ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53943ac_cs_version="\\
53944OpenJDK config.status jdk9
53945configured by $0, generated by GNU Autoconf 2.69,
53946  with options \\"\$ac_cs_config\\"
53947
53948Copyright (C) 2012 Free Software Foundation, Inc.
53949This config.status script is free software; the Free Software Foundation
53950gives unlimited permission to copy, distribute and modify it."
53951
53952ac_pwd='$ac_pwd'
53953srcdir='$srcdir'
53954AWK='$AWK'
53955test -n "\$AWK" || AWK=awk
53956_ACEOF
53957
53958cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53959# The default lists apply if the user does not specify any file.
53960ac_need_defaults=:
53961while test $# != 0
53962do
53963  case $1 in
53964  --*=?*)
53965    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53966    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53967    ac_shift=:
53968    ;;
53969  --*=)
53970    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53971    ac_optarg=
53972    ac_shift=:
53973    ;;
53974  *)
53975    ac_option=$1
53976    ac_optarg=$2
53977    ac_shift=shift
53978    ;;
53979  esac
53980
53981  case $ac_option in
53982  # Handling of the options.
53983  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53984    ac_cs_recheck=: ;;
53985  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53986    $as_echo "$ac_cs_version"; exit ;;
53987  --config | --confi | --conf | --con | --co | --c )
53988    $as_echo "$ac_cs_config"; exit ;;
53989  --debug | --debu | --deb | --de | --d | -d )
53990    debug=: ;;
53991  --file | --fil | --fi | --f )
53992    $ac_shift
53993    case $ac_optarg in
53994    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53995    '') as_fn_error $? "missing file argument" ;;
53996    esac
53997    as_fn_append CONFIG_FILES " '$ac_optarg'"
53998    ac_need_defaults=false;;
53999  --he | --h |  --help | --hel | -h )
54000    $as_echo "$ac_cs_usage"; exit ;;
54001  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
54002  | -silent | --silent | --silen | --sile | --sil | --si | --s)
54003    ac_cs_silent=: ;;
54004
54005  # This is an error.
54006  -*) as_fn_error $? "unrecognized option: \`$1'
54007Try \`$0 --help' for more information." ;;
54008
54009  *) as_fn_append ac_config_targets " $1"
54010     ac_need_defaults=false ;;
54011
54012  esac
54013  shift
54014done
54015
54016ac_configure_extra_args=
54017
54018if $ac_cs_silent; then
54019  exec 6>/dev/null
54020  ac_configure_extra_args="$ac_configure_extra_args --silent"
54021fi
54022
54023_ACEOF
54024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54025if \$ac_cs_recheck; then
54026  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54027  shift
54028  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54029  CONFIG_SHELL='$SHELL'
54030  export CONFIG_SHELL
54031  exec "\$@"
54032fi
54033
54034_ACEOF
54035cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54036exec 5>>config.log
54037{
54038  echo
54039  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54040## Running $as_me. ##
54041_ASBOX
54042  $as_echo "$ac_log"
54043} >&5
54044
54045_ACEOF
54046cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54047_ACEOF
54048
54049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54050
54051# Handling of arguments.
54052for ac_config_target in $ac_config_targets
54053do
54054  case $ac_config_target in
54055    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54056    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54057    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54058    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54059    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54060
54061  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54062  esac
54063done
54064
54065
54066# If the user did not use the arguments to specify the items to instantiate,
54067# then the envvar interface is used.  Set only those that are not.
54068# We use the long form for the default assignment because of an extremely
54069# bizarre bug on SunOS 4.1.3.
54070if $ac_need_defaults; then
54071  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54072fi
54073
54074# Have a temporary directory for convenience.  Make it in the build tree
54075# simply because there is no reason against having it here, and in addition,
54076# creating and moving files from /tmp can sometimes cause problems.
54077# Hook for its removal unless debugging.
54078# Note that there is a small window in which the directory will not be cleaned:
54079# after its creation but before its name has been assigned to `$tmp'.
54080$debug ||
54081{
54082  tmp= ac_tmp=
54083  trap 'exit_status=$?
54084  : "${ac_tmp:=$tmp}"
54085  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54086' 0
54087  trap 'as_fn_exit 1' 1 2 13 15
54088}
54089# Create a (secure) tmp directory for tmp files.
54090
54091{
54092  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54093  test -d "$tmp"
54094}  ||
54095{
54096  tmp=./conf$$-$RANDOM
54097  (umask 077 && mkdir "$tmp")
54098} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54099ac_tmp=$tmp
54100
54101# Set up the scripts for CONFIG_FILES section.
54102# No need to generate them if there are no CONFIG_FILES.
54103# This happens for instance with `./config.status config.h'.
54104if test -n "$CONFIG_FILES"; then
54105
54106
54107ac_cr=`echo X | tr X '\015'`
54108# On cygwin, bash can eat \r inside `` if the user requested igncr.
54109# But we know of no other shell where ac_cr would be empty at this
54110# point, so we can use a bashism as a fallback.
54111if test "x$ac_cr" = x; then
54112  eval ac_cr=\$\'\\r\'
54113fi
54114ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54115if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54116  ac_cs_awk_cr='\\r'
54117else
54118  ac_cs_awk_cr=$ac_cr
54119fi
54120
54121echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54122_ACEOF
54123
54124
54125{
54126  echo "cat >conf$$subs.awk <<_ACEOF" &&
54127  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54128  echo "_ACEOF"
54129} >conf$$subs.sh ||
54130  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54131ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54132ac_delim='%!_!# '
54133for ac_last_try in false false false false false :; do
54134  . ./conf$$subs.sh ||
54135    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54136
54137  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54138  if test $ac_delim_n = $ac_delim_num; then
54139    break
54140  elif $ac_last_try; then
54141    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54142  else
54143    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54144  fi
54145done
54146rm -f conf$$subs.sh
54147
54148cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54149cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54150_ACEOF
54151sed -n '
54152h
54153s/^/S["/; s/!.*/"]=/
54154p
54155g
54156s/^[^!]*!//
54157:repl
54158t repl
54159s/'"$ac_delim"'$//
54160t delim
54161:nl
54162h
54163s/\(.\{148\}\)..*/\1/
54164t more1
54165s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54166p
54167n
54168b repl
54169:more1
54170s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54171p
54172g
54173s/.\{148\}//
54174t nl
54175:delim
54176h
54177s/\(.\{148\}\)..*/\1/
54178t more2
54179s/["\\]/\\&/g; s/^/"/; s/$/"/
54180p
54181b
54182:more2
54183s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54184p
54185g
54186s/.\{148\}//
54187t delim
54188' <conf$$subs.awk | sed '
54189/^[^""]/{
54190  N
54191  s/\n//
54192}
54193' >>$CONFIG_STATUS || ac_write_fail=1
54194rm -f conf$$subs.awk
54195cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54196_ACAWK
54197cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54198  for (key in S) S_is_set[key] = 1
54199  FS = ""
54200
54201}
54202{
54203  line = $ 0
54204  nfields = split(line, field, "@")
54205  substed = 0
54206  len = length(field[1])
54207  for (i = 2; i < nfields; i++) {
54208    key = field[i]
54209    keylen = length(key)
54210    if (S_is_set[key]) {
54211      value = S[key]
54212      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54213      len += length(value) + length(field[++i])
54214      substed = 1
54215    } else
54216      len += 1 + keylen
54217  }
54218
54219  print line
54220}
54221
54222_ACAWK
54223_ACEOF
54224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54225if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54226  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54227else
54228  cat
54229fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54230  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54231_ACEOF
54232
54233# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54234# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54235# trailing colons and then remove the whole line if VPATH becomes empty
54236# (actually we leave an empty line to preserve line numbers).
54237if test "x$srcdir" = x.; then
54238  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54239h
54240s///
54241s/^/:/
54242s/[	 ]*$/:/
54243s/:\$(srcdir):/:/g
54244s/:\${srcdir}:/:/g
54245s/:@srcdir@:/:/g
54246s/^:*//
54247s/:*$//
54248x
54249s/\(=[	 ]*\).*/\1/
54250G
54251s/\n//
54252s/^[^=]*=[	 ]*$//
54253}'
54254fi
54255
54256cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54257fi # test -n "$CONFIG_FILES"
54258
54259
54260eval set X "  :F $CONFIG_FILES      "
54261shift
54262for ac_tag
54263do
54264  case $ac_tag in
54265  :[FHLC]) ac_mode=$ac_tag; continue;;
54266  esac
54267  case $ac_mode$ac_tag in
54268  :[FHL]*:*);;
54269  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54270  :[FH]-) ac_tag=-:-;;
54271  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54272  esac
54273  ac_save_IFS=$IFS
54274  IFS=:
54275  set x $ac_tag
54276  IFS=$ac_save_IFS
54277  shift
54278  ac_file=$1
54279  shift
54280
54281  case $ac_mode in
54282  :L) ac_source=$1;;
54283  :[FH])
54284    ac_file_inputs=
54285    for ac_f
54286    do
54287      case $ac_f in
54288      -) ac_f="$ac_tmp/stdin";;
54289      *) # Look for the file first in the build tree, then in the source tree
54290	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54291	 # because $ac_f cannot contain `:'.
54292	 test -f "$ac_f" ||
54293	   case $ac_f in
54294	   [\\/$]*) false;;
54295	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54296	   esac ||
54297	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54298      esac
54299      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54300      as_fn_append ac_file_inputs " '$ac_f'"
54301    done
54302
54303    # Let's still pretend it is `configure' which instantiates (i.e., don't
54304    # use $as_me), people would be surprised to read:
54305    #    /* config.h.  Generated by config.status.  */
54306    configure_input='Generated from '`
54307	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54308	`' by configure.'
54309    if test x"$ac_file" != x-; then
54310      configure_input="$ac_file.  $configure_input"
54311      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54312$as_echo "$as_me: creating $ac_file" >&6;}
54313    fi
54314    # Neutralize special characters interpreted by sed in replacement strings.
54315    case $configure_input in #(
54316    *\&* | *\|* | *\\* )
54317       ac_sed_conf_input=`$as_echo "$configure_input" |
54318       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54319    *) ac_sed_conf_input=$configure_input;;
54320    esac
54321
54322    case $ac_tag in
54323    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54324      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54325    esac
54326    ;;
54327  esac
54328
54329  ac_dir=`$as_dirname -- "$ac_file" ||
54330$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54331	 X"$ac_file" : 'X\(//\)[^/]' \| \
54332	 X"$ac_file" : 'X\(//\)$' \| \
54333	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54334$as_echo X"$ac_file" |
54335    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54336	    s//\1/
54337	    q
54338	  }
54339	  /^X\(\/\/\)[^/].*/{
54340	    s//\1/
54341	    q
54342	  }
54343	  /^X\(\/\/\)$/{
54344	    s//\1/
54345	    q
54346	  }
54347	  /^X\(\/\).*/{
54348	    s//\1/
54349	    q
54350	  }
54351	  s/.*/./; q'`
54352  as_dir="$ac_dir"; as_fn_mkdir_p
54353  ac_builddir=.
54354
54355case "$ac_dir" in
54356.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54357*)
54358  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54359  # A ".." for each directory in $ac_dir_suffix.
54360  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54361  case $ac_top_builddir_sub in
54362  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54363  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54364  esac ;;
54365esac
54366ac_abs_top_builddir=$ac_pwd
54367ac_abs_builddir=$ac_pwd$ac_dir_suffix
54368# for backward compatibility:
54369ac_top_builddir=$ac_top_build_prefix
54370
54371case $srcdir in
54372  .)  # We are building in place.
54373    ac_srcdir=.
54374    ac_top_srcdir=$ac_top_builddir_sub
54375    ac_abs_top_srcdir=$ac_pwd ;;
54376  [\\/]* | ?:[\\/]* )  # Absolute name.
54377    ac_srcdir=$srcdir$ac_dir_suffix;
54378    ac_top_srcdir=$srcdir
54379    ac_abs_top_srcdir=$srcdir ;;
54380  *) # Relative name.
54381    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54382    ac_top_srcdir=$ac_top_build_prefix$srcdir
54383    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54384esac
54385ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54386
54387
54388  case $ac_mode in
54389  :F)
54390  #
54391  # CONFIG_FILE
54392  #
54393
54394_ACEOF
54395
54396cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54397# If the template does not know about datarootdir, expand it.
54398# FIXME: This hack should be removed a few years after 2.60.
54399ac_datarootdir_hack=; ac_datarootdir_seen=
54400ac_sed_dataroot='
54401/datarootdir/ {
54402  p
54403  q
54404}
54405/@datadir@/p
54406/@docdir@/p
54407/@infodir@/p
54408/@localedir@/p
54409/@mandir@/p'
54410case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54411*datarootdir*) ac_datarootdir_seen=yes;;
54412*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54413  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54414$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54415_ACEOF
54416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54417  ac_datarootdir_hack='
54418  s&@datadir@&$datadir&g
54419  s&@docdir@&$docdir&g
54420  s&@infodir@&$infodir&g
54421  s&@localedir@&$localedir&g
54422  s&@mandir@&$mandir&g
54423  s&\\\${datarootdir}&$datarootdir&g' ;;
54424esac
54425_ACEOF
54426
54427# Neutralize VPATH when `$srcdir' = `.'.
54428# Shell code in configure.ac might set extrasub.
54429# FIXME: do we really want to maintain this feature?
54430cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54431ac_sed_extra="$ac_vpsub
54432$extrasub
54433_ACEOF
54434cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54435:t
54436/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54437s|@configure_input@|$ac_sed_conf_input|;t t
54438s&@top_builddir@&$ac_top_builddir_sub&;t t
54439s&@top_build_prefix@&$ac_top_build_prefix&;t t
54440s&@srcdir@&$ac_srcdir&;t t
54441s&@abs_srcdir@&$ac_abs_srcdir&;t t
54442s&@top_srcdir@&$ac_top_srcdir&;t t
54443s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54444s&@builddir@&$ac_builddir&;t t
54445s&@abs_builddir@&$ac_abs_builddir&;t t
54446s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54447$ac_datarootdir_hack
54448"
54449eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54450  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54451
54452test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54453  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54454  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54455      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54456  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54457which seems to be undefined.  Please make sure it is defined" >&5
54458$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54459which seems to be undefined.  Please make sure it is defined" >&2;}
54460
54461  rm -f "$ac_tmp/stdin"
54462  case $ac_file in
54463  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54464  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54465  esac \
54466  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54467 ;;
54468
54469
54470
54471  esac
54472
54473done # for ac_tag
54474
54475
54476as_fn_exit 0
54477_ACEOF
54478ac_clean_files=$ac_clean_files_save
54479
54480test $ac_write_fail = 0 ||
54481  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54482
54483
54484# configure is writing to config.log, and then calls config.status.
54485# config.status does its own redirection, appending to config.log.
54486# Unfortunately, on DOS this fails, as config.log is still kept open
54487# by configure, so config.status won't be able to write to it; its
54488# output is simply discarded.  So we exec the FD to /dev/null,
54489# effectively closing config.log, so it can be properly (re)opened and
54490# appended to by config.status.  When coming back to configure, we
54491# need to make the FD available again.
54492if test "$no_create" != yes; then
54493  ac_cs_success=:
54494  ac_config_status_args=
54495  test "$silent" = yes &&
54496    ac_config_status_args="$ac_config_status_args --quiet"
54497  exec 5>/dev/null
54498  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54499  exec 5>>config.log
54500  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54501  # would make configure fail if this is the last instruction.
54502  $ac_cs_success || as_fn_exit 1
54503fi
54504if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54505  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54506$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54507fi
54508
54509
54510# After AC_OUTPUT, we need to do final work
54511
54512
54513  # Try to move config.log (generated by autoconf) to the configure-support directory.
54514  if test -e ./config.log; then
54515    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54516  fi
54517
54518  # Rotate our log file (configure.log)
54519  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54520    $RM -f "$OUTPUT_ROOT/configure.log.old"
54521  fi
54522  if test -e "$OUTPUT_ROOT/configure.log"; then
54523    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54524  fi
54525
54526  # Move configure.log from current directory to the build output root
54527  if test -e ./configure.log; then
54528    echo found it
54529    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54530  fi
54531
54532  # Make the compare script executable
54533  $CHMOD +x $OUTPUT_ROOT/compare.sh
54534
54535
54536# Finally output some useful information to the user
54537
54538  # Finally output some useful information to the user
54539
54540  printf "\n"
54541  printf "====================================================\n"
54542  if test "x$no_create" != "xyes"; then
54543    if test "x$IS_RECONFIGURE" != "xyes"; then
54544      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54545    else
54546      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54547    fi
54548  else
54549    if test "x$IS_RECONFIGURE" != "xyes"; then
54550      printf "A configuration has been successfully checked but not created\n"
54551    else
54552      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54553    fi
54554  fi
54555  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54556    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54557  else
54558    printf "using default settings.\n"
54559  fi
54560
54561  printf "\n"
54562  printf "Configuration summary:\n"
54563  printf "* Debug level:    $DEBUG_LEVEL\n"
54564  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54565  printf "* JDK variant:    $JDK_VARIANT\n"
54566  printf "* JVM variants:   $with_jvm_variants\n"
54567  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54568
54569  printf "\n"
54570  printf "Tools summary:\n"
54571  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54572    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54573  fi
54574  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54575  if test "x$TOOLCHAIN_VERSION" != "x"; then
54576    print_version=" $TOOLCHAIN_VERSION"
54577  fi
54578  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54579  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54580  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54581
54582  printf "\n"
54583  printf "Build performance summary:\n"
54584  printf "* Cores to use:   $JOBS\n"
54585  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54586  if test "x$CCACHE_STATUS" != "x"; then
54587    printf "* ccache status:  $CCACHE_STATUS\n"
54588  fi
54589  printf "\n"
54590
54591  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54592    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54593    printf "will result in longer build times.\n"
54594    printf "\n"
54595  fi
54596
54597  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54598    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54599    printf "These are not respected, and will be ignored. It is recommended\n"
54600    printf "that you clean your environment. The following variables are set:\n"
54601    printf "$FOUND_ALT_VARIABLES\n"
54602    printf "\n"
54603  fi
54604
54605  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54606    printf "WARNING: Your build output directory is not on a local disk.\n"
54607    printf "This will severely degrade build performance!\n"
54608    printf "It is recommended that you create an output directory on a local disk,\n"
54609    printf "and run the configure script again from that directory.\n"
54610    printf "\n"
54611  fi
54612
54613  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54614    printf "WARNING: The result of this configuration has overridden an older\n"
54615    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54616    printf "proper build. Failure to do so might result in strange build problems.\n"
54617    printf "\n"
54618  fi
54619
54620  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54621    printf "WARNING: The result of this configuration was not saved.\n"
54622    printf "You should run without '--no-create | -n' to create the configuration.\n"
54623    printf "\n"
54624  fi
54625
54626
54627
54628  # Locate config.log.
54629  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54630    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54631  elif test -e "./config.log"; then
54632    CONFIG_LOG_PATH="."
54633  fi
54634
54635  if test -e "$CONFIG_LOG_PATH/config.log"; then
54636    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54637    if test $? -eq 0; then
54638      printf "The following warnings were produced. Repeated here for convenience:\n"
54639      # We must quote sed expression (using []) to stop m4 from eating the [].
54640      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54641      printf "\n"
54642    fi
54643  fi
54644
54645