generated-configure.sh revision 1567:2c7ff240d69e
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
844RMICONNECTOR_IIOP
845UNLIMITED_CRYPTO
846CACERTS_FILE
847TEST_IN_BUILD
848BUILD_HEADLESS
849SUPPORT_HEADFUL
850SUPPORT_HEADLESS
851BDEPS_FTP
852BDEPS_UNZIP
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857BASH_ARGS
858SETFILE
859CODESIGN
860XATTR
861DSYMUTIL
862IS_GNU_TIME
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
1063enable_rmiconnector_iiop
1064with_milestone
1065with_update_version
1066with_user_release_suffix
1067with_build_number
1068with_copyright_year
1069with_boot_jdk
1070with_add_source_root
1071with_override_source_root
1072with_adds_and_overrides
1073with_override_langtools
1074with_override_corba
1075with_override_jaxp
1076with_override_jaxws
1077with_override_hotspot
1078with_override_nashorn
1079with_override_jdk
1080with_import_hotspot
1081with_toolchain_type
1082with_toolchain_version
1083with_jtreg
1084with_extra_cflags
1085with_extra_cxxflags
1086with_extra_ldflags
1087enable_warnings_as_errors
1088enable_debug_symbols
1089enable_zip_debug_info
1090enable_native_coverage
1091with_x
1092with_cups
1093with_cups_include
1094with_freetype
1095with_freetype_include
1096with_freetype_lib
1097with_freetype_src
1098enable_freetype_bundling
1099with_alsa
1100with_alsa_include
1101with_alsa_lib
1102with_libjpeg
1103with_giflib
1104with_lcms
1105with_libpng
1106with_zlib
1107with_stdc__lib
1108with_msvcr_dll
1109with_msvcp_dll
1110with_dxsdk
1111with_dxsdk_lib
1112with_dxsdk_include
1113with_num_cores
1114with_memory_size
1115with_jobs
1116with_boot_jdk_jvmargs
1117with_sjavac_server_java
1118enable_sjavac
1119enable_precompiled_headers
1120enable_ccache
1121with_ccache_dir
1122'
1123      ac_precious_vars='build_alias
1124host_alias
1125target_alias
1126BASENAME
1127BASH
1128CAT
1129CHMOD
1130CMP
1131COMM
1132CP
1133CUT
1134DATE
1135DIFF
1136DIRNAME
1137ECHO
1138EXPR
1139FILE
1140FIND
1141HEAD
1142LN
1143LS
1144MKDIR
1145MKTEMP
1146MV
1147NAWK
1148PRINTF
1149RM
1150SH
1151SORT
1152TAIL
1153TAR
1154TEE
1155TOUCH
1156TR
1157UNAME
1158UNIQ
1159WC
1160WHICH
1161XARGS
1162AWK
1163GREP
1164EGREP
1165FGREP
1166SED
1167CYGPATH
1168READLINK
1169DF
1170CPIO
1171UNZIP
1172ZIP
1173LDD
1174OTOOL
1175READELF
1176HG
1177STAT
1178TIME
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  --enable-rmiconnector-iiop
1852                          enable the JMX RMIConnector iiop transport
1853                          [disabled]
1854  --disable-warnings-as-errors
1855                          do not consider native warnings to be an error
1856                          [enabled]
1857  --disable-debug-symbols disable generation of debug symbols [enabled]
1858  --disable-zip-debug-info
1859                          disable zipping of debug-info files [enabled]
1860  --enable-native-coverage
1861                          enable native compilation with code coverage
1862                          data[disabled]
1863  --disable-freetype-bundling
1864                          disable bundling of the freetype library with the
1865                          build result [enabled on Windows or when using
1866                          --with-freetype, disabled otherwise]
1867  --enable-sjavac         use sjavac to do fast incremental compiles
1868                          [disabled]
1869  --disable-precompiled-headers
1870                          disable using precompiled headers when compiling C++
1871                          [enabled]
1872  --enable-ccache         enable using ccache to speed up recompilations
1873                          [disabled]
1874
1875Optional Packages:
1876  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1877  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1878  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1879                          support it), e.g. --with-target-bits=32 [guessed]
1880  --with-custom-make-dir  Deprecated. Option is kept for backwards
1881                          compatibility and is ignored
1882  --with-jdk-variant      JDK variant to build (normal) [normal]
1883  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1884  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1885                          client, minimal1, kernel, zero, zeroshark, core)
1886                          [server]
1887  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1888                          optimized (HotSpot build only)) [release]
1889  --with-devkit           use this devkit for compilers, tools and resources
1890  --with-sys-root         alias for --with-sysroot for backwards compatability
1891  --with-sysroot          use this directory as sysroot
1892  --with-tools-dir        alias for --with-toolchain-path for backwards
1893                          compatibility
1894  --with-toolchain-path   prepend these directories when searching for
1895                          toolchain binaries (compilers etc)
1896  --with-extra-path       prepend these directories to the default path
1897  --with-sdk-name         use the platform SDK of the given name. [macosx]
1898  --with-conf-name        use this as the name of the configuration [generated
1899                          from important configuration options]
1900  --with-output-sync      set make output sync type if supported by make.
1901                          [recurse]
1902  --with-builddeps-conf   use this configuration file for the builddeps
1903  --with-builddeps-server download and use build dependencies from this server
1904                          url
1905  --with-builddeps-dir    store downloaded build dependencies here
1906                          [/localhome/builddeps]
1907  --with-builddeps-group  chgrp the downloaded build dependencies to this
1908                          group
1909  --with-cacerts-file     specify alternative cacerts file
1910  --with-milestone        Set milestone value for build [internal]
1911  --with-update-version   Set update version value for build [b00]
1912  --with-user-release-suffix
1913                          Add a custom string to the version string if build
1914                          number is not set.[username_builddateb00]
1915  --with-build-number     Set build number value for build [b00]
1916  --with-copyright-year   Set copyright year value for build [current year]
1917  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1918  --with-add-source-root  for each and every source directory, look in this
1919                          additional source root for the same directory; if it
1920                          exists and have files in it, include it in the build
1921  --with-override-source-root
1922                          for each and every source directory, look in this
1923                          override source root for the same directory; if it
1924                          exists, use that directory instead and ignore the
1925                          directory in the original source root
1926  --with-adds-and-overrides
1927                          use the subdirs 'adds' and 'overrides' in the
1928                          specified directory as add-source-root and
1929                          override-source-root
1930  --with-override-langtools
1931                          use this langtools dir for the build
1932  --with-override-corba   use this corba dir for the build
1933  --with-override-jaxp    use this jaxp dir for the build
1934  --with-override-jaxws   use this jaxws dir for the build
1935  --with-override-hotspot use this hotspot dir for the build
1936  --with-override-nashorn use this nashorn dir for the build
1937  --with-override-jdk     use this jdk dir for the build
1938  --with-import-hotspot   import hotspot binaries from this jdk image or
1939                          hotspot build dist dir instead of building from
1940                          source
1941  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1942                          to show possible values [platform dependent]
1943  --with-toolchain-version
1944                          the version of the toolchain to look for, use
1945                          '--help' to show possible values [platform
1946                          dependent]
1947  --with-jtreg            Regression Test Harness [probed]
1948  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1949  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1950  --with-extra-ldflags    extra flags to be used when linking jdk
1951  --with-x                use the X Window System
1952  --with-cups             specify prefix directory for the cups package
1953                          (expecting the headers under PATH/include)
1954  --with-cups-include     specify directory for the cups include files
1955  --with-freetype         specify prefix directory for the freetype package
1956                          (expecting the libraries under PATH/lib and the
1957                          headers under PATH/include)
1958  --with-freetype-include specify directory for the freetype include files
1959  --with-freetype-lib     specify directory for the freetype library
1960  --with-freetype-src     specify directory with freetype sources to
1961                          automatically build the library (experimental,
1962                          Windows-only)
1963  --with-alsa             specify prefix directory for the alsa package
1964                          (expecting the libraries under PATH/lib and the
1965                          headers under PATH/include)
1966  --with-alsa-include     specify directory for the alsa include files
1967  --with-alsa-lib         specify directory for the alsa library
1968  --with-libjpeg          use libjpeg from build system or OpenJDK source
1969                          (system, bundled) [bundled]
1970  --with-giflib           use giflib from build system or OpenJDK source
1971                          (system, bundled) [bundled]
1972  --with-lcms             use lcms2 from build system or OpenJDK source
1973                          (system, bundled) [bundled]
1974  --with-libpng           use libpng from build system or OpenJDK source
1975                          (system, bundled) [bundled]
1976  --with-zlib             use zlib from build system or OpenJDK source
1977                          (system, bundled) [bundled]
1978  --with-stdc++lib=<static>,<dynamic>,<default>
1979                          force linking of the C++ runtime on Linux to either
1980                          static or dynamic, default is static with dynamic as
1981                          fallback
1982  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1983                          (Windows only) [probed]
1984  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1985                          (Windows only) [probed]
1986  --with-dxsdk            Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-dxsdk-include    Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-num-cores        number of cores in the build system, e.g.
1993                          --with-num-cores=8 [probed]
1994  --with-memory-size      memory (in MB) available in the build system, e.g.
1995                          --with-memory-size=1024 [probed]
1996  --with-jobs             number of parallel jobs to let make run [calculated
1997                          based on cores and memory]
1998  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1999                          invocations of boot JDK, overriding the default
2000                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2001                          -enableassertions"
2002  --with-sjavac-server-java
2003                          use this java binary for running the sjavac
2004                          background server [Boot JDK java]
2005  --with-ccache-dir       where to store ccache files [~/.ccache]
2006
2007Some influential environment variables:
2008  BASENAME    Override default value for BASENAME
2009  BASH        Override default value for BASH
2010  CAT         Override default value for CAT
2011  CHMOD       Override default value for CHMOD
2012  CMP         Override default value for CMP
2013  COMM        Override default value for COMM
2014  CP          Override default value for CP
2015  CUT         Override default value for CUT
2016  DATE        Override default value for DATE
2017  DIFF        Override default value for DIFF
2018  DIRNAME     Override default value for DIRNAME
2019  ECHO        Override default value for ECHO
2020  EXPR        Override default value for EXPR
2021  FILE        Override default value for FILE
2022  FIND        Override default value for FIND
2023  HEAD        Override default value for HEAD
2024  LN          Override default value for LN
2025  LS          Override default value for LS
2026  MKDIR       Override default value for MKDIR
2027  MKTEMP      Override default value for MKTEMP
2028  MV          Override default value for MV
2029  NAWK        Override default value for NAWK
2030  PRINTF      Override default value for PRINTF
2031  RM          Override default value for RM
2032  SH          Override default value for SH
2033  SORT        Override default value for SORT
2034  TAIL        Override default value for TAIL
2035  TAR         Override default value for TAR
2036  TEE         Override default value for TEE
2037  TOUCH       Override default value for TOUCH
2038  TR          Override default value for TR
2039  UNAME       Override default value for UNAME
2040  UNIQ        Override default value for UNIQ
2041  WC          Override default value for WC
2042  WHICH       Override default value for WHICH
2043  XARGS       Override default value for XARGS
2044  AWK         Override default value for AWK
2045  GREP        Override default value for GREP
2046  EGREP       Override default value for EGREP
2047  FGREP       Override default value for FGREP
2048  SED         Override default value for SED
2049  CYGPATH     Override default value for CYGPATH
2050  READLINK    Override default value for READLINK
2051  DF          Override default value for DF
2052  CPIO        Override default value for CPIO
2053  UNZIP       Override default value for UNZIP
2054  ZIP         Override default value for ZIP
2055  LDD         Override default value for LDD
2056  OTOOL       Override default value for OTOOL
2057  READELF     Override default value for READELF
2058  HG          Override default value for HG
2059  STAT        Override default value for STAT
2060  TIME        Override default value for TIME
2061  DSYMUTIL    Override default value for DSYMUTIL
2062  XATTR       Override default value for XATTR
2063  CODESIGN    Override default value for CODESIGN
2064  SETFILE     Override default value for SETFILE
2065  PKG_CONFIG  path to pkg-config utility
2066  JAVA        Override default value for JAVA
2067  JAVAC       Override default value for JAVAC
2068  JAVAH       Override default value for JAVAH
2069  JAR         Override default value for JAR
2070  JARSIGNER   Override default value for JARSIGNER
2071  CC          C compiler command
2072  CFLAGS      C compiler flags
2073  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2074              nonstandard directory <lib dir>
2075  LIBS        libraries to pass to the linker, e.g. -l<library>
2076  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2077              you have headers in a nonstandard directory <include dir>
2078  CXX         C++ compiler command
2079  CXXFLAGS    C++ compiler flags
2080  CPP         C preprocessor
2081  CXXCPP      C++ preprocessor
2082  AS          Override default value for AS
2083  AR          Override default value for AR
2084  LIPO        Override default value for LIPO
2085  STRIP       Override default value for STRIP
2086  NM          Override default value for NM
2087  GNM         Override default value for GNM
2088  OBJCOPY     Override default value for OBJCOPY
2089  OBJDUMP     Override default value for OBJDUMP
2090  BUILD_CC    Override default value for BUILD_CC
2091  BUILD_CXX   Override default value for BUILD_CXX
2092  BUILD_LD    Override default value for BUILD_LD
2093  JTREGEXE    Override default value for JTREGEXE
2094  XMKMF       Path to xmkmf, Makefile generator for X Window System
2095  FREETYPE_CFLAGS
2096              C compiler flags for FREETYPE, overriding pkg-config
2097  FREETYPE_LIBS
2098              linker flags for FREETYPE, overriding pkg-config
2099  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2100  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2101  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2102  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2103  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2104  PNG_LIBS    linker flags for PNG, overriding pkg-config
2105  LIBFFI_CFLAGS
2106              C compiler flags for LIBFFI, overriding pkg-config
2107  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2108  CCACHE      Override default value for CCACHE
2109
2110Use these variables to override the choices made by `configure' or to help
2111it to find libraries and programs with nonstandard names/locations.
2112
2113Report bugs to <build-dev@openjdk.java.net>.
2114OpenJDK home page: <http://openjdk.java.net>.
2115_ACEOF
2116ac_status=$?
2117fi
2118
2119if test "$ac_init_help" = "recursive"; then
2120  # If there are subdirs, report their specific --help.
2121  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2122    test -d "$ac_dir" ||
2123      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2124      continue
2125    ac_builddir=.
2126
2127case "$ac_dir" in
2128.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2129*)
2130  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2131  # A ".." for each directory in $ac_dir_suffix.
2132  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2133  case $ac_top_builddir_sub in
2134  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2135  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2136  esac ;;
2137esac
2138ac_abs_top_builddir=$ac_pwd
2139ac_abs_builddir=$ac_pwd$ac_dir_suffix
2140# for backward compatibility:
2141ac_top_builddir=$ac_top_build_prefix
2142
2143case $srcdir in
2144  .)  # We are building in place.
2145    ac_srcdir=.
2146    ac_top_srcdir=$ac_top_builddir_sub
2147    ac_abs_top_srcdir=$ac_pwd ;;
2148  [\\/]* | ?:[\\/]* )  # Absolute name.
2149    ac_srcdir=$srcdir$ac_dir_suffix;
2150    ac_top_srcdir=$srcdir
2151    ac_abs_top_srcdir=$srcdir ;;
2152  *) # Relative name.
2153    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2154    ac_top_srcdir=$ac_top_build_prefix$srcdir
2155    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2156esac
2157ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2158
2159    cd "$ac_dir" || { ac_status=$?; continue; }
2160    # Check for guested configure.
2161    if test -f "$ac_srcdir/configure.gnu"; then
2162      echo &&
2163      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2164    elif test -f "$ac_srcdir/configure"; then
2165      echo &&
2166      $SHELL "$ac_srcdir/configure" --help=recursive
2167    else
2168      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2169    fi || ac_status=$?
2170    cd "$ac_pwd" || { ac_status=$?; break; }
2171  done
2172fi
2173
2174test -n "$ac_init_help" && exit $ac_status
2175if $ac_init_version; then
2176  cat <<\_ACEOF
2177OpenJDK configure jdk9
2178generated by GNU Autoconf 2.69
2179
2180Copyright (C) 2012 Free Software Foundation, Inc.
2181This configure script is free software; the Free Software Foundation
2182gives unlimited permission to copy, distribute and modify it.
2183_ACEOF
2184  exit
2185fi
2186
2187## ------------------------ ##
2188## Autoconf initialization. ##
2189## ------------------------ ##
2190
2191# ac_fn_c_try_compile LINENO
2192# --------------------------
2193# Try to compile conftest.$ac_ext, and return whether this succeeded.
2194ac_fn_c_try_compile ()
2195{
2196  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197  rm -f conftest.$ac_objext
2198  if { { ac_try="$ac_compile"
2199case "(($ac_try" in
2200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2201  *) ac_try_echo=$ac_try;;
2202esac
2203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2204$as_echo "$ac_try_echo"; } >&5
2205  (eval "$ac_compile") 2>conftest.err
2206  ac_status=$?
2207  if test -s conftest.err; then
2208    grep -v '^ *+' conftest.err >conftest.er1
2209    cat conftest.er1 >&5
2210    mv -f conftest.er1 conftest.err
2211  fi
2212  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2213  test $ac_status = 0; } && {
2214	 test -z "$ac_c_werror_flag" ||
2215	 test ! -s conftest.err
2216       } && test -s conftest.$ac_objext; then :
2217  ac_retval=0
2218else
2219  $as_echo "$as_me: failed program was:" >&5
2220sed 's/^/| /' conftest.$ac_ext >&5
2221
2222	ac_retval=1
2223fi
2224  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2225  as_fn_set_status $ac_retval
2226
2227} # ac_fn_c_try_compile
2228
2229# ac_fn_cxx_try_compile LINENO
2230# ----------------------------
2231# Try to compile conftest.$ac_ext, and return whether this succeeded.
2232ac_fn_cxx_try_compile ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  rm -f conftest.$ac_objext
2236  if { { ac_try="$ac_compile"
2237case "(($ac_try" in
2238  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2239  *) ac_try_echo=$ac_try;;
2240esac
2241eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2242$as_echo "$ac_try_echo"; } >&5
2243  (eval "$ac_compile") 2>conftest.err
2244  ac_status=$?
2245  if test -s conftest.err; then
2246    grep -v '^ *+' conftest.err >conftest.er1
2247    cat conftest.er1 >&5
2248    mv -f conftest.er1 conftest.err
2249  fi
2250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2251  test $ac_status = 0; } && {
2252	 test -z "$ac_cxx_werror_flag" ||
2253	 test ! -s conftest.err
2254       } && test -s conftest.$ac_objext; then :
2255  ac_retval=0
2256else
2257  $as_echo "$as_me: failed program was:" >&5
2258sed 's/^/| /' conftest.$ac_ext >&5
2259
2260	ac_retval=1
2261fi
2262  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263  as_fn_set_status $ac_retval
2264
2265} # ac_fn_cxx_try_compile
2266
2267# ac_fn_c_try_cpp LINENO
2268# ----------------------
2269# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2270ac_fn_c_try_cpp ()
2271{
2272  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273  if { { ac_try="$ac_cpp conftest.$ac_ext"
2274case "(($ac_try" in
2275  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2276  *) ac_try_echo=$ac_try;;
2277esac
2278eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2279$as_echo "$ac_try_echo"; } >&5
2280  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2281  ac_status=$?
2282  if test -s conftest.err; then
2283    grep -v '^ *+' conftest.err >conftest.er1
2284    cat conftest.er1 >&5
2285    mv -f conftest.er1 conftest.err
2286  fi
2287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2288  test $ac_status = 0; } > conftest.i && {
2289	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2290	 test ! -s conftest.err
2291       }; then :
2292  ac_retval=0
2293else
2294  $as_echo "$as_me: failed program was:" >&5
2295sed 's/^/| /' conftest.$ac_ext >&5
2296
2297    ac_retval=1
2298fi
2299  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2300  as_fn_set_status $ac_retval
2301
2302} # ac_fn_c_try_cpp
2303
2304# ac_fn_cxx_try_cpp LINENO
2305# ------------------------
2306# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2307ac_fn_cxx_try_cpp ()
2308{
2309  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2310  if { { ac_try="$ac_cpp conftest.$ac_ext"
2311case "(($ac_try" in
2312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2313  *) ac_try_echo=$ac_try;;
2314esac
2315eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2316$as_echo "$ac_try_echo"; } >&5
2317  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2318  ac_status=$?
2319  if test -s conftest.err; then
2320    grep -v '^ *+' conftest.err >conftest.er1
2321    cat conftest.er1 >&5
2322    mv -f conftest.er1 conftest.err
2323  fi
2324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2325  test $ac_status = 0; } > conftest.i && {
2326	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2327	 test ! -s conftest.err
2328       }; then :
2329  ac_retval=0
2330else
2331  $as_echo "$as_me: failed program was:" >&5
2332sed 's/^/| /' conftest.$ac_ext >&5
2333
2334    ac_retval=1
2335fi
2336  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2337  as_fn_set_status $ac_retval
2338
2339} # ac_fn_cxx_try_cpp
2340
2341# ac_fn_c_try_link LINENO
2342# -----------------------
2343# Try to link conftest.$ac_ext, and return whether this succeeded.
2344ac_fn_c_try_link ()
2345{
2346  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2347  rm -f conftest.$ac_objext conftest$ac_exeext
2348  if { { ac_try="$ac_link"
2349case "(($ac_try" in
2350  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2351  *) ac_try_echo=$ac_try;;
2352esac
2353eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2354$as_echo "$ac_try_echo"; } >&5
2355  (eval "$ac_link") 2>conftest.err
2356  ac_status=$?
2357  if test -s conftest.err; then
2358    grep -v '^ *+' conftest.err >conftest.er1
2359    cat conftest.er1 >&5
2360    mv -f conftest.er1 conftest.err
2361  fi
2362  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2363  test $ac_status = 0; } && {
2364	 test -z "$ac_c_werror_flag" ||
2365	 test ! -s conftest.err
2366       } && test -s conftest$ac_exeext && {
2367	 test "$cross_compiling" = yes ||
2368	 test -x conftest$ac_exeext
2369       }; then :
2370  ac_retval=0
2371else
2372  $as_echo "$as_me: failed program was:" >&5
2373sed 's/^/| /' conftest.$ac_ext >&5
2374
2375	ac_retval=1
2376fi
2377  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2378  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2379  # interfere with the next link command; also delete a directory that is
2380  # left behind by Apple's compiler.  We do this before executing the actions.
2381  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2382  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2383  as_fn_set_status $ac_retval
2384
2385} # ac_fn_c_try_link
2386
2387# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2388# ---------------------------------------------------------
2389# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2390# the include files in INCLUDES and setting the cache variable VAR
2391# accordingly.
2392ac_fn_cxx_check_header_mongrel ()
2393{
2394  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395  if eval \${$3+:} false; then :
2396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2397$as_echo_n "checking for $2... " >&6; }
2398if eval \${$3+:} false; then :
2399  $as_echo_n "(cached) " >&6
2400fi
2401eval ac_res=\$$3
2402	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2403$as_echo "$ac_res" >&6; }
2404else
2405  # Is the header compilable?
2406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2407$as_echo_n "checking $2 usability... " >&6; }
2408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409/* end confdefs.h.  */
2410$4
2411#include <$2>
2412_ACEOF
2413if ac_fn_cxx_try_compile "$LINENO"; then :
2414  ac_header_compiler=yes
2415else
2416  ac_header_compiler=no
2417fi
2418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2420$as_echo "$ac_header_compiler" >&6; }
2421
2422# Is the header present?
2423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2424$as_echo_n "checking $2 presence... " >&6; }
2425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h.  */
2427#include <$2>
2428_ACEOF
2429if ac_fn_cxx_try_cpp "$LINENO"; then :
2430  ac_header_preproc=yes
2431else
2432  ac_header_preproc=no
2433fi
2434rm -f conftest.err conftest.i conftest.$ac_ext
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2436$as_echo "$ac_header_preproc" >&6; }
2437
2438# So?  What about this header?
2439case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2440  yes:no: )
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2442$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2444$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2445    ;;
2446  no:yes:* )
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2448$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2450$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2452$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2454$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2456$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2457( $as_echo "## ----------------------------------------- ##
2458## Report this to build-dev@openjdk.java.net ##
2459## ----------------------------------------- ##"
2460     ) | sed "s/^/$as_me: WARNING:     /" >&2
2461    ;;
2462esac
2463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2464$as_echo_n "checking for $2... " >&6; }
2465if eval \${$3+:} false; then :
2466  $as_echo_n "(cached) " >&6
2467else
2468  eval "$3=\$ac_header_compiler"
2469fi
2470eval ac_res=\$$3
2471	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2472$as_echo "$ac_res" >&6; }
2473fi
2474  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2475
2476} # ac_fn_cxx_check_header_mongrel
2477
2478# ac_fn_cxx_try_run LINENO
2479# ------------------------
2480# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2481# that executables *can* be run.
2482ac_fn_cxx_try_run ()
2483{
2484  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2485  if { { ac_try="$ac_link"
2486case "(($ac_try" in
2487  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2488  *) ac_try_echo=$ac_try;;
2489esac
2490eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2491$as_echo "$ac_try_echo"; } >&5
2492  (eval "$ac_link") 2>&5
2493  ac_status=$?
2494  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2495  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2496  { { case "(($ac_try" in
2497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498  *) ac_try_echo=$ac_try;;
2499esac
2500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501$as_echo "$ac_try_echo"; } >&5
2502  (eval "$ac_try") 2>&5
2503  ac_status=$?
2504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2505  test $ac_status = 0; }; }; then :
2506  ac_retval=0
2507else
2508  $as_echo "$as_me: program exited with status $ac_status" >&5
2509       $as_echo "$as_me: failed program was:" >&5
2510sed 's/^/| /' conftest.$ac_ext >&5
2511
2512       ac_retval=$ac_status
2513fi
2514  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2515  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516  as_fn_set_status $ac_retval
2517
2518} # ac_fn_cxx_try_run
2519
2520# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2521# ---------------------------------------------------------
2522# Tests whether HEADER exists and can be compiled using the include files in
2523# INCLUDES, setting the cache variable VAR accordingly.
2524ac_fn_cxx_check_header_compile ()
2525{
2526  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2528$as_echo_n "checking for $2... " >&6; }
2529if eval \${$3+:} false; then :
2530  $as_echo_n "(cached) " >&6
2531else
2532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533/* end confdefs.h.  */
2534$4
2535#include <$2>
2536_ACEOF
2537if ac_fn_cxx_try_compile "$LINENO"; then :
2538  eval "$3=yes"
2539else
2540  eval "$3=no"
2541fi
2542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2543fi
2544eval ac_res=\$$3
2545	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2546$as_echo "$ac_res" >&6; }
2547  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2548
2549} # ac_fn_cxx_check_header_compile
2550
2551# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2552# ----------------------------------------------
2553# Tries to find the compile-time value of EXPR in a program that includes
2554# INCLUDES, setting VAR accordingly. Returns whether the value could be
2555# computed
2556ac_fn_cxx_compute_int ()
2557{
2558  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2559  if test "$cross_compiling" = yes; then
2560    # Depending upon the size, compute the lo and hi bounds.
2561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h.  */
2563$4
2564int
2565main ()
2566{
2567static int test_array [1 - 2 * !(($2) >= 0)];
2568test_array [0] = 0;
2569return test_array [0];
2570
2571  ;
2572  return 0;
2573}
2574_ACEOF
2575if ac_fn_cxx_try_compile "$LINENO"; then :
2576  ac_lo=0 ac_mid=0
2577  while :; do
2578    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2579/* end confdefs.h.  */
2580$4
2581int
2582main ()
2583{
2584static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2585test_array [0] = 0;
2586return test_array [0];
2587
2588  ;
2589  return 0;
2590}
2591_ACEOF
2592if ac_fn_cxx_try_compile "$LINENO"; then :
2593  ac_hi=$ac_mid; break
2594else
2595  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2596			if test $ac_lo -le $ac_mid; then
2597			  ac_lo= ac_hi=
2598			  break
2599			fi
2600			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2601fi
2602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2603  done
2604else
2605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2606/* end confdefs.h.  */
2607$4
2608int
2609main ()
2610{
2611static int test_array [1 - 2 * !(($2) < 0)];
2612test_array [0] = 0;
2613return test_array [0];
2614
2615  ;
2616  return 0;
2617}
2618_ACEOF
2619if ac_fn_cxx_try_compile "$LINENO"; then :
2620  ac_hi=-1 ac_mid=-1
2621  while :; do
2622    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h.  */
2624$4
2625int
2626main ()
2627{
2628static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2629test_array [0] = 0;
2630return test_array [0];
2631
2632  ;
2633  return 0;
2634}
2635_ACEOF
2636if ac_fn_cxx_try_compile "$LINENO"; then :
2637  ac_lo=$ac_mid; break
2638else
2639  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2640			if test $ac_mid -le $ac_hi; then
2641			  ac_lo= ac_hi=
2642			  break
2643			fi
2644			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2645fi
2646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2647  done
2648else
2649  ac_lo= ac_hi=
2650fi
2651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2652fi
2653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2654# Binary search between lo and hi bounds.
2655while test "x$ac_lo" != "x$ac_hi"; do
2656  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2658/* end confdefs.h.  */
2659$4
2660int
2661main ()
2662{
2663static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2664test_array [0] = 0;
2665return test_array [0];
2666
2667  ;
2668  return 0;
2669}
2670_ACEOF
2671if ac_fn_cxx_try_compile "$LINENO"; then :
2672  ac_hi=$ac_mid
2673else
2674  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2675fi
2676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2677done
2678case $ac_lo in #((
2679?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2680'') ac_retval=1 ;;
2681esac
2682  else
2683    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684/* end confdefs.h.  */
2685$4
2686static long int longval () { return $2; }
2687static unsigned long int ulongval () { return $2; }
2688#include <stdio.h>
2689#include <stdlib.h>
2690int
2691main ()
2692{
2693
2694  FILE *f = fopen ("conftest.val", "w");
2695  if (! f)
2696    return 1;
2697  if (($2) < 0)
2698    {
2699      long int i = longval ();
2700      if (i != ($2))
2701	return 1;
2702      fprintf (f, "%ld", i);
2703    }
2704  else
2705    {
2706      unsigned long int i = ulongval ();
2707      if (i != ($2))
2708	return 1;
2709      fprintf (f, "%lu", i);
2710    }
2711  /* Do not output a trailing newline, as this causes \r\n confusion
2712     on some platforms.  */
2713  return ferror (f) || fclose (f) != 0;
2714
2715  ;
2716  return 0;
2717}
2718_ACEOF
2719if ac_fn_cxx_try_run "$LINENO"; then :
2720  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2721else
2722  ac_retval=1
2723fi
2724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2725  conftest.$ac_objext conftest.beam conftest.$ac_ext
2726rm -f conftest.val
2727
2728  fi
2729  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2730  as_fn_set_status $ac_retval
2731
2732} # ac_fn_cxx_compute_int
2733
2734# ac_fn_cxx_try_link LINENO
2735# -------------------------
2736# Try to link conftest.$ac_ext, and return whether this succeeded.
2737ac_fn_cxx_try_link ()
2738{
2739  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2740  rm -f conftest.$ac_objext conftest$ac_exeext
2741  if { { ac_try="$ac_link"
2742case "(($ac_try" in
2743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2744  *) ac_try_echo=$ac_try;;
2745esac
2746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2747$as_echo "$ac_try_echo"; } >&5
2748  (eval "$ac_link") 2>conftest.err
2749  ac_status=$?
2750  if test -s conftest.err; then
2751    grep -v '^ *+' conftest.err >conftest.er1
2752    cat conftest.er1 >&5
2753    mv -f conftest.er1 conftest.err
2754  fi
2755  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2756  test $ac_status = 0; } && {
2757	 test -z "$ac_cxx_werror_flag" ||
2758	 test ! -s conftest.err
2759       } && test -s conftest$ac_exeext && {
2760	 test "$cross_compiling" = yes ||
2761	 test -x conftest$ac_exeext
2762       }; then :
2763  ac_retval=0
2764else
2765  $as_echo "$as_me: failed program was:" >&5
2766sed 's/^/| /' conftest.$ac_ext >&5
2767
2768	ac_retval=1
2769fi
2770  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2771  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2772  # interfere with the next link command; also delete a directory that is
2773  # left behind by Apple's compiler.  We do this before executing the actions.
2774  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2775  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2776  as_fn_set_status $ac_retval
2777
2778} # ac_fn_cxx_try_link
2779
2780# ac_fn_cxx_check_func LINENO FUNC VAR
2781# ------------------------------------
2782# Tests whether FUNC exists, setting the cache variable VAR accordingly
2783ac_fn_cxx_check_func ()
2784{
2785  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2787$as_echo_n "checking for $2... " >&6; }
2788if eval \${$3+:} false; then :
2789  $as_echo_n "(cached) " >&6
2790else
2791  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2792/* end confdefs.h.  */
2793/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2794   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2795#define $2 innocuous_$2
2796
2797/* System header to define __stub macros and hopefully few prototypes,
2798    which can conflict with char $2 (); below.
2799    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2800    <limits.h> exists even on freestanding compilers.  */
2801
2802#ifdef __STDC__
2803# include <limits.h>
2804#else
2805# include <assert.h>
2806#endif
2807
2808#undef $2
2809
2810/* Override any GCC internal prototype to avoid an error.
2811   Use char because int might match the return type of a GCC
2812   builtin and then its argument prototype would still apply.  */
2813#ifdef __cplusplus
2814extern "C"
2815#endif
2816char $2 ();
2817/* The GNU C library defines this for functions which it implements
2818    to always fail with ENOSYS.  Some functions are actually named
2819    something starting with __ and the normal name is an alias.  */
2820#if defined __stub_$2 || defined __stub___$2
2821choke me
2822#endif
2823
2824int
2825main ()
2826{
2827return $2 ();
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_link "$LINENO"; then :
2833  eval "$3=yes"
2834else
2835  eval "$3=no"
2836fi
2837rm -f core conftest.err conftest.$ac_objext \
2838    conftest$ac_exeext conftest.$ac_ext
2839fi
2840eval ac_res=\$$3
2841	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2842$as_echo "$ac_res" >&6; }
2843  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2844
2845} # ac_fn_cxx_check_func
2846
2847# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2848# -------------------------------------------------------
2849# Tests whether HEADER exists and can be compiled using the include files in
2850# INCLUDES, setting the cache variable VAR accordingly.
2851ac_fn_c_check_header_compile ()
2852{
2853  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2855$as_echo_n "checking for $2... " >&6; }
2856if eval \${$3+:} false; then :
2857  $as_echo_n "(cached) " >&6
2858else
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861$4
2862#include <$2>
2863_ACEOF
2864if ac_fn_c_try_compile "$LINENO"; then :
2865  eval "$3=yes"
2866else
2867  eval "$3=no"
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871eval ac_res=\$$3
2872	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2873$as_echo "$ac_res" >&6; }
2874  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2875
2876} # ac_fn_c_check_header_compile
2877cat >config.log <<_ACEOF
2878This file contains any messages produced by compilers while
2879running configure, to aid debugging if configure makes a mistake.
2880
2881It was created by OpenJDK $as_me jdk9, which was
2882generated by GNU Autoconf 2.69.  Invocation command line was
2883
2884  $ $0 $@
2885
2886_ACEOF
2887exec 5>>config.log
2888{
2889cat <<_ASUNAME
2890## --------- ##
2891## Platform. ##
2892## --------- ##
2893
2894hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2895uname -m = `(uname -m) 2>/dev/null || echo unknown`
2896uname -r = `(uname -r) 2>/dev/null || echo unknown`
2897uname -s = `(uname -s) 2>/dev/null || echo unknown`
2898uname -v = `(uname -v) 2>/dev/null || echo unknown`
2899
2900/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2901/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2902
2903/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2904/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2905/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2906/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2907/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2908/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2909/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2910
2911_ASUNAME
2912
2913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2914for as_dir in $PATH
2915do
2916  IFS=$as_save_IFS
2917  test -z "$as_dir" && as_dir=.
2918    $as_echo "PATH: $as_dir"
2919  done
2920IFS=$as_save_IFS
2921
2922} >&5
2923
2924cat >&5 <<_ACEOF
2925
2926
2927## ----------- ##
2928## Core tests. ##
2929## ----------- ##
2930
2931_ACEOF
2932
2933
2934# Keep a trace of the command line.
2935# Strip out --no-create and --no-recursion so they do not pile up.
2936# Strip out --silent because we don't want to record it for future runs.
2937# Also quote any args containing shell meta-characters.
2938# Make two passes to allow for proper duplicate-argument suppression.
2939ac_configure_args=
2940ac_configure_args0=
2941ac_configure_args1=
2942ac_must_keep_next=false
2943for ac_pass in 1 2
2944do
2945  for ac_arg
2946  do
2947    case $ac_arg in
2948    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2949    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2950    | -silent | --silent | --silen | --sile | --sil)
2951      continue ;;
2952    *\'*)
2953      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2954    esac
2955    case $ac_pass in
2956    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2957    2)
2958      as_fn_append ac_configure_args1 " '$ac_arg'"
2959      if test $ac_must_keep_next = true; then
2960	ac_must_keep_next=false # Got value, back to normal.
2961      else
2962	case $ac_arg in
2963	  *=* | --config-cache | -C | -disable-* | --disable-* \
2964	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2965	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2966	  | -with-* | --with-* | -without-* | --without-* | --x)
2967	    case "$ac_configure_args0 " in
2968	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2969	    esac
2970	    ;;
2971	  -* ) ac_must_keep_next=true ;;
2972	esac
2973      fi
2974      as_fn_append ac_configure_args " '$ac_arg'"
2975      ;;
2976    esac
2977  done
2978done
2979{ ac_configure_args0=; unset ac_configure_args0;}
2980{ ac_configure_args1=; unset ac_configure_args1;}
2981
2982# When interrupted or exit'd, cleanup temporary files, and complete
2983# config.log.  We remove comments because anyway the quotes in there
2984# would cause problems or look ugly.
2985# WARNING: Use '\'' to represent an apostrophe within the trap.
2986# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2987trap 'exit_status=$?
2988  # Save into config.log some information that might help in debugging.
2989  {
2990    echo
2991
2992    $as_echo "## ---------------- ##
2993## Cache variables. ##
2994## ---------------- ##"
2995    echo
2996    # The following way of writing the cache mishandles newlines in values,
2997(
2998  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2999    eval ac_val=\$$ac_var
3000    case $ac_val in #(
3001    *${as_nl}*)
3002      case $ac_var in #(
3003      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3004$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3005      esac
3006      case $ac_var in #(
3007      _ | IFS | as_nl) ;; #(
3008      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3009      *) { eval $ac_var=; unset $ac_var;} ;;
3010      esac ;;
3011    esac
3012  done
3013  (set) 2>&1 |
3014    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3015    *${as_nl}ac_space=\ *)
3016      sed -n \
3017	"s/'\''/'\''\\\\'\'''\''/g;
3018	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3019      ;; #(
3020    *)
3021      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3022      ;;
3023    esac |
3024    sort
3025)
3026    echo
3027
3028    $as_echo "## ----------------- ##
3029## Output variables. ##
3030## ----------------- ##"
3031    echo
3032    for ac_var in $ac_subst_vars
3033    do
3034      eval ac_val=\$$ac_var
3035      case $ac_val in
3036      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3037      esac
3038      $as_echo "$ac_var='\''$ac_val'\''"
3039    done | sort
3040    echo
3041
3042    if test -n "$ac_subst_files"; then
3043      $as_echo "## ------------------- ##
3044## File substitutions. ##
3045## ------------------- ##"
3046      echo
3047      for ac_var in $ac_subst_files
3048      do
3049	eval ac_val=\$$ac_var
3050	case $ac_val in
3051	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3052	esac
3053	$as_echo "$ac_var='\''$ac_val'\''"
3054      done | sort
3055      echo
3056    fi
3057
3058    if test -s confdefs.h; then
3059      $as_echo "## ----------- ##
3060## confdefs.h. ##
3061## ----------- ##"
3062      echo
3063      cat confdefs.h
3064      echo
3065    fi
3066    test "$ac_signal" != 0 &&
3067      $as_echo "$as_me: caught signal $ac_signal"
3068    $as_echo "$as_me: exit $exit_status"
3069  } >&5
3070  rm -f core *.core core.conftest.* &&
3071    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3072    exit $exit_status
3073' 0
3074for ac_signal in 1 2 13 15; do
3075  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3076done
3077ac_signal=0
3078
3079# confdefs.h avoids OS command line length limits that DEFS can exceed.
3080rm -f -r conftest* confdefs.h
3081
3082$as_echo "/* confdefs.h */" > confdefs.h
3083
3084# Predefined preprocessor variables.
3085
3086cat >>confdefs.h <<_ACEOF
3087#define PACKAGE_NAME "$PACKAGE_NAME"
3088_ACEOF
3089
3090cat >>confdefs.h <<_ACEOF
3091#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3092_ACEOF
3093
3094cat >>confdefs.h <<_ACEOF
3095#define PACKAGE_VERSION "$PACKAGE_VERSION"
3096_ACEOF
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_STRING "$PACKAGE_STRING"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_URL "$PACKAGE_URL"
3108_ACEOF
3109
3110
3111# Let the site file select an alternate cache file if it wants to.
3112# Prefer an explicitly selected file to automatically selected ones.
3113ac_site_file1=NONE
3114ac_site_file2=NONE
3115if test -n "$CONFIG_SITE"; then
3116  # We do not want a PATH search for config.site.
3117  case $CONFIG_SITE in #((
3118    -*)  ac_site_file1=./$CONFIG_SITE;;
3119    */*) ac_site_file1=$CONFIG_SITE;;
3120    *)   ac_site_file1=./$CONFIG_SITE;;
3121  esac
3122elif test "x$prefix" != xNONE; then
3123  ac_site_file1=$prefix/share/config.site
3124  ac_site_file2=$prefix/etc/config.site
3125else
3126  ac_site_file1=$ac_default_prefix/share/config.site
3127  ac_site_file2=$ac_default_prefix/etc/config.site
3128fi
3129for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3130do
3131  test "x$ac_site_file" = xNONE && continue
3132  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3133    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3134$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3135    sed 's/^/| /' "$ac_site_file" >&5
3136    . "$ac_site_file" \
3137      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3139as_fn_error $? "failed to load site script $ac_site_file
3140See \`config.log' for more details" "$LINENO" 5; }
3141  fi
3142done
3143
3144if test -r "$cache_file"; then
3145  # Some versions of bash will fail to source /dev/null (special files
3146  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3147  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3148    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3149$as_echo "$as_me: loading cache $cache_file" >&6;}
3150    case $cache_file in
3151      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3152      *)                      . "./$cache_file";;
3153    esac
3154  fi
3155else
3156  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3157$as_echo "$as_me: creating cache $cache_file" >&6;}
3158  >$cache_file
3159fi
3160
3161# Check that the precious variables saved in the cache have kept the same
3162# value.
3163ac_cache_corrupted=false
3164for ac_var in $ac_precious_vars; do
3165  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3166  eval ac_new_set=\$ac_env_${ac_var}_set
3167  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3168  eval ac_new_val=\$ac_env_${ac_var}_value
3169  case $ac_old_set,$ac_new_set in
3170    set,)
3171      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3172$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3173      ac_cache_corrupted=: ;;
3174    ,set)
3175      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3176$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3177      ac_cache_corrupted=: ;;
3178    ,);;
3179    *)
3180      if test "x$ac_old_val" != "x$ac_new_val"; then
3181	# differences in whitespace do not lead to failure.
3182	ac_old_val_w=`echo x $ac_old_val`
3183	ac_new_val_w=`echo x $ac_new_val`
3184	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3185	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3186$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3187	  ac_cache_corrupted=:
3188	else
3189	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3190$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3191	  eval $ac_var=\$ac_old_val
3192	fi
3193	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3194$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3195	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3196$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3197      fi;;
3198  esac
3199  # Pass precious variables to config.status.
3200  if test "$ac_new_set" = set; then
3201    case $ac_new_val in
3202    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3203    *) ac_arg=$ac_var=$ac_new_val ;;
3204    esac
3205    case " $ac_configure_args " in
3206      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3207      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3208    esac
3209  fi
3210done
3211if $ac_cache_corrupted; then
3212  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3213$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3214  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3215$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3216  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3217fi
3218## -------------------- ##
3219## Main body of script. ##
3220## -------------------- ##
3221
3222ac_ext=c
3223ac_cpp='$CPP $CPPFLAGS'
3224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226ac_compiler_gnu=$ac_cv_c_compiler_gnu
3227
3228
3229
3230ac_aux_dir=
3231for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3232  if test -f "$ac_dir/install-sh"; then
3233    ac_aux_dir=$ac_dir
3234    ac_install_sh="$ac_aux_dir/install-sh -c"
3235    break
3236  elif test -f "$ac_dir/install.sh"; then
3237    ac_aux_dir=$ac_dir
3238    ac_install_sh="$ac_aux_dir/install.sh -c"
3239    break
3240  elif test -f "$ac_dir/shtool"; then
3241    ac_aux_dir=$ac_dir
3242    ac_install_sh="$ac_aux_dir/shtool install -c"
3243    break
3244  fi
3245done
3246if test -z "$ac_aux_dir"; then
3247  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
3248fi
3249
3250# These three variables are undocumented and unsupported,
3251# and are intended to be withdrawn in a future Autoconf release.
3252# They can cause serious problems if a builder's source tree is in a directory
3253# whose full name contains unusual characters.
3254ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3255ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3256ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3257
3258
3259# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3260
3261#
3262# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3264#
3265# This code is free software; you can redistribute it and/or modify it
3266# under the terms of the GNU General Public License version 2 only, as
3267# published by the Free Software Foundation.  Oracle designates this
3268# particular file as subject to the "Classpath" exception as provided
3269# by Oracle in the LICENSE file that accompanied this code.
3270#
3271# This code is distributed in the hope that it will be useful, but WITHOUT
3272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3274# version 2 for more details (a copy is included in the LICENSE file that
3275# accompanied this code).
3276#
3277# You should have received a copy of the GNU General Public License version
3278# 2 along with this work; if not, write to the Free Software Foundation,
3279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3280#
3281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3282# or visit www.oracle.com if you need additional information or have any
3283# questions.
3284#
3285
3286#
3287# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3288#
3289# This program is free software; you can redistribute it and/or modify
3290# it under the terms of the GNU General Public License as published by
3291# the Free Software Foundation; either version 2 of the License, or
3292# (at your option) any later version.
3293#
3294# This program is distributed in the hope that it will be useful, but
3295# WITHOUT ANY WARRANTY; without even the implied warranty of
3296# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3297# General Public License for more details.
3298#
3299# You should have received a copy of the GNU General Public License
3300# along with this program; if not, write to the Free Software
3301# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3302#
3303# As a special exception to the GNU General Public License, if you
3304# distribute this file as part of a program that contains a
3305# configuration script generated by Autoconf, you may include it under
3306# the same distribution terms that you use for the rest of that program.
3307
3308# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3309# ----------------------------------
3310# PKG_PROG_PKG_CONFIG
3311
3312# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3313#
3314# Check to see whether a particular set of modules exists.  Similar
3315# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3316#
3317#
3318# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3319# this or PKG_CHECK_MODULES is called, or make sure to call
3320# PKG_CHECK_EXISTS manually
3321# --------------------------------------------------------------
3322
3323
3324
3325# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3326# ---------------------------------------------
3327# _PKG_CONFIG
3328
3329# _PKG_SHORT_ERRORS_SUPPORTED
3330# -----------------------------
3331# _PKG_SHORT_ERRORS_SUPPORTED
3332
3333
3334# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3335# [ACTION-IF-NOT-FOUND])
3336#
3337#
3338# Note that if there is a possibility the first call to
3339# PKG_CHECK_MODULES might not happen, you should be sure to include an
3340# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3341#
3342#
3343# --------------------------------------------------------------
3344# PKG_CHECK_MODULES
3345
3346
3347# Include these first...
3348#
3349# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3350# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3351#
3352# This code is free software; you can redistribute it and/or modify it
3353# under the terms of the GNU General Public License version 2 only, as
3354# published by the Free Software Foundation.  Oracle designates this
3355# particular file as subject to the "Classpath" exception as provided
3356# by Oracle in the LICENSE file that accompanied this code.
3357#
3358# This code is distributed in the hope that it will be useful, but WITHOUT
3359# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3360# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3361# version 2 for more details (a copy is included in the LICENSE file that
3362# accompanied this code).
3363#
3364# You should have received a copy of the GNU General Public License version
3365# 2 along with this work; if not, write to the Free Software Foundation,
3366# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3367#
3368# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3369# or visit www.oracle.com if you need additional information or have any
3370# questions.
3371#
3372
3373# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3374# If so, then append $1 to $2 \
3375# Also set JVM_ARG_OK to true/false depending on outcome.
3376
3377
3378# Appends a string to a path variable, only adding the : when needed.
3379
3380
3381# Prepends a string to a path variable, only adding the : when needed.
3382
3383
3384# This will make sure the given variable points to a full and proper
3385# path. This means:
3386# 1) There will be no spaces in the path. On unix platforms,
3387#    spaces in the path will result in an error. On Windows,
3388#    the path will be rewritten using short-style to be space-free.
3389# 2) The path will be absolute, and it will be in unix-style (on
3390#     cygwin).
3391# $1: The name of the variable to fix
3392
3393
3394# This will make sure the given variable points to a executable
3395# with a full and proper path. This means:
3396# 1) There will be no spaces in the path. On unix platforms,
3397#    spaces in the path will result in an error. On Windows,
3398#    the path will be rewritten using short-style to be space-free.
3399# 2) The path will be absolute, and it will be in unix-style (on
3400#     cygwin).
3401# Any arguments given to the executable is preserved.
3402# If the input variable does not have a directory specification, then
3403# it need to be in the PATH.
3404# $1: The name of the variable to fix
3405
3406
3407
3408
3409# Register a --with argument but mark it as deprecated
3410# $1: The name of the with argument to deprecate, not including --with-
3411
3412
3413# Register a --enable argument but mark it as deprecated
3414# $1: The name of the with argument to deprecate, not including --enable-
3415# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3416
3417
3418
3419
3420# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3421# $1: variable to check
3422
3423
3424# Check that there are no unprocessed overridden variables left.
3425# If so, they are an incorrect argument and we will exit with an error.
3426
3427
3428# Setup a tool for the given variable. If correctly specified by the user,
3429# use that value, otherwise search for the tool using the supplied code snippet.
3430# $1: variable to set
3431# $2: code snippet to call to look for the tool
3432
3433
3434# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3435# $1: variable to set
3436# $2: executable name (or list of names) to look for
3437
3438
3439# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3440# $1: variable to set
3441# $2: executable name (or list of names) to look for
3442
3443
3444# Like BASIC_PATH_PROGS but fails if no tool was found.
3445# $1: variable to set
3446# $2: executable name (or list of names) to look for
3447
3448
3449# Like BASIC_SETUP_TOOL but fails if no tool was found.
3450# $1: variable to set
3451# $2: autoconf macro to call to look for the special tool
3452
3453
3454# Setup the most fundamental tools that relies on not much else to set up,
3455# but is used by much of the early bootstrap code.
3456
3457
3458# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3459
3460
3461# Evaluates platform specific overrides for devkit variables.
3462# $1: Name of variable
3463
3464
3465
3466
3467
3468
3469#%%% Simple tools %%%
3470
3471# Check if we have found a usable version of make
3472# $1: the path to a potential make binary (or empty)
3473# $2: the description on how we found this
3474
3475
3476
3477
3478# Goes looking for a usable version of GNU make.
3479
3480
3481
3482
3483
3484
3485# Check if build directory is on local disk. If not possible to determine,
3486# we prefer to claim it's local.
3487# Argument 1: directory to test
3488# Argument 2: what to do if it is on local disk
3489# Argument 3: what to do otherwise (remote disk or failure)
3490
3491
3492# Check that source files have basic read permissions set. This might
3493# not be the case in cygwin in certain conditions.
3494
3495
3496
3497
3498# Check for support for specific options in bash
3499
3500
3501# Code to run after AC_OUTPUT
3502
3503
3504#
3505# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3506# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3507#
3508# This code is free software; you can redistribute it and/or modify it
3509# under the terms of the GNU General Public License version 2 only, as
3510# published by the Free Software Foundation.  Oracle designates this
3511# particular file as subject to the "Classpath" exception as provided
3512# by Oracle in the LICENSE file that accompanied this code.
3513#
3514# This code is distributed in the hope that it will be useful, but WITHOUT
3515# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3516# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3517# version 2 for more details (a copy is included in the LICENSE file that
3518# accompanied this code).
3519#
3520# You should have received a copy of the GNU General Public License version
3521# 2 along with this work; if not, write to the Free Software Foundation,
3522# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3523#
3524# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3525# or visit www.oracle.com if you need additional information or have any
3526# questions.
3527#
3528
3529
3530
3531
3532
3533# Helper function which possibly converts a path using DOS-style short mode.
3534# If so, the updated path is stored in $new_path.
3535# $1: The path to check
3536
3537
3538# Helper function which possibly converts a path using DOS-style short mode.
3539# If so, the updated path is stored in $new_path.
3540# $1: The path to check
3541
3542
3543# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3544# and could probably be heavily simplified. However, all changes in this
3545# area tend to need lot of testing in different scenarios, and in lack of
3546# proper unit testing, cleaning this up has not been deemed worth the effort
3547# at the moment.
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3558
3559
3560
3561
3562#
3563# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3565#
3566# This code is free software; you can redistribute it and/or modify it
3567# under the terms of the GNU General Public License version 2 only, as
3568# published by the Free Software Foundation.  Oracle designates this
3569# particular file as subject to the "Classpath" exception as provided
3570# by Oracle in the LICENSE file that accompanied this code.
3571#
3572# This code is distributed in the hope that it will be useful, but WITHOUT
3573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3575# version 2 for more details (a copy is included in the LICENSE file that
3576# accompanied this code).
3577#
3578# You should have received a copy of the GNU General Public License version
3579# 2 along with this work; if not, write to the Free Software Foundation,
3580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3581#
3582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3583# or visit www.oracle.com if you need additional information or have any
3584# questions.
3585#
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597# ... then the rest
3598#
3599# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3600# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3601#
3602# This code is free software; you can redistribute it and/or modify it
3603# under the terms of the GNU General Public License version 2 only, as
3604# published by the Free Software Foundation.  Oracle designates this
3605# particular file as subject to the "Classpath" exception as provided
3606# by Oracle in the LICENSE file that accompanied this code.
3607#
3608# This code is distributed in the hope that it will be useful, but WITHOUT
3609# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3610# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3611# version 2 for more details (a copy is included in the LICENSE file that
3612# accompanied this code).
3613#
3614# You should have received a copy of the GNU General Public License version
3615# 2 along with this work; if not, write to the Free Software Foundation,
3616# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3617#
3618# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3619# or visit www.oracle.com if you need additional information or have any
3620# questions.
3621#
3622
3623########################################################################
3624# This file handles detection of the Boot JDK. The Boot JDK detection
3625# process has been developed as a response to solve a complex real-world
3626# problem. Initially, it was simple, but it has grown as platform after
3627# platform, idiosyncracy after idiosyncracy has been supported.
3628#
3629# The basic idea is this:
3630# 1) You need an acceptable *) JDK to use as a Boot JDK
3631# 2) There are several ways to locate a JDK, that are mostly platform
3632#    dependent **)
3633# 3) You can have multiple JDKs installed
3634# 4) If possible, configure should try to dig out an acceptable JDK
3635#    automatically, without having to resort to command-line options
3636#
3637# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3638#     javac) and not a JRE, etc.
3639#
3640# **) On Windows we typically use a well-known path.
3641#     On MacOSX we typically use the tool java_home.
3642#     On Linux we typically find javac in the $PATH, and then follow a
3643#     chain of symlinks that often ends up in a real JDK.
3644#
3645# This leads to the code where we check in different ways to locate a
3646# JDK, and if one is found, check if it is acceptable. If not, we print
3647# our reasons for rejecting it (useful when debugging non-working
3648# configure situations) and continue checking the next one.
3649########################################################################
3650
3651# Execute the check given as argument, and verify the result
3652# If the Boot JDK was previously found, do nothing
3653# $1 A command line (typically autoconf macro) to execute
3654
3655
3656# Test: Is bootjdk explicitely set by command line arguments?
3657
3658
3659# Test: Is bootjdk available from builddeps?
3660
3661
3662# Test: Is $JAVA_HOME set?
3663
3664
3665# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3666
3667
3668# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3669# $1: Argument to the java_home binary (optional)
3670
3671
3672# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3673
3674
3675# Look for a jdk in the given path. If there are multiple, try to select the newest.
3676# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3677# $1 = Path to directory containing jdk installations.
3678# $2 = String to append to the found JDK directory to get the proper JDK home
3679
3680
3681# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3682# environmental variable as base for where to look.
3683# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3684
3685
3686# Test: Is there a JDK installed in default, well-known locations?
3687
3688
3689# Check that a command-line tool in the Boot JDK is correct
3690# $1 = name of variable to assign
3691# $2 = name of binary
3692
3693
3694###############################################################################
3695#
3696# We need a Boot JDK to bootstrap the build.
3697#
3698
3699
3700
3701
3702
3703#
3704# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3705# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3706#
3707# This code is free software; you can redistribute it and/or modify it
3708# under the terms of the GNU General Public License version 2 only, as
3709# published by the Free Software Foundation.  Oracle designates this
3710# particular file as subject to the "Classpath" exception as provided
3711# by Oracle in the LICENSE file that accompanied this code.
3712#
3713# This code is distributed in the hope that it will be useful, but WITHOUT
3714# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3715# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3716# version 2 for more details (a copy is included in the LICENSE file that
3717# accompanied this code).
3718#
3719# You should have received a copy of the GNU General Public License version
3720# 2 along with this work; if not, write to the Free Software Foundation,
3721# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3722#
3723# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3724# or visit www.oracle.com if you need additional information or have any
3725# questions.
3726#
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747#
3748# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3749# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3750#
3751# This code is free software; you can redistribute it and/or modify it
3752# under the terms of the GNU General Public License version 2 only, as
3753# published by the Free Software Foundation.  Oracle designates this
3754# particular file as subject to the "Classpath" exception as provided
3755# by Oracle in the LICENSE file that accompanied this code.
3756#
3757# This code is distributed in the hope that it will be useful, but WITHOUT
3758# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3759# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3760# version 2 for more details (a copy is included in the LICENSE file that
3761# accompanied this code).
3762#
3763# You should have received a copy of the GNU General Public License version
3764# 2 along with this work; if not, write to the Free Software Foundation,
3765# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3766#
3767# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3768# or visit www.oracle.com if you need additional information or have any
3769# questions.
3770#
3771
3772
3773
3774
3775
3776# Documentation on common flags used for solstudio in HIGHEST.
3777#
3778# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3779#          done with care, there are some assumptions below that need to
3780#          be understood about the use of pointers, and IEEE behavior.
3781#
3782# -fns: Use non-standard floating point mode (not IEEE 754)
3783# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3784# -fsingle: Use single precision floating point with 'float'
3785# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3786#   (Source with excessing pointer casting and data access with mixed
3787#    pointer types are not recommended)
3788# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3789#   (If you expect perfect errno behavior, do not use this)
3790# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3791# -xrestrict: Pointer parameters to functions do not overlap
3792#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3793#    If you pass in multiple pointers to the same data, do not use this)
3794# -xlibmil: Inline some library routines
3795#   (If you expect perfect errno behavior, do not use this)
3796# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3797#   (If you expect perfect errno behavior, do not use this)
3798#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3799
3800    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3801    # Bug?
3802    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3803    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3804    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3805    #fi
3806
3807
3808
3809
3810
3811# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3812#                                   [RUN-IF-FALSE])
3813# ------------------------------------------------------------
3814# Check that the c and c++ compilers support an argument
3815
3816
3817# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3818#                                    [RUN-IF-FALSE])
3819# ------------------------------------------------------------
3820# Check that the linker support an argument
3821
3822
3823
3824
3825#
3826# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3827# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3828#
3829# This code is free software; you can redistribute it and/or modify it
3830# under the terms of the GNU General Public License version 2 only, as
3831# published by the Free Software Foundation.  Oracle designates this
3832# particular file as subject to the "Classpath" exception as provided
3833# by Oracle in the LICENSE file that accompanied this code.
3834#
3835# This code is distributed in the hope that it will be useful, but WITHOUT
3836# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3837# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3838# version 2 for more details (a copy is included in the LICENSE file that
3839# accompanied this code).
3840#
3841# You should have received a copy of the GNU General Public License version
3842# 2 along with this work; if not, write to the Free Software Foundation,
3843# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3844#
3845# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3846# or visit www.oracle.com if you need additional information or have any
3847# questions.
3848#
3849
3850
3851
3852
3853
3854cygwin_help() {
3855  case $1 in
3856    unzip)
3857      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3858      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3859      ;;
3860    zip)
3861      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3862      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3863      ;;
3864    make)
3865      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3867      ;;
3868    freetype)
3869      HELP_MSG="
3870The freetype library can now be build during the configure process.
3871Download the freetype sources and unpack them into an arbitrary directory:
3872
3873wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3874tar -xzf freetype-2.5.3.tar.gz
3875
3876Then run configure with '--with-freetype-src=<freetype_src>'. This will
3877automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3878builds or into '<freetype_src>/lib32' for 32-bit builds.
3879Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3880and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3881      ;;
3882  esac
3883}
3884
3885msys_help() {
3886  PKGHANDLER_COMMAND=""
3887}
3888
3889apt_help() {
3890  case $1 in
3891    devkit)
3892      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3893    openjdk)
3894      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3895    alsa)
3896      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3897    cups)
3898      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3899    freetype)
3900      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3901    pulse)
3902      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3903    x11)
3904      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3905    ccache)
3906      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3907  esac
3908}
3909
3910yum_help() {
3911  case $1 in
3912    devkit)
3913      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3914    openjdk)
3915      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3916    alsa)
3917      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3918    cups)
3919      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3920    freetype)
3921      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3922    pulse)
3923      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3924    x11)
3925      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3926    ccache)
3927      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3928  esac
3929}
3930
3931port_help() {
3932  PKGHANDLER_COMMAND=""
3933}
3934
3935pkgutil_help() {
3936  PKGHANDLER_COMMAND=""
3937}
3938
3939pkgadd_help() {
3940  PKGHANDLER_COMMAND=""
3941}
3942
3943# This function will check if we're called from the "configure" wrapper while
3944# printing --help. If so, we will print out additional information that can
3945# only be extracted within the autoconf script, and then exit. This must be
3946# called at the very beginning in configure.ac.
3947
3948
3949
3950
3951
3952
3953#
3954# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3955# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3956#
3957# This code is free software; you can redistribute it and/or modify it
3958# under the terms of the GNU General Public License version 2 only, as
3959# published by the Free Software Foundation.  Oracle designates this
3960# particular file as subject to the "Classpath" exception as provided
3961# by Oracle in the LICENSE file that accompanied this code.
3962#
3963# This code is distributed in the hope that it will be useful, but WITHOUT
3964# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3965# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3966# version 2 for more details (a copy is included in the LICENSE file that
3967# accompanied this code).
3968#
3969# You should have received a copy of the GNU General Public License version
3970# 2 along with this work; if not, write to the Free Software Foundation,
3971# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3972#
3973# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3974# or visit www.oracle.com if you need additional information or have any
3975# questions.
3976#
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987###############################################################################
3988#
3989# Should we build only OpenJDK even if closed sources are present?
3990#
3991
3992
3993
3994
3995###############################################################################
3996#
3997# Setup version numbers
3998#
3999
4000
4001
4002
4003
4004
4005################################################################################
4006#
4007# Gcov coverage data for hotspot
4008#
4009
4010
4011#
4012# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4013# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4014#
4015# This code is free software; you can redistribute it and/or modify it
4016# under the terms of the GNU General Public License version 2 only, as
4017# published by the Free Software Foundation.  Oracle designates this
4018# particular file as subject to the "Classpath" exception as provided
4019# by Oracle in the LICENSE file that accompanied this code.
4020#
4021# This code is distributed in the hope that it will be useful, but WITHOUT
4022# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4023# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4024# version 2 for more details (a copy is included in the LICENSE file that
4025# accompanied this code).
4026#
4027# You should have received a copy of the GNU General Public License version
4028# 2 along with this work; if not, write to the Free Software Foundation,
4029# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4030#
4031# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4032# or visit www.oracle.com if you need additional information or have any
4033# questions.
4034#
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056#
4057# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4058# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4059#
4060# This code is free software; you can redistribute it and/or modify it
4061# under the terms of the GNU General Public License version 2 only, as
4062# published by the Free Software Foundation.  Oracle designates this
4063# particular file as subject to the "Classpath" exception as provided
4064# by Oracle in the LICENSE file that accompanied this code.
4065#
4066# This code is distributed in the hope that it will be useful, but WITHOUT
4067# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4068# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4069# version 2 for more details (a copy is included in the LICENSE file that
4070# accompanied this code).
4071#
4072# You should have received a copy of the GNU General Public License version
4073# 2 along with this work; if not, write to the Free Software Foundation,
4074# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4075#
4076# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4077# or visit www.oracle.com if you need additional information or have any
4078# questions.
4079#
4080
4081# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4082# Converts autoconf style CPU name to OpenJDK style, into
4083# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4084
4085
4086# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4087# Converts autoconf style OS name to OpenJDK style, into
4088# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4089
4090
4091# Expects $host_os $host_cpu $build_os and $build_cpu
4092# and $with_target_bits to have been setup!
4093#
4094# Translate the standard triplet(quadruplet) definition
4095# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4096# OPENJDK_BUILD_OS, etc.
4097
4098
4099# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4100# accordingly. Must be done after setting up build and target system, but before
4101# doing anything else with these values.
4102
4103
4104# Setup the legacy variables, for controlling the old makefiles.
4105#
4106
4107
4108
4109
4110#%%% Build and target systems %%%
4111
4112
4113
4114
4115# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4116# Add -mX to various FLAGS variables.
4117
4118
4119
4120
4121
4122
4123#
4124# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4125# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4126#
4127# This code is free software; you can redistribute it and/or modify it
4128# under the terms of the GNU General Public License version 2 only, as
4129# published by the Free Software Foundation.  Oracle designates this
4130# particular file as subject to the "Classpath" exception as provided
4131# by Oracle in the LICENSE file that accompanied this code.
4132#
4133# This code is distributed in the hope that it will be useful, but WITHOUT
4134# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4135# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4136# version 2 for more details (a copy is included in the LICENSE file that
4137# accompanied this code).
4138#
4139# You should have received a copy of the GNU General Public License version
4140# 2 along with this work; if not, write to the Free Software Foundation,
4141# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4142#
4143# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4144# or visit www.oracle.com if you need additional information or have any
4145# questions.
4146#
4147
4148
4149
4150
4151
4152
4153
4154
4155#
4156# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4157# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4158#
4159# This code is free software; you can redistribute it and/or modify it
4160# under the terms of the GNU General Public License version 2 only, as
4161# published by the Free Software Foundation.  Oracle designates this
4162# particular file as subject to the "Classpath" exception as provided
4163# by Oracle in the LICENSE file that accompanied this code.
4164#
4165# This code is distributed in the hope that it will be useful, but WITHOUT
4166# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4167# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4168# version 2 for more details (a copy is included in the LICENSE file that
4169# accompanied this code).
4170#
4171# You should have received a copy of the GNU General Public License version
4172# 2 along with this work; if not, write to the Free Software Foundation,
4173# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4174#
4175# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4176# or visit www.oracle.com if you need additional information or have any
4177# questions.
4178#
4179
4180########################################################################
4181# This file is responsible for detecting, verifying and setting up the
4182# toolchain, i.e. the compiler, linker and related utilities. It will setup
4183# proper paths to the binaries, but it will not setup any flags.
4184#
4185# The binaries used is determined by the toolchain type, which is the family of
4186# compilers and related tools that are used.
4187########################################################################
4188
4189
4190# All valid toolchains, regardless of platform (used by help.m4)
4191VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4192
4193# These toolchains are valid on different platforms
4194VALID_TOOLCHAINS_linux="gcc clang"
4195VALID_TOOLCHAINS_solaris="solstudio"
4196VALID_TOOLCHAINS_macosx="gcc clang"
4197VALID_TOOLCHAINS_aix="xlc"
4198VALID_TOOLCHAINS_windows="microsoft"
4199
4200# Toolchain descriptions
4201TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4202TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4203TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4204TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4205TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4206
4207# Setup a number of variables describing how native output files are
4208# named on this platform/toolchain.
4209
4210
4211# Determine which toolchain type to use, and make sure it is valid for this
4212# platform. Setup various information about the selected toolchain.
4213
4214
4215# Before we start detecting the toolchain executables, we might need some
4216# special setup, e.g. additional paths etc.
4217
4218
4219# Restore path, etc
4220
4221
4222# Check if a compiler is of the toolchain type we expect, and save the version
4223# information from it. If the compiler does not match the expected type,
4224# this function will abort using AC_MSG_ERROR. If it matches, the version will
4225# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4226# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4227#
4228# $1 = compiler to test (CC or CXX)
4229# $2 = human readable name of compiler (C or C++)
4230
4231
4232# Try to locate the given C or C++ compiler in the path, or otherwise.
4233#
4234# $1 = compiler to test (CC or CXX)
4235# $2 = human readable name of compiler (C or C++)
4236# $3 = list of compiler names to search for
4237
4238
4239# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4240# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4241# archiver (AR). Verify that the compilers are correct according to the
4242# toolchain type.
4243
4244
4245# Setup additional tools that is considered a part of the toolchain, but not the
4246# core part. Many of these are highly platform-specific and do not exist,
4247# and/or are not needed on all platforms.
4248
4249
4250# Setup the build tools (i.e, the compiler and linker used to build programs
4251# that should be run on the build platform, not the target platform, as a build
4252# helper). Since the non-cross-compile case uses the normal, target compilers
4253# for this, we can only do this after these have been setup.
4254
4255
4256# Setup legacy variables that are still needed as alternative ways to refer to
4257# parts of the toolchain.
4258
4259
4260# Do some additional checks on the detected tools.
4261
4262
4263# Setup the JTReg Regression Test Harness.
4264
4265
4266#
4267# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4268# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4269#
4270# This code is free software; you can redistribute it and/or modify it
4271# under the terms of the GNU General Public License version 2 only, as
4272# published by the Free Software Foundation.  Oracle designates this
4273# particular file as subject to the "Classpath" exception as provided
4274# by Oracle in the LICENSE file that accompanied this code.
4275#
4276# This code is distributed in the hope that it will be useful, but WITHOUT
4277# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4278# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4279# version 2 for more details (a copy is included in the LICENSE file that
4280# accompanied this code).
4281#
4282# You should have received a copy of the GNU General Public License version
4283# 2 along with this work; if not, write to the Free Software Foundation,
4284# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4285#
4286# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4287# or visit www.oracle.com if you need additional information or have any
4288# questions.
4289#
4290
4291################################################################################
4292# The order of these defines the priority by which we try to find them.
4293VALID_VS_VERSIONS="2013 2012 2010"
4294
4295VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4296VS_VERSION_INTERNAL_2010=100
4297VS_MSVCR_2010=msvcr100.dll
4298# We don't use msvcp on Visual Studio 2010
4299#VS_MSVCP_2010=msvcp100.dll
4300VS_ENVVAR_2010="VS100COMNTOOLS"
4301VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4302VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4303VS_VS_PLATFORM_NAME_2010="v100"
4304VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4305
4306VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4307VS_VERSION_INTERNAL_2012=110
4308VS_MSVCR_2012=msvcr110.dll
4309VS_MSVCP_2012=msvcp110.dll
4310VS_ENVVAR_2012="VS110COMNTOOLS"
4311VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4312VS_SDK_INSTALLDIR_2012=
4313VS_VS_PLATFORM_NAME_2012="v110"
4314VS_SDK_PLATFORM_NAME_2012=
4315
4316VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4317VS_VERSION_INTERNAL_2013=120
4318VS_MSVCR_2013=msvcr120.dll
4319VS_MSVCP_2013=msvcp120.dll
4320VS_ENVVAR_2013="VS120COMNTOOLS"
4321VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4322VS_SDK_INSTALLDIR_2013=
4323VS_VS_PLATFORM_NAME_2013="v120"
4324VS_SDK_PLATFORM_NAME_2013=
4325
4326################################################################################
4327
4328
4329
4330################################################################################
4331
4332
4333
4334################################################################################
4335# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4336# build environment and assigns it to VS_ENV_CMD
4337
4338
4339################################################################################
4340
4341
4342
4343################################################################################
4344# Check if the VS env variables were setup prior to running configure.
4345# If not, then find vcvarsall.bat and run it automatically, and integrate
4346# the set env variables into the spec file.
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361# This line needs to be here, verbatim, after all includes and the dummy hook
4362# definitions. It is replaced with custom functionality when building
4363# custom sources.
4364#CUSTOM_AUTOCONF_INCLUDE
4365
4366# Do not change or remove the following line, it is needed for consistency checks:
4367DATE_WHEN_GENERATED=1435822080
4368
4369###############################################################################
4370#
4371# Initialization / Boot-strapping
4372#
4373# The bootstrapping process needs to solve the "chicken or the egg" problem,
4374# thus it jumps back and forth, each time gaining something needed later on.
4375#
4376###############################################################################
4377
4378# If we are requested to print additional help, do that and then exit.
4379# This must be the very first call.
4380
4381  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4382    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4383    $PRINTF "Which are valid to use depends on the build platform.\n"
4384    for toolchain in $VALID_TOOLCHAINS_all; do
4385      # Use indirect variable referencing
4386      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4387      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4388      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4389    done
4390
4391    # And now exit directly
4392    exit 0
4393  fi
4394
4395
4396# Basic initialization that must happen first of all in the normal process.
4397
4398  # Save the original command line. This is passed to us by the wrapper configure script.
4399
4400  # Save the path variable before it gets changed
4401  ORIGINAL_PATH="$PATH"
4402
4403  DATE_WHEN_CONFIGURED=`LANG=C date`
4404
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4406$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4408$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4409
4410
4411  # Start with tools that do not need have cross compilation support
4412  # and can be expected to be found in the default PATH. These tools are
4413  # used by configure. Nor are these tools expected to be found in the
4414  # devkit from the builddeps server either, since they are
4415  # needed to download the devkit.
4416
4417  # First are all the simple required tools.
4418
4419
4420
4421  # Publish this variable in the help.
4422
4423
4424  if test "x$BASENAME" = x; then
4425    # The variable is not set by user, try to locate tool using the code snippet
4426    for ac_prog in basename
4427do
4428  # Extract the first word of "$ac_prog", so it can be a program name with args.
4429set dummy $ac_prog; ac_word=$2
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4431$as_echo_n "checking for $ac_word... " >&6; }
4432if ${ac_cv_path_BASENAME+:} false; then :
4433  $as_echo_n "(cached) " >&6
4434else
4435  case $BASENAME in
4436  [\\/]* | ?:[\\/]*)
4437  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4438  ;;
4439  *)
4440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441for as_dir in $PATH
4442do
4443  IFS=$as_save_IFS
4444  test -z "$as_dir" && as_dir=.
4445    for ac_exec_ext in '' $ac_executable_extensions; do
4446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4447    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4449    break 2
4450  fi
4451done
4452  done
4453IFS=$as_save_IFS
4454
4455  ;;
4456esac
4457fi
4458BASENAME=$ac_cv_path_BASENAME
4459if test -n "$BASENAME"; then
4460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4461$as_echo "$BASENAME" >&6; }
4462else
4463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4464$as_echo "no" >&6; }
4465fi
4466
4467
4468  test -n "$BASENAME" && break
4469done
4470
4471  else
4472    # The variable is set, but is it from the command line or the environment?
4473
4474    # Try to remove the string !BASENAME! from our list.
4475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4477      # If it failed, the variable was not from the command line. Ignore it,
4478      # but warn the user (except for BASH, which is always set by the calling BASH).
4479      if test "xBASENAME" != xBASH; then
4480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4481$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4482      fi
4483      # Try to locate tool using the code snippet
4484      for ac_prog in basename
4485do
4486  # Extract the first word of "$ac_prog", so it can be a program name with args.
4487set dummy $ac_prog; ac_word=$2
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
4490if ${ac_cv_path_BASENAME+:} false; then :
4491  $as_echo_n "(cached) " >&6
4492else
4493  case $BASENAME in
4494  [\\/]* | ?:[\\/]*)
4495  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4496  ;;
4497  *)
4498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in $PATH
4500do
4501  IFS=$as_save_IFS
4502  test -z "$as_dir" && as_dir=.
4503    for ac_exec_ext in '' $ac_executable_extensions; do
4504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4505    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507    break 2
4508  fi
4509done
4510  done
4511IFS=$as_save_IFS
4512
4513  ;;
4514esac
4515fi
4516BASENAME=$ac_cv_path_BASENAME
4517if test -n "$BASENAME"; then
4518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4519$as_echo "$BASENAME" >&6; }
4520else
4521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
4525
4526  test -n "$BASENAME" && break
4527done
4528
4529    else
4530      # If it succeeded, then it was overridden by the user. We will use it
4531      # for the tool.
4532
4533      # First remove it from the list of overridden variables, so we can test
4534      # for unknown variables in the end.
4535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4536
4537      # Check if the provided tool contains a complete path.
4538      tool_specified="$BASENAME"
4539      tool_basename="${tool_specified##*/}"
4540      if test "x$tool_basename" = "x$tool_specified"; then
4541        # A command without a complete path is provided, search $PATH.
4542        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4543$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4544        # Extract the first word of "$tool_basename", so it can be a program name with args.
4545set dummy $tool_basename; ac_word=$2
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4547$as_echo_n "checking for $ac_word... " >&6; }
4548if ${ac_cv_path_BASENAME+:} false; then :
4549  $as_echo_n "(cached) " >&6
4550else
4551  case $BASENAME in
4552  [\\/]* | ?:[\\/]*)
4553  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4554  ;;
4555  *)
4556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4557for as_dir in $PATH
4558do
4559  IFS=$as_save_IFS
4560  test -z "$as_dir" && as_dir=.
4561    for ac_exec_ext in '' $ac_executable_extensions; do
4562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4563    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4565    break 2
4566  fi
4567done
4568  done
4569IFS=$as_save_IFS
4570
4571  ;;
4572esac
4573fi
4574BASENAME=$ac_cv_path_BASENAME
4575if test -n "$BASENAME"; then
4576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4577$as_echo "$BASENAME" >&6; }
4578else
4579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580$as_echo "no" >&6; }
4581fi
4582
4583
4584        if test "x$BASENAME" = x; then
4585          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4586        fi
4587      else
4588        # Otherwise we believe it is a complete path. Use it as it is.
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4590$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4592$as_echo_n "checking for BASENAME... " >&6; }
4593        if test ! -x "$tool_specified"; then
4594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4595$as_echo "not found" >&6; }
4596          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4597        fi
4598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4599$as_echo "$tool_specified" >&6; }
4600      fi
4601    fi
4602  fi
4603
4604
4605
4606  if test "x$BASENAME" = x; then
4607    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4608  fi
4609
4610
4611
4612
4613
4614  # Publish this variable in the help.
4615
4616
4617  if test "x$BASH" = x; then
4618    # The variable is not set by user, try to locate tool using the code snippet
4619    for ac_prog in bash
4620do
4621  # Extract the first word of "$ac_prog", so it can be a program name with args.
4622set dummy $ac_prog; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_BASH+:} false; then :
4626  $as_echo_n "(cached) " >&6
4627else
4628  case $BASH in
4629  [\\/]* | ?:[\\/]*)
4630  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4631  ;;
4632  *)
4633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in $PATH
4635do
4636  IFS=$as_save_IFS
4637  test -z "$as_dir" && as_dir=.
4638    for ac_exec_ext in '' $ac_executable_extensions; do
4639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4640    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642    break 2
4643  fi
4644done
4645  done
4646IFS=$as_save_IFS
4647
4648  ;;
4649esac
4650fi
4651BASH=$ac_cv_path_BASH
4652if test -n "$BASH"; then
4653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4654$as_echo "$BASH" >&6; }
4655else
4656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660
4661  test -n "$BASH" && break
4662done
4663
4664  else
4665    # The variable is set, but is it from the command line or the environment?
4666
4667    # Try to remove the string !BASH! from our list.
4668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4670      # If it failed, the variable was not from the command line. Ignore it,
4671      # but warn the user (except for BASH, which is always set by the calling BASH).
4672      if test "xBASH" != xBASH; then
4673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4674$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4675      fi
4676      # Try to locate tool using the code snippet
4677      for ac_prog in bash
4678do
4679  # Extract the first word of "$ac_prog", so it can be a program name with args.
4680set dummy $ac_prog; ac_word=$2
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4682$as_echo_n "checking for $ac_word... " >&6; }
4683if ${ac_cv_path_BASH+:} false; then :
4684  $as_echo_n "(cached) " >&6
4685else
4686  case $BASH in
4687  [\\/]* | ?:[\\/]*)
4688  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4689  ;;
4690  *)
4691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694  IFS=$as_save_IFS
4695  test -z "$as_dir" && as_dir=.
4696    for ac_exec_ext in '' $ac_executable_extensions; do
4697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4698    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4700    break 2
4701  fi
4702done
4703  done
4704IFS=$as_save_IFS
4705
4706  ;;
4707esac
4708fi
4709BASH=$ac_cv_path_BASH
4710if test -n "$BASH"; then
4711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4712$as_echo "$BASH" >&6; }
4713else
4714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4715$as_echo "no" >&6; }
4716fi
4717
4718
4719  test -n "$BASH" && break
4720done
4721
4722    else
4723      # If it succeeded, then it was overridden by the user. We will use it
4724      # for the tool.
4725
4726      # First remove it from the list of overridden variables, so we can test
4727      # for unknown variables in the end.
4728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4729
4730      # Check if the provided tool contains a complete path.
4731      tool_specified="$BASH"
4732      tool_basename="${tool_specified##*/}"
4733      if test "x$tool_basename" = "x$tool_specified"; then
4734        # A command without a complete path is provided, search $PATH.
4735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4736$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4737        # Extract the first word of "$tool_basename", so it can be a program name with args.
4738set dummy $tool_basename; ac_word=$2
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
4741if ${ac_cv_path_BASH+:} false; then :
4742  $as_echo_n "(cached) " >&6
4743else
4744  case $BASH in
4745  [\\/]* | ?:[\\/]*)
4746  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4747  ;;
4748  *)
4749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4750for as_dir in $PATH
4751do
4752  IFS=$as_save_IFS
4753  test -z "$as_dir" && as_dir=.
4754    for ac_exec_ext in '' $ac_executable_extensions; do
4755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4756    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4758    break 2
4759  fi
4760done
4761  done
4762IFS=$as_save_IFS
4763
4764  ;;
4765esac
4766fi
4767BASH=$ac_cv_path_BASH
4768if test -n "$BASH"; then
4769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4770$as_echo "$BASH" >&6; }
4771else
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776
4777        if test "x$BASH" = x; then
4778          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4779        fi
4780      else
4781        # Otherwise we believe it is a complete path. Use it as it is.
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4783$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4785$as_echo_n "checking for BASH... " >&6; }
4786        if test ! -x "$tool_specified"; then
4787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4788$as_echo "not found" >&6; }
4789          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4790        fi
4791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4792$as_echo "$tool_specified" >&6; }
4793      fi
4794    fi
4795  fi
4796
4797
4798
4799  if test "x$BASH" = x; then
4800    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4801  fi
4802
4803
4804
4805
4806
4807  # Publish this variable in the help.
4808
4809
4810  if test "x$CAT" = x; then
4811    # The variable is not set by user, try to locate tool using the code snippet
4812    for ac_prog in cat
4813do
4814  # Extract the first word of "$ac_prog", so it can be a program name with args.
4815set dummy $ac_prog; ac_word=$2
4816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
4818if ${ac_cv_path_CAT+:} false; then :
4819  $as_echo_n "(cached) " >&6
4820else
4821  case $CAT in
4822  [\\/]* | ?:[\\/]*)
4823  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4824  ;;
4825  *)
4826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in $PATH
4828do
4829  IFS=$as_save_IFS
4830  test -z "$as_dir" && as_dir=.
4831    for ac_exec_ext in '' $ac_executable_extensions; do
4832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4833    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4835    break 2
4836  fi
4837done
4838  done
4839IFS=$as_save_IFS
4840
4841  ;;
4842esac
4843fi
4844CAT=$ac_cv_path_CAT
4845if test -n "$CAT"; then
4846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4847$as_echo "$CAT" >&6; }
4848else
4849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
4851fi
4852
4853
4854  test -n "$CAT" && break
4855done
4856
4857  else
4858    # The variable is set, but is it from the command line or the environment?
4859
4860    # Try to remove the string !CAT! from our list.
4861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4863      # If it failed, the variable was not from the command line. Ignore it,
4864      # but warn the user (except for BASH, which is always set by the calling BASH).
4865      if test "xCAT" != xBASH; then
4866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4867$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4868      fi
4869      # Try to locate tool using the code snippet
4870      for ac_prog in cat
4871do
4872  # Extract the first word of "$ac_prog", so it can be a program name with args.
4873set dummy $ac_prog; ac_word=$2
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4875$as_echo_n "checking for $ac_word... " >&6; }
4876if ${ac_cv_path_CAT+:} false; then :
4877  $as_echo_n "(cached) " >&6
4878else
4879  case $CAT in
4880  [\\/]* | ?:[\\/]*)
4881  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4882  ;;
4883  *)
4884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4885for as_dir in $PATH
4886do
4887  IFS=$as_save_IFS
4888  test -z "$as_dir" && as_dir=.
4889    for ac_exec_ext in '' $ac_executable_extensions; do
4890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4891    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4893    break 2
4894  fi
4895done
4896  done
4897IFS=$as_save_IFS
4898
4899  ;;
4900esac
4901fi
4902CAT=$ac_cv_path_CAT
4903if test -n "$CAT"; then
4904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4905$as_echo "$CAT" >&6; }
4906else
4907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4908$as_echo "no" >&6; }
4909fi
4910
4911
4912  test -n "$CAT" && break
4913done
4914
4915    else
4916      # If it succeeded, then it was overridden by the user. We will use it
4917      # for the tool.
4918
4919      # First remove it from the list of overridden variables, so we can test
4920      # for unknown variables in the end.
4921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4922
4923      # Check if the provided tool contains a complete path.
4924      tool_specified="$CAT"
4925      tool_basename="${tool_specified##*/}"
4926      if test "x$tool_basename" = "x$tool_specified"; then
4927        # A command without a complete path is provided, search $PATH.
4928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4929$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4930        # Extract the first word of "$tool_basename", so it can be a program name with args.
4931set dummy $tool_basename; ac_word=$2
4932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4933$as_echo_n "checking for $ac_word... " >&6; }
4934if ${ac_cv_path_CAT+:} false; then :
4935  $as_echo_n "(cached) " >&6
4936else
4937  case $CAT in
4938  [\\/]* | ?:[\\/]*)
4939  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4940  ;;
4941  *)
4942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4943for as_dir in $PATH
4944do
4945  IFS=$as_save_IFS
4946  test -z "$as_dir" && as_dir=.
4947    for ac_exec_ext in '' $ac_executable_extensions; do
4948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4949    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4951    break 2
4952  fi
4953done
4954  done
4955IFS=$as_save_IFS
4956
4957  ;;
4958esac
4959fi
4960CAT=$ac_cv_path_CAT
4961if test -n "$CAT"; then
4962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4963$as_echo "$CAT" >&6; }
4964else
4965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4966$as_echo "no" >&6; }
4967fi
4968
4969
4970        if test "x$CAT" = x; then
4971          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4972        fi
4973      else
4974        # Otherwise we believe it is a complete path. Use it as it is.
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4976$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4978$as_echo_n "checking for CAT... " >&6; }
4979        if test ! -x "$tool_specified"; then
4980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4981$as_echo "not found" >&6; }
4982          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4983        fi
4984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4985$as_echo "$tool_specified" >&6; }
4986      fi
4987    fi
4988  fi
4989
4990
4991
4992  if test "x$CAT" = x; then
4993    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4994  fi
4995
4996
4997
4998
4999
5000  # Publish this variable in the help.
5001
5002
5003  if test "x$CHMOD" = x; then
5004    # The variable is not set by user, try to locate tool using the code snippet
5005    for ac_prog in chmod
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if ${ac_cv_path_CHMOD+:} false; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $CHMOD in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5026    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037CHMOD=$ac_cv_path_CHMOD
5038if test -n "$CHMOD"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5040$as_echo "$CHMOD" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$CHMOD" && break
5048done
5049
5050  else
5051    # The variable is set, but is it from the command line or the environment?
5052
5053    # Try to remove the string !CHMOD! from our list.
5054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5056      # If it failed, the variable was not from the command line. Ignore it,
5057      # but warn the user (except for BASH, which is always set by the calling BASH).
5058      if test "xCHMOD" != xBASH; then
5059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5060$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5061      fi
5062      # Try to locate tool using the code snippet
5063      for ac_prog in chmod
5064do
5065  # Extract the first word of "$ac_prog", so it can be a program name with args.
5066set dummy $ac_prog; ac_word=$2
5067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5068$as_echo_n "checking for $ac_word... " >&6; }
5069if ${ac_cv_path_CHMOD+:} false; then :
5070  $as_echo_n "(cached) " >&6
5071else
5072  case $CHMOD in
5073  [\\/]* | ?:[\\/]*)
5074  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5075  ;;
5076  *)
5077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080  IFS=$as_save_IFS
5081  test -z "$as_dir" && as_dir=.
5082    for ac_exec_ext in '' $ac_executable_extensions; do
5083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5084    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086    break 2
5087  fi
5088done
5089  done
5090IFS=$as_save_IFS
5091
5092  ;;
5093esac
5094fi
5095CHMOD=$ac_cv_path_CHMOD
5096if test -n "$CHMOD"; then
5097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5098$as_echo "$CHMOD" >&6; }
5099else
5100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5101$as_echo "no" >&6; }
5102fi
5103
5104
5105  test -n "$CHMOD" && break
5106done
5107
5108    else
5109      # If it succeeded, then it was overridden by the user. We will use it
5110      # for the tool.
5111
5112      # First remove it from the list of overridden variables, so we can test
5113      # for unknown variables in the end.
5114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5115
5116      # Check if the provided tool contains a complete path.
5117      tool_specified="$CHMOD"
5118      tool_basename="${tool_specified##*/}"
5119      if test "x$tool_basename" = "x$tool_specified"; then
5120        # A command without a complete path is provided, search $PATH.
5121        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5122$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5123        # Extract the first word of "$tool_basename", so it can be a program name with args.
5124set dummy $tool_basename; ac_word=$2
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if ${ac_cv_path_CHMOD+:} false; then :
5128  $as_echo_n "(cached) " >&6
5129else
5130  case $CHMOD in
5131  [\\/]* | ?:[\\/]*)
5132  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5133  ;;
5134  *)
5135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138  IFS=$as_save_IFS
5139  test -z "$as_dir" && as_dir=.
5140    for ac_exec_ext in '' $ac_executable_extensions; do
5141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5142    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144    break 2
5145  fi
5146done
5147  done
5148IFS=$as_save_IFS
5149
5150  ;;
5151esac
5152fi
5153CHMOD=$ac_cv_path_CHMOD
5154if test -n "$CHMOD"; then
5155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5156$as_echo "$CHMOD" >&6; }
5157else
5158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159$as_echo "no" >&6; }
5160fi
5161
5162
5163        if test "x$CHMOD" = x; then
5164          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5165        fi
5166      else
5167        # Otherwise we believe it is a complete path. Use it as it is.
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5169$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5171$as_echo_n "checking for CHMOD... " >&6; }
5172        if test ! -x "$tool_specified"; then
5173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5174$as_echo "not found" >&6; }
5175          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5176        fi
5177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5178$as_echo "$tool_specified" >&6; }
5179      fi
5180    fi
5181  fi
5182
5183
5184
5185  if test "x$CHMOD" = x; then
5186    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5187  fi
5188
5189
5190
5191
5192
5193  # Publish this variable in the help.
5194
5195
5196  if test "x$CMP" = x; then
5197    # The variable is not set by user, try to locate tool using the code snippet
5198    for ac_prog in cmp
5199do
5200  # Extract the first word of "$ac_prog", so it can be a program name with args.
5201set dummy $ac_prog; ac_word=$2
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5203$as_echo_n "checking for $ac_word... " >&6; }
5204if ${ac_cv_path_CMP+:} false; then :
5205  $as_echo_n "(cached) " >&6
5206else
5207  case $CMP in
5208  [\\/]* | ?:[\\/]*)
5209  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5210  ;;
5211  *)
5212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215  IFS=$as_save_IFS
5216  test -z "$as_dir" && as_dir=.
5217    for ac_exec_ext in '' $ac_executable_extensions; do
5218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5219    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221    break 2
5222  fi
5223done
5224  done
5225IFS=$as_save_IFS
5226
5227  ;;
5228esac
5229fi
5230CMP=$ac_cv_path_CMP
5231if test -n "$CMP"; then
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5233$as_echo "$CMP" >&6; }
5234else
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
5237fi
5238
5239
5240  test -n "$CMP" && break
5241done
5242
5243  else
5244    # The variable is set, but is it from the command line or the environment?
5245
5246    # Try to remove the string !CMP! from our list.
5247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5249      # If it failed, the variable was not from the command line. Ignore it,
5250      # but warn the user (except for BASH, which is always set by the calling BASH).
5251      if test "xCMP" != xBASH; then
5252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5253$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5254      fi
5255      # Try to locate tool using the code snippet
5256      for ac_prog in cmp
5257do
5258  # Extract the first word of "$ac_prog", so it can be a program name with args.
5259set dummy $ac_prog; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261$as_echo_n "checking for $ac_word... " >&6; }
5262if ${ac_cv_path_CMP+:} false; then :
5263  $as_echo_n "(cached) " >&6
5264else
5265  case $CMP in
5266  [\\/]* | ?:[\\/]*)
5267  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5268  ;;
5269  *)
5270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273  IFS=$as_save_IFS
5274  test -z "$as_dir" && as_dir=.
5275    for ac_exec_ext in '' $ac_executable_extensions; do
5276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5277    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5279    break 2
5280  fi
5281done
5282  done
5283IFS=$as_save_IFS
5284
5285  ;;
5286esac
5287fi
5288CMP=$ac_cv_path_CMP
5289if test -n "$CMP"; then
5290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5291$as_echo "$CMP" >&6; }
5292else
5293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
5295fi
5296
5297
5298  test -n "$CMP" && break
5299done
5300
5301    else
5302      # If it succeeded, then it was overridden by the user. We will use it
5303      # for the tool.
5304
5305      # First remove it from the list of overridden variables, so we can test
5306      # for unknown variables in the end.
5307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5308
5309      # Check if the provided tool contains a complete path.
5310      tool_specified="$CMP"
5311      tool_basename="${tool_specified##*/}"
5312      if test "x$tool_basename" = "x$tool_specified"; then
5313        # A command without a complete path is provided, search $PATH.
5314        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5315$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5316        # Extract the first word of "$tool_basename", so it can be a program name with args.
5317set dummy $tool_basename; ac_word=$2
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319$as_echo_n "checking for $ac_word... " >&6; }
5320if ${ac_cv_path_CMP+:} false; then :
5321  $as_echo_n "(cached) " >&6
5322else
5323  case $CMP in
5324  [\\/]* | ?:[\\/]*)
5325  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5326  ;;
5327  *)
5328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331  IFS=$as_save_IFS
5332  test -z "$as_dir" && as_dir=.
5333    for ac_exec_ext in '' $ac_executable_extensions; do
5334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5335    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337    break 2
5338  fi
5339done
5340  done
5341IFS=$as_save_IFS
5342
5343  ;;
5344esac
5345fi
5346CMP=$ac_cv_path_CMP
5347if test -n "$CMP"; then
5348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5349$as_echo "$CMP" >&6; }
5350else
5351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354
5355
5356        if test "x$CMP" = x; then
5357          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5358        fi
5359      else
5360        # Otherwise we believe it is a complete path. Use it as it is.
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5362$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5363        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5364$as_echo_n "checking for CMP... " >&6; }
5365        if test ! -x "$tool_specified"; then
5366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5367$as_echo "not found" >&6; }
5368          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5369        fi
5370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5371$as_echo "$tool_specified" >&6; }
5372      fi
5373    fi
5374  fi
5375
5376
5377
5378  if test "x$CMP" = x; then
5379    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5380  fi
5381
5382
5383
5384
5385
5386  # Publish this variable in the help.
5387
5388
5389  if test "x$COMM" = x; then
5390    # The variable is not set by user, try to locate tool using the code snippet
5391    for ac_prog in comm
5392do
5393  # Extract the first word of "$ac_prog", so it can be a program name with args.
5394set dummy $ac_prog; ac_word=$2
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5396$as_echo_n "checking for $ac_word... " >&6; }
5397if ${ac_cv_path_COMM+:} false; then :
5398  $as_echo_n "(cached) " >&6
5399else
5400  case $COMM in
5401  [\\/]* | ?:[\\/]*)
5402  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5403  ;;
5404  *)
5405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406for as_dir in $PATH
5407do
5408  IFS=$as_save_IFS
5409  test -z "$as_dir" && as_dir=.
5410    for ac_exec_ext in '' $ac_executable_extensions; do
5411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5412    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5414    break 2
5415  fi
5416done
5417  done
5418IFS=$as_save_IFS
5419
5420  ;;
5421esac
5422fi
5423COMM=$ac_cv_path_COMM
5424if test -n "$COMM"; then
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5426$as_echo "$COMM" >&6; }
5427else
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429$as_echo "no" >&6; }
5430fi
5431
5432
5433  test -n "$COMM" && break
5434done
5435
5436  else
5437    # The variable is set, but is it from the command line or the environment?
5438
5439    # Try to remove the string !COMM! from our list.
5440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5442      # If it failed, the variable was not from the command line. Ignore it,
5443      # but warn the user (except for BASH, which is always set by the calling BASH).
5444      if test "xCOMM" != xBASH; then
5445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5446$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5447      fi
5448      # Try to locate tool using the code snippet
5449      for ac_prog in comm
5450do
5451  # Extract the first word of "$ac_prog", so it can be a program name with args.
5452set dummy $ac_prog; ac_word=$2
5453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454$as_echo_n "checking for $ac_word... " >&6; }
5455if ${ac_cv_path_COMM+:} false; then :
5456  $as_echo_n "(cached) " >&6
5457else
5458  case $COMM in
5459  [\\/]* | ?:[\\/]*)
5460  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5461  ;;
5462  *)
5463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464for as_dir in $PATH
5465do
5466  IFS=$as_save_IFS
5467  test -z "$as_dir" && as_dir=.
5468    for ac_exec_ext in '' $ac_executable_extensions; do
5469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5470    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472    break 2
5473  fi
5474done
5475  done
5476IFS=$as_save_IFS
5477
5478  ;;
5479esac
5480fi
5481COMM=$ac_cv_path_COMM
5482if test -n "$COMM"; then
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5484$as_echo "$COMM" >&6; }
5485else
5486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487$as_echo "no" >&6; }
5488fi
5489
5490
5491  test -n "$COMM" && break
5492done
5493
5494    else
5495      # If it succeeded, then it was overridden by the user. We will use it
5496      # for the tool.
5497
5498      # First remove it from the list of overridden variables, so we can test
5499      # for unknown variables in the end.
5500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5501
5502      # Check if the provided tool contains a complete path.
5503      tool_specified="$COMM"
5504      tool_basename="${tool_specified##*/}"
5505      if test "x$tool_basename" = "x$tool_specified"; then
5506        # A command without a complete path is provided, search $PATH.
5507        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5508$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5509        # Extract the first word of "$tool_basename", so it can be a program name with args.
5510set dummy $tool_basename; ac_word=$2
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512$as_echo_n "checking for $ac_word... " >&6; }
5513if ${ac_cv_path_COMM+:} false; then :
5514  $as_echo_n "(cached) " >&6
5515else
5516  case $COMM in
5517  [\\/]* | ?:[\\/]*)
5518  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5519  ;;
5520  *)
5521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522for as_dir in $PATH
5523do
5524  IFS=$as_save_IFS
5525  test -z "$as_dir" && as_dir=.
5526    for ac_exec_ext in '' $ac_executable_extensions; do
5527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530    break 2
5531  fi
5532done
5533  done
5534IFS=$as_save_IFS
5535
5536  ;;
5537esac
5538fi
5539COMM=$ac_cv_path_COMM
5540if test -n "$COMM"; then
5541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5542$as_echo "$COMM" >&6; }
5543else
5544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545$as_echo "no" >&6; }
5546fi
5547
5548
5549        if test "x$COMM" = x; then
5550          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5551        fi
5552      else
5553        # Otherwise we believe it is a complete path. Use it as it is.
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5555$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5556        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5557$as_echo_n "checking for COMM... " >&6; }
5558        if test ! -x "$tool_specified"; then
5559          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5560$as_echo "not found" >&6; }
5561          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5562        fi
5563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5564$as_echo "$tool_specified" >&6; }
5565      fi
5566    fi
5567  fi
5568
5569
5570
5571  if test "x$COMM" = x; then
5572    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5573  fi
5574
5575
5576
5577
5578
5579  # Publish this variable in the help.
5580
5581
5582  if test "x$CP" = x; then
5583    # The variable is not set by user, try to locate tool using the code snippet
5584    for ac_prog in cp
5585do
5586  # Extract the first word of "$ac_prog", so it can be a program name with args.
5587set dummy $ac_prog; ac_word=$2
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
5590if ${ac_cv_path_CP+:} false; then :
5591  $as_echo_n "(cached) " >&6
5592else
5593  case $CP in
5594  [\\/]* | ?:[\\/]*)
5595  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5596  ;;
5597  *)
5598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5599for as_dir in $PATH
5600do
5601  IFS=$as_save_IFS
5602  test -z "$as_dir" && as_dir=.
5603    for ac_exec_ext in '' $ac_executable_extensions; do
5604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5605    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5607    break 2
5608  fi
5609done
5610  done
5611IFS=$as_save_IFS
5612
5613  ;;
5614esac
5615fi
5616CP=$ac_cv_path_CP
5617if test -n "$CP"; then
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5619$as_echo "$CP" >&6; }
5620else
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622$as_echo "no" >&6; }
5623fi
5624
5625
5626  test -n "$CP" && break
5627done
5628
5629  else
5630    # The variable is set, but is it from the command line or the environment?
5631
5632    # Try to remove the string !CP! from our list.
5633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5635      # If it failed, the variable was not from the command line. Ignore it,
5636      # but warn the user (except for BASH, which is always set by the calling BASH).
5637      if test "xCP" != xBASH; then
5638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5639$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5640      fi
5641      # Try to locate tool using the code snippet
5642      for ac_prog in cp
5643do
5644  # Extract the first word of "$ac_prog", so it can be a program name with args.
5645set dummy $ac_prog; ac_word=$2
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5647$as_echo_n "checking for $ac_word... " >&6; }
5648if ${ac_cv_path_CP+:} false; then :
5649  $as_echo_n "(cached) " >&6
5650else
5651  case $CP in
5652  [\\/]* | ?:[\\/]*)
5653  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5654  ;;
5655  *)
5656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5657for as_dir in $PATH
5658do
5659  IFS=$as_save_IFS
5660  test -z "$as_dir" && as_dir=.
5661    for ac_exec_ext in '' $ac_executable_extensions; do
5662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5663    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5665    break 2
5666  fi
5667done
5668  done
5669IFS=$as_save_IFS
5670
5671  ;;
5672esac
5673fi
5674CP=$ac_cv_path_CP
5675if test -n "$CP"; then
5676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5677$as_echo "$CP" >&6; }
5678else
5679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
5681fi
5682
5683
5684  test -n "$CP" && break
5685done
5686
5687    else
5688      # If it succeeded, then it was overridden by the user. We will use it
5689      # for the tool.
5690
5691      # First remove it from the list of overridden variables, so we can test
5692      # for unknown variables in the end.
5693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5694
5695      # Check if the provided tool contains a complete path.
5696      tool_specified="$CP"
5697      tool_basename="${tool_specified##*/}"
5698      if test "x$tool_basename" = "x$tool_specified"; then
5699        # A command without a complete path is provided, search $PATH.
5700        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5701$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5702        # Extract the first word of "$tool_basename", so it can be a program name with args.
5703set dummy $tool_basename; ac_word=$2
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5705$as_echo_n "checking for $ac_word... " >&6; }
5706if ${ac_cv_path_CP+:} false; then :
5707  $as_echo_n "(cached) " >&6
5708else
5709  case $CP in
5710  [\\/]* | ?:[\\/]*)
5711  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5712  ;;
5713  *)
5714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717  IFS=$as_save_IFS
5718  test -z "$as_dir" && as_dir=.
5719    for ac_exec_ext in '' $ac_executable_extensions; do
5720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5721    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5723    break 2
5724  fi
5725done
5726  done
5727IFS=$as_save_IFS
5728
5729  ;;
5730esac
5731fi
5732CP=$ac_cv_path_CP
5733if test -n "$CP"; then
5734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5735$as_echo "$CP" >&6; }
5736else
5737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
5739fi
5740
5741
5742        if test "x$CP" = x; then
5743          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5744        fi
5745      else
5746        # Otherwise we believe it is a complete path. Use it as it is.
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5748$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5750$as_echo_n "checking for CP... " >&6; }
5751        if test ! -x "$tool_specified"; then
5752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5753$as_echo "not found" >&6; }
5754          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5755        fi
5756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5757$as_echo "$tool_specified" >&6; }
5758      fi
5759    fi
5760  fi
5761
5762
5763
5764  if test "x$CP" = x; then
5765    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5766  fi
5767
5768
5769
5770
5771
5772  # Publish this variable in the help.
5773
5774
5775  if test "x$CUT" = x; then
5776    # The variable is not set by user, try to locate tool using the code snippet
5777    for ac_prog in cut
5778do
5779  # Extract the first word of "$ac_prog", so it can be a program name with args.
5780set dummy $ac_prog; ac_word=$2
5781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5782$as_echo_n "checking for $ac_word... " >&6; }
5783if ${ac_cv_path_CUT+:} false; then :
5784  $as_echo_n "(cached) " >&6
5785else
5786  case $CUT in
5787  [\\/]* | ?:[\\/]*)
5788  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5789  ;;
5790  *)
5791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5792for as_dir in $PATH
5793do
5794  IFS=$as_save_IFS
5795  test -z "$as_dir" && as_dir=.
5796    for ac_exec_ext in '' $ac_executable_extensions; do
5797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5798    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5800    break 2
5801  fi
5802done
5803  done
5804IFS=$as_save_IFS
5805
5806  ;;
5807esac
5808fi
5809CUT=$ac_cv_path_CUT
5810if test -n "$CUT"; then
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5812$as_echo "$CUT" >&6; }
5813else
5814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5815$as_echo "no" >&6; }
5816fi
5817
5818
5819  test -n "$CUT" && break
5820done
5821
5822  else
5823    # The variable is set, but is it from the command line or the environment?
5824
5825    # Try to remove the string !CUT! from our list.
5826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5828      # If it failed, the variable was not from the command line. Ignore it,
5829      # but warn the user (except for BASH, which is always set by the calling BASH).
5830      if test "xCUT" != xBASH; then
5831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5832$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5833      fi
5834      # Try to locate tool using the code snippet
5835      for ac_prog in cut
5836do
5837  # Extract the first word of "$ac_prog", so it can be a program name with args.
5838set dummy $ac_prog; ac_word=$2
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5840$as_echo_n "checking for $ac_word... " >&6; }
5841if ${ac_cv_path_CUT+:} false; then :
5842  $as_echo_n "(cached) " >&6
5843else
5844  case $CUT in
5845  [\\/]* | ?:[\\/]*)
5846  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5847  ;;
5848  *)
5849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5850for as_dir in $PATH
5851do
5852  IFS=$as_save_IFS
5853  test -z "$as_dir" && as_dir=.
5854    for ac_exec_ext in '' $ac_executable_extensions; do
5855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5856    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5858    break 2
5859  fi
5860done
5861  done
5862IFS=$as_save_IFS
5863
5864  ;;
5865esac
5866fi
5867CUT=$ac_cv_path_CUT
5868if test -n "$CUT"; then
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5870$as_echo "$CUT" >&6; }
5871else
5872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5873$as_echo "no" >&6; }
5874fi
5875
5876
5877  test -n "$CUT" && break
5878done
5879
5880    else
5881      # If it succeeded, then it was overridden by the user. We will use it
5882      # for the tool.
5883
5884      # First remove it from the list of overridden variables, so we can test
5885      # for unknown variables in the end.
5886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5887
5888      # Check if the provided tool contains a complete path.
5889      tool_specified="$CUT"
5890      tool_basename="${tool_specified##*/}"
5891      if test "x$tool_basename" = "x$tool_specified"; then
5892        # A command without a complete path is provided, search $PATH.
5893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5894$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5895        # Extract the first word of "$tool_basename", so it can be a program name with args.
5896set dummy $tool_basename; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_path_CUT+:} false; then :
5900  $as_echo_n "(cached) " >&6
5901else
5902  case $CUT in
5903  [\\/]* | ?:[\\/]*)
5904  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5905  ;;
5906  *)
5907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5908for as_dir in $PATH
5909do
5910  IFS=$as_save_IFS
5911  test -z "$as_dir" && as_dir=.
5912    for ac_exec_ext in '' $ac_executable_extensions; do
5913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5914    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5916    break 2
5917  fi
5918done
5919  done
5920IFS=$as_save_IFS
5921
5922  ;;
5923esac
5924fi
5925CUT=$ac_cv_path_CUT
5926if test -n "$CUT"; then
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5928$as_echo "$CUT" >&6; }
5929else
5930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935        if test "x$CUT" = x; then
5936          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5937        fi
5938      else
5939        # Otherwise we believe it is a complete path. Use it as it is.
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5941$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5942        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5943$as_echo_n "checking for CUT... " >&6; }
5944        if test ! -x "$tool_specified"; then
5945          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5946$as_echo "not found" >&6; }
5947          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5948        fi
5949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5950$as_echo "$tool_specified" >&6; }
5951      fi
5952    fi
5953  fi
5954
5955
5956
5957  if test "x$CUT" = x; then
5958    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5959  fi
5960
5961
5962
5963
5964
5965  # Publish this variable in the help.
5966
5967
5968  if test "x$DATE" = x; then
5969    # The variable is not set by user, try to locate tool using the code snippet
5970    for ac_prog in date
5971do
5972  # Extract the first word of "$ac_prog", so it can be a program name with args.
5973set dummy $ac_prog; ac_word=$2
5974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5975$as_echo_n "checking for $ac_word... " >&6; }
5976if ${ac_cv_path_DATE+:} false; then :
5977  $as_echo_n "(cached) " >&6
5978else
5979  case $DATE in
5980  [\\/]* | ?:[\\/]*)
5981  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5982  ;;
5983  *)
5984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987  IFS=$as_save_IFS
5988  test -z "$as_dir" && as_dir=.
5989    for ac_exec_ext in '' $ac_executable_extensions; do
5990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5991    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993    break 2
5994  fi
5995done
5996  done
5997IFS=$as_save_IFS
5998
5999  ;;
6000esac
6001fi
6002DATE=$ac_cv_path_DATE
6003if test -n "$DATE"; then
6004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6005$as_echo "$DATE" >&6; }
6006else
6007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6008$as_echo "no" >&6; }
6009fi
6010
6011
6012  test -n "$DATE" && break
6013done
6014
6015  else
6016    # The variable is set, but is it from the command line or the environment?
6017
6018    # Try to remove the string !DATE! from our list.
6019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6021      # If it failed, the variable was not from the command line. Ignore it,
6022      # but warn the user (except for BASH, which is always set by the calling BASH).
6023      if test "xDATE" != xBASH; then
6024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6025$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6026      fi
6027      # Try to locate tool using the code snippet
6028      for ac_prog in date
6029do
6030  # Extract the first word of "$ac_prog", so it can be a program name with args.
6031set dummy $ac_prog; ac_word=$2
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033$as_echo_n "checking for $ac_word... " >&6; }
6034if ${ac_cv_path_DATE+:} false; then :
6035  $as_echo_n "(cached) " >&6
6036else
6037  case $DATE in
6038  [\\/]* | ?:[\\/]*)
6039  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6040  ;;
6041  *)
6042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6043for as_dir in $PATH
6044do
6045  IFS=$as_save_IFS
6046  test -z "$as_dir" && as_dir=.
6047    for ac_exec_ext in '' $ac_executable_extensions; do
6048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6049    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6051    break 2
6052  fi
6053done
6054  done
6055IFS=$as_save_IFS
6056
6057  ;;
6058esac
6059fi
6060DATE=$ac_cv_path_DATE
6061if test -n "$DATE"; then
6062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6063$as_echo "$DATE" >&6; }
6064else
6065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6066$as_echo "no" >&6; }
6067fi
6068
6069
6070  test -n "$DATE" && break
6071done
6072
6073    else
6074      # If it succeeded, then it was overridden by the user. We will use it
6075      # for the tool.
6076
6077      # First remove it from the list of overridden variables, so we can test
6078      # for unknown variables in the end.
6079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6080
6081      # Check if the provided tool contains a complete path.
6082      tool_specified="$DATE"
6083      tool_basename="${tool_specified##*/}"
6084      if test "x$tool_basename" = "x$tool_specified"; then
6085        # A command without a complete path is provided, search $PATH.
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6087$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6088        # Extract the first word of "$tool_basename", so it can be a program name with args.
6089set dummy $tool_basename; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_path_DATE+:} false; then :
6093  $as_echo_n "(cached) " >&6
6094else
6095  case $DATE in
6096  [\\/]* | ?:[\\/]*)
6097  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6098  ;;
6099  *)
6100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103  IFS=$as_save_IFS
6104  test -z "$as_dir" && as_dir=.
6105    for ac_exec_ext in '' $ac_executable_extensions; do
6106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6107    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6109    break 2
6110  fi
6111done
6112  done
6113IFS=$as_save_IFS
6114
6115  ;;
6116esac
6117fi
6118DATE=$ac_cv_path_DATE
6119if test -n "$DATE"; then
6120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6121$as_echo "$DATE" >&6; }
6122else
6123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128        if test "x$DATE" = x; then
6129          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6130        fi
6131      else
6132        # Otherwise we believe it is a complete path. Use it as it is.
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6134$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6136$as_echo_n "checking for DATE... " >&6; }
6137        if test ! -x "$tool_specified"; then
6138          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6139$as_echo "not found" >&6; }
6140          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6141        fi
6142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6143$as_echo "$tool_specified" >&6; }
6144      fi
6145    fi
6146  fi
6147
6148
6149
6150  if test "x$DATE" = x; then
6151    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6152  fi
6153
6154
6155
6156
6157
6158  # Publish this variable in the help.
6159
6160
6161  if test "x$DIFF" = x; then
6162    # The variable is not set by user, try to locate tool using the code snippet
6163    for ac_prog in gdiff diff
6164do
6165  # Extract the first word of "$ac_prog", so it can be a program name with args.
6166set dummy $ac_prog; ac_word=$2
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6168$as_echo_n "checking for $ac_word... " >&6; }
6169if ${ac_cv_path_DIFF+:} false; then :
6170  $as_echo_n "(cached) " >&6
6171else
6172  case $DIFF in
6173  [\\/]* | ?:[\\/]*)
6174  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6175  ;;
6176  *)
6177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178for as_dir in $PATH
6179do
6180  IFS=$as_save_IFS
6181  test -z "$as_dir" && as_dir=.
6182    for ac_exec_ext in '' $ac_executable_extensions; do
6183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6184    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6186    break 2
6187  fi
6188done
6189  done
6190IFS=$as_save_IFS
6191
6192  ;;
6193esac
6194fi
6195DIFF=$ac_cv_path_DIFF
6196if test -n "$DIFF"; then
6197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6198$as_echo "$DIFF" >&6; }
6199else
6200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6201$as_echo "no" >&6; }
6202fi
6203
6204
6205  test -n "$DIFF" && break
6206done
6207
6208  else
6209    # The variable is set, but is it from the command line or the environment?
6210
6211    # Try to remove the string !DIFF! from our list.
6212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6214      # If it failed, the variable was not from the command line. Ignore it,
6215      # but warn the user (except for BASH, which is always set by the calling BASH).
6216      if test "xDIFF" != xBASH; then
6217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6218$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6219      fi
6220      # Try to locate tool using the code snippet
6221      for ac_prog in gdiff diff
6222do
6223  # Extract the first word of "$ac_prog", so it can be a program name with args.
6224set dummy $ac_prog; ac_word=$2
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6226$as_echo_n "checking for $ac_word... " >&6; }
6227if ${ac_cv_path_DIFF+:} false; then :
6228  $as_echo_n "(cached) " >&6
6229else
6230  case $DIFF in
6231  [\\/]* | ?:[\\/]*)
6232  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6233  ;;
6234  *)
6235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236for as_dir in $PATH
6237do
6238  IFS=$as_save_IFS
6239  test -z "$as_dir" && as_dir=.
6240    for ac_exec_ext in '' $ac_executable_extensions; do
6241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6242    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6244    break 2
6245  fi
6246done
6247  done
6248IFS=$as_save_IFS
6249
6250  ;;
6251esac
6252fi
6253DIFF=$ac_cv_path_DIFF
6254if test -n "$DIFF"; then
6255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6256$as_echo "$DIFF" >&6; }
6257else
6258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259$as_echo "no" >&6; }
6260fi
6261
6262
6263  test -n "$DIFF" && break
6264done
6265
6266    else
6267      # If it succeeded, then it was overridden by the user. We will use it
6268      # for the tool.
6269
6270      # First remove it from the list of overridden variables, so we can test
6271      # for unknown variables in the end.
6272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6273
6274      # Check if the provided tool contains a complete path.
6275      tool_specified="$DIFF"
6276      tool_basename="${tool_specified##*/}"
6277      if test "x$tool_basename" = "x$tool_specified"; then
6278        # A command without a complete path is provided, search $PATH.
6279        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6280$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6281        # Extract the first word of "$tool_basename", so it can be a program name with args.
6282set dummy $tool_basename; ac_word=$2
6283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6284$as_echo_n "checking for $ac_word... " >&6; }
6285if ${ac_cv_path_DIFF+:} false; then :
6286  $as_echo_n "(cached) " >&6
6287else
6288  case $DIFF in
6289  [\\/]* | ?:[\\/]*)
6290  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6291  ;;
6292  *)
6293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6294for as_dir in $PATH
6295do
6296  IFS=$as_save_IFS
6297  test -z "$as_dir" && as_dir=.
6298    for ac_exec_ext in '' $ac_executable_extensions; do
6299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6300    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6302    break 2
6303  fi
6304done
6305  done
6306IFS=$as_save_IFS
6307
6308  ;;
6309esac
6310fi
6311DIFF=$ac_cv_path_DIFF
6312if test -n "$DIFF"; then
6313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6314$as_echo "$DIFF" >&6; }
6315else
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317$as_echo "no" >&6; }
6318fi
6319
6320
6321        if test "x$DIFF" = x; then
6322          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6323        fi
6324      else
6325        # Otherwise we believe it is a complete path. Use it as it is.
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6327$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6328        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6329$as_echo_n "checking for DIFF... " >&6; }
6330        if test ! -x "$tool_specified"; then
6331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6332$as_echo "not found" >&6; }
6333          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6334        fi
6335        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6336$as_echo "$tool_specified" >&6; }
6337      fi
6338    fi
6339  fi
6340
6341
6342
6343  if test "x$DIFF" = x; then
6344    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6345  fi
6346
6347
6348
6349
6350
6351  # Publish this variable in the help.
6352
6353
6354  if test "x$DIRNAME" = x; then
6355    # The variable is not set by user, try to locate tool using the code snippet
6356    for ac_prog in dirname
6357do
6358  # Extract the first word of "$ac_prog", so it can be a program name with args.
6359set dummy $ac_prog; ac_word=$2
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6361$as_echo_n "checking for $ac_word... " >&6; }
6362if ${ac_cv_path_DIRNAME+:} false; then :
6363  $as_echo_n "(cached) " >&6
6364else
6365  case $DIRNAME in
6366  [\\/]* | ?:[\\/]*)
6367  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6368  ;;
6369  *)
6370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6371for as_dir in $PATH
6372do
6373  IFS=$as_save_IFS
6374  test -z "$as_dir" && as_dir=.
6375    for ac_exec_ext in '' $ac_executable_extensions; do
6376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6377    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6379    break 2
6380  fi
6381done
6382  done
6383IFS=$as_save_IFS
6384
6385  ;;
6386esac
6387fi
6388DIRNAME=$ac_cv_path_DIRNAME
6389if test -n "$DIRNAME"; then
6390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6391$as_echo "$DIRNAME" >&6; }
6392else
6393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; }
6395fi
6396
6397
6398  test -n "$DIRNAME" && break
6399done
6400
6401  else
6402    # The variable is set, but is it from the command line or the environment?
6403
6404    # Try to remove the string !DIRNAME! from our list.
6405    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6406    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6407      # If it failed, the variable was not from the command line. Ignore it,
6408      # but warn the user (except for BASH, which is always set by the calling BASH).
6409      if test "xDIRNAME" != xBASH; then
6410        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6411$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6412      fi
6413      # Try to locate tool using the code snippet
6414      for ac_prog in dirname
6415do
6416  # Extract the first word of "$ac_prog", so it can be a program name with args.
6417set dummy $ac_prog; ac_word=$2
6418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419$as_echo_n "checking for $ac_word... " >&6; }
6420if ${ac_cv_path_DIRNAME+:} false; then :
6421  $as_echo_n "(cached) " >&6
6422else
6423  case $DIRNAME in
6424  [\\/]* | ?:[\\/]*)
6425  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6426  ;;
6427  *)
6428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6429for as_dir in $PATH
6430do
6431  IFS=$as_save_IFS
6432  test -z "$as_dir" && as_dir=.
6433    for ac_exec_ext in '' $ac_executable_extensions; do
6434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6435    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6437    break 2
6438  fi
6439done
6440  done
6441IFS=$as_save_IFS
6442
6443  ;;
6444esac
6445fi
6446DIRNAME=$ac_cv_path_DIRNAME
6447if test -n "$DIRNAME"; then
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6449$as_echo "$DIRNAME" >&6; }
6450else
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456  test -n "$DIRNAME" && break
6457done
6458
6459    else
6460      # If it succeeded, then it was overridden by the user. We will use it
6461      # for the tool.
6462
6463      # First remove it from the list of overridden variables, so we can test
6464      # for unknown variables in the end.
6465      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6466
6467      # Check if the provided tool contains a complete path.
6468      tool_specified="$DIRNAME"
6469      tool_basename="${tool_specified##*/}"
6470      if test "x$tool_basename" = "x$tool_specified"; then
6471        # A command without a complete path is provided, search $PATH.
6472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6473$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6474        # Extract the first word of "$tool_basename", so it can be a program name with args.
6475set dummy $tool_basename; ac_word=$2
6476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6477$as_echo_n "checking for $ac_word... " >&6; }
6478if ${ac_cv_path_DIRNAME+:} false; then :
6479  $as_echo_n "(cached) " >&6
6480else
6481  case $DIRNAME in
6482  [\\/]* | ?:[\\/]*)
6483  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6484  ;;
6485  *)
6486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487for as_dir in $PATH
6488do
6489  IFS=$as_save_IFS
6490  test -z "$as_dir" && as_dir=.
6491    for ac_exec_ext in '' $ac_executable_extensions; do
6492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6493    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6495    break 2
6496  fi
6497done
6498  done
6499IFS=$as_save_IFS
6500
6501  ;;
6502esac
6503fi
6504DIRNAME=$ac_cv_path_DIRNAME
6505if test -n "$DIRNAME"; then
6506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6507$as_echo "$DIRNAME" >&6; }
6508else
6509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6510$as_echo "no" >&6; }
6511fi
6512
6513
6514        if test "x$DIRNAME" = x; then
6515          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6516        fi
6517      else
6518        # Otherwise we believe it is a complete path. Use it as it is.
6519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6520$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6522$as_echo_n "checking for DIRNAME... " >&6; }
6523        if test ! -x "$tool_specified"; then
6524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6525$as_echo "not found" >&6; }
6526          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6527        fi
6528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6529$as_echo "$tool_specified" >&6; }
6530      fi
6531    fi
6532  fi
6533
6534
6535
6536  if test "x$DIRNAME" = x; then
6537    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6538  fi
6539
6540
6541
6542
6543
6544  # Publish this variable in the help.
6545
6546
6547  if test "x$ECHO" = x; then
6548    # The variable is not set by user, try to locate tool using the code snippet
6549    for ac_prog in echo
6550do
6551  # Extract the first word of "$ac_prog", so it can be a program name with args.
6552set dummy $ac_prog; ac_word=$2
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6554$as_echo_n "checking for $ac_word... " >&6; }
6555if ${ac_cv_path_ECHO+:} false; then :
6556  $as_echo_n "(cached) " >&6
6557else
6558  case $ECHO in
6559  [\\/]* | ?:[\\/]*)
6560  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6561  ;;
6562  *)
6563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6564for as_dir in $PATH
6565do
6566  IFS=$as_save_IFS
6567  test -z "$as_dir" && as_dir=.
6568    for ac_exec_ext in '' $ac_executable_extensions; do
6569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6570    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6572    break 2
6573  fi
6574done
6575  done
6576IFS=$as_save_IFS
6577
6578  ;;
6579esac
6580fi
6581ECHO=$ac_cv_path_ECHO
6582if test -n "$ECHO"; then
6583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6584$as_echo "$ECHO" >&6; }
6585else
6586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
6588fi
6589
6590
6591  test -n "$ECHO" && break
6592done
6593
6594  else
6595    # The variable is set, but is it from the command line or the environment?
6596
6597    # Try to remove the string !ECHO! from our list.
6598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6600      # If it failed, the variable was not from the command line. Ignore it,
6601      # but warn the user (except for BASH, which is always set by the calling BASH).
6602      if test "xECHO" != xBASH; then
6603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6604$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6605      fi
6606      # Try to locate tool using the code snippet
6607      for ac_prog in echo
6608do
6609  # Extract the first word of "$ac_prog", so it can be a program name with args.
6610set dummy $ac_prog; ac_word=$2
6611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6612$as_echo_n "checking for $ac_word... " >&6; }
6613if ${ac_cv_path_ECHO+:} false; then :
6614  $as_echo_n "(cached) " >&6
6615else
6616  case $ECHO in
6617  [\\/]* | ?:[\\/]*)
6618  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6619  ;;
6620  *)
6621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6622for as_dir in $PATH
6623do
6624  IFS=$as_save_IFS
6625  test -z "$as_dir" && as_dir=.
6626    for ac_exec_ext in '' $ac_executable_extensions; do
6627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6628    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6630    break 2
6631  fi
6632done
6633  done
6634IFS=$as_save_IFS
6635
6636  ;;
6637esac
6638fi
6639ECHO=$ac_cv_path_ECHO
6640if test -n "$ECHO"; then
6641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6642$as_echo "$ECHO" >&6; }
6643else
6644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645$as_echo "no" >&6; }
6646fi
6647
6648
6649  test -n "$ECHO" && break
6650done
6651
6652    else
6653      # If it succeeded, then it was overridden by the user. We will use it
6654      # for the tool.
6655
6656      # First remove it from the list of overridden variables, so we can test
6657      # for unknown variables in the end.
6658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6659
6660      # Check if the provided tool contains a complete path.
6661      tool_specified="$ECHO"
6662      tool_basename="${tool_specified##*/}"
6663      if test "x$tool_basename" = "x$tool_specified"; then
6664        # A command without a complete path is provided, search $PATH.
6665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6666$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6667        # Extract the first word of "$tool_basename", so it can be a program name with args.
6668set dummy $tool_basename; ac_word=$2
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6670$as_echo_n "checking for $ac_word... " >&6; }
6671if ${ac_cv_path_ECHO+:} false; then :
6672  $as_echo_n "(cached) " >&6
6673else
6674  case $ECHO in
6675  [\\/]* | ?:[\\/]*)
6676  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6677  ;;
6678  *)
6679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6680for as_dir in $PATH
6681do
6682  IFS=$as_save_IFS
6683  test -z "$as_dir" && as_dir=.
6684    for ac_exec_ext in '' $ac_executable_extensions; do
6685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6686    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6688    break 2
6689  fi
6690done
6691  done
6692IFS=$as_save_IFS
6693
6694  ;;
6695esac
6696fi
6697ECHO=$ac_cv_path_ECHO
6698if test -n "$ECHO"; then
6699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6700$as_echo "$ECHO" >&6; }
6701else
6702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6703$as_echo "no" >&6; }
6704fi
6705
6706
6707        if test "x$ECHO" = x; then
6708          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6709        fi
6710      else
6711        # Otherwise we believe it is a complete path. Use it as it is.
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6713$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6715$as_echo_n "checking for ECHO... " >&6; }
6716        if test ! -x "$tool_specified"; then
6717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6718$as_echo "not found" >&6; }
6719          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6720        fi
6721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6722$as_echo "$tool_specified" >&6; }
6723      fi
6724    fi
6725  fi
6726
6727
6728
6729  if test "x$ECHO" = x; then
6730    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6731  fi
6732
6733
6734
6735
6736
6737  # Publish this variable in the help.
6738
6739
6740  if test "x$EXPR" = x; then
6741    # The variable is not set by user, try to locate tool using the code snippet
6742    for ac_prog in expr
6743do
6744  # Extract the first word of "$ac_prog", so it can be a program name with args.
6745set dummy $ac_prog; ac_word=$2
6746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6747$as_echo_n "checking for $ac_word... " >&6; }
6748if ${ac_cv_path_EXPR+:} false; then :
6749  $as_echo_n "(cached) " >&6
6750else
6751  case $EXPR in
6752  [\\/]* | ?:[\\/]*)
6753  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6754  ;;
6755  *)
6756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6757for as_dir in $PATH
6758do
6759  IFS=$as_save_IFS
6760  test -z "$as_dir" && as_dir=.
6761    for ac_exec_ext in '' $ac_executable_extensions; do
6762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6763    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6765    break 2
6766  fi
6767done
6768  done
6769IFS=$as_save_IFS
6770
6771  ;;
6772esac
6773fi
6774EXPR=$ac_cv_path_EXPR
6775if test -n "$EXPR"; then
6776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6777$as_echo "$EXPR" >&6; }
6778else
6779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6780$as_echo "no" >&6; }
6781fi
6782
6783
6784  test -n "$EXPR" && break
6785done
6786
6787  else
6788    # The variable is set, but is it from the command line or the environment?
6789
6790    # Try to remove the string !EXPR! from our list.
6791    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6792    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6793      # If it failed, the variable was not from the command line. Ignore it,
6794      # but warn the user (except for BASH, which is always set by the calling BASH).
6795      if test "xEXPR" != xBASH; then
6796        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6797$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6798      fi
6799      # Try to locate tool using the code snippet
6800      for ac_prog in expr
6801do
6802  # Extract the first word of "$ac_prog", so it can be a program name with args.
6803set dummy $ac_prog; ac_word=$2
6804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6805$as_echo_n "checking for $ac_word... " >&6; }
6806if ${ac_cv_path_EXPR+:} false; then :
6807  $as_echo_n "(cached) " >&6
6808else
6809  case $EXPR in
6810  [\\/]* | ?:[\\/]*)
6811  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6812  ;;
6813  *)
6814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6815for as_dir in $PATH
6816do
6817  IFS=$as_save_IFS
6818  test -z "$as_dir" && as_dir=.
6819    for ac_exec_ext in '' $ac_executable_extensions; do
6820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6821    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6823    break 2
6824  fi
6825done
6826  done
6827IFS=$as_save_IFS
6828
6829  ;;
6830esac
6831fi
6832EXPR=$ac_cv_path_EXPR
6833if test -n "$EXPR"; then
6834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6835$as_echo "$EXPR" >&6; }
6836else
6837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6838$as_echo "no" >&6; }
6839fi
6840
6841
6842  test -n "$EXPR" && break
6843done
6844
6845    else
6846      # If it succeeded, then it was overridden by the user. We will use it
6847      # for the tool.
6848
6849      # First remove it from the list of overridden variables, so we can test
6850      # for unknown variables in the end.
6851      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6852
6853      # Check if the provided tool contains a complete path.
6854      tool_specified="$EXPR"
6855      tool_basename="${tool_specified##*/}"
6856      if test "x$tool_basename" = "x$tool_specified"; then
6857        # A command without a complete path is provided, search $PATH.
6858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6859$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6860        # Extract the first word of "$tool_basename", so it can be a program name with args.
6861set dummy $tool_basename; ac_word=$2
6862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6863$as_echo_n "checking for $ac_word... " >&6; }
6864if ${ac_cv_path_EXPR+:} false; then :
6865  $as_echo_n "(cached) " >&6
6866else
6867  case $EXPR in
6868  [\\/]* | ?:[\\/]*)
6869  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6870  ;;
6871  *)
6872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6873for as_dir in $PATH
6874do
6875  IFS=$as_save_IFS
6876  test -z "$as_dir" && as_dir=.
6877    for ac_exec_ext in '' $ac_executable_extensions; do
6878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6879    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6881    break 2
6882  fi
6883done
6884  done
6885IFS=$as_save_IFS
6886
6887  ;;
6888esac
6889fi
6890EXPR=$ac_cv_path_EXPR
6891if test -n "$EXPR"; then
6892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6893$as_echo "$EXPR" >&6; }
6894else
6895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6896$as_echo "no" >&6; }
6897fi
6898
6899
6900        if test "x$EXPR" = x; then
6901          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6902        fi
6903      else
6904        # Otherwise we believe it is a complete path. Use it as it is.
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6906$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6908$as_echo_n "checking for EXPR... " >&6; }
6909        if test ! -x "$tool_specified"; then
6910          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6911$as_echo "not found" >&6; }
6912          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6913        fi
6914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6915$as_echo "$tool_specified" >&6; }
6916      fi
6917    fi
6918  fi
6919
6920
6921
6922  if test "x$EXPR" = x; then
6923    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6924  fi
6925
6926
6927
6928
6929
6930  # Publish this variable in the help.
6931
6932
6933  if test "x$FILE" = x; then
6934    # The variable is not set by user, try to locate tool using the code snippet
6935    for ac_prog in file
6936do
6937  # Extract the first word of "$ac_prog", so it can be a program name with args.
6938set dummy $ac_prog; ac_word=$2
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6940$as_echo_n "checking for $ac_word... " >&6; }
6941if ${ac_cv_path_FILE+:} false; then :
6942  $as_echo_n "(cached) " >&6
6943else
6944  case $FILE in
6945  [\\/]* | ?:[\\/]*)
6946  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6947  ;;
6948  *)
6949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6950for as_dir in $PATH
6951do
6952  IFS=$as_save_IFS
6953  test -z "$as_dir" && as_dir=.
6954    for ac_exec_ext in '' $ac_executable_extensions; do
6955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6956    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6958    break 2
6959  fi
6960done
6961  done
6962IFS=$as_save_IFS
6963
6964  ;;
6965esac
6966fi
6967FILE=$ac_cv_path_FILE
6968if test -n "$FILE"; then
6969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6970$as_echo "$FILE" >&6; }
6971else
6972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6973$as_echo "no" >&6; }
6974fi
6975
6976
6977  test -n "$FILE" && break
6978done
6979
6980  else
6981    # The variable is set, but is it from the command line or the environment?
6982
6983    # Try to remove the string !FILE! from our list.
6984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6986      # If it failed, the variable was not from the command line. Ignore it,
6987      # but warn the user (except for BASH, which is always set by the calling BASH).
6988      if test "xFILE" != xBASH; then
6989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6990$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6991      fi
6992      # Try to locate tool using the code snippet
6993      for ac_prog in file
6994do
6995  # Extract the first word of "$ac_prog", so it can be a program name with args.
6996set dummy $ac_prog; ac_word=$2
6997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6998$as_echo_n "checking for $ac_word... " >&6; }
6999if ${ac_cv_path_FILE+:} false; then :
7000  $as_echo_n "(cached) " >&6
7001else
7002  case $FILE in
7003  [\\/]* | ?:[\\/]*)
7004  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7005  ;;
7006  *)
7007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7008for as_dir in $PATH
7009do
7010  IFS=$as_save_IFS
7011  test -z "$as_dir" && as_dir=.
7012    for ac_exec_ext in '' $ac_executable_extensions; do
7013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7014    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7016    break 2
7017  fi
7018done
7019  done
7020IFS=$as_save_IFS
7021
7022  ;;
7023esac
7024fi
7025FILE=$ac_cv_path_FILE
7026if test -n "$FILE"; then
7027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7028$as_echo "$FILE" >&6; }
7029else
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7031$as_echo "no" >&6; }
7032fi
7033
7034
7035  test -n "$FILE" && break
7036done
7037
7038    else
7039      # If it succeeded, then it was overridden by the user. We will use it
7040      # for the tool.
7041
7042      # First remove it from the list of overridden variables, so we can test
7043      # for unknown variables in the end.
7044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7045
7046      # Check if the provided tool contains a complete path.
7047      tool_specified="$FILE"
7048      tool_basename="${tool_specified##*/}"
7049      if test "x$tool_basename" = "x$tool_specified"; then
7050        # A command without a complete path is provided, search $PATH.
7051        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7052$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7053        # Extract the first word of "$tool_basename", so it can be a program name with args.
7054set dummy $tool_basename; ac_word=$2
7055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7056$as_echo_n "checking for $ac_word... " >&6; }
7057if ${ac_cv_path_FILE+:} false; then :
7058  $as_echo_n "(cached) " >&6
7059else
7060  case $FILE in
7061  [\\/]* | ?:[\\/]*)
7062  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7063  ;;
7064  *)
7065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7066for as_dir in $PATH
7067do
7068  IFS=$as_save_IFS
7069  test -z "$as_dir" && as_dir=.
7070    for ac_exec_ext in '' $ac_executable_extensions; do
7071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7072    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7074    break 2
7075  fi
7076done
7077  done
7078IFS=$as_save_IFS
7079
7080  ;;
7081esac
7082fi
7083FILE=$ac_cv_path_FILE
7084if test -n "$FILE"; then
7085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7086$as_echo "$FILE" >&6; }
7087else
7088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7089$as_echo "no" >&6; }
7090fi
7091
7092
7093        if test "x$FILE" = x; then
7094          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7095        fi
7096      else
7097        # Otherwise we believe it is a complete path. Use it as it is.
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7099$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7101$as_echo_n "checking for FILE... " >&6; }
7102        if test ! -x "$tool_specified"; then
7103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7104$as_echo "not found" >&6; }
7105          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7106        fi
7107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7108$as_echo "$tool_specified" >&6; }
7109      fi
7110    fi
7111  fi
7112
7113
7114
7115  if test "x$FILE" = x; then
7116    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7117  fi
7118
7119
7120
7121
7122
7123  # Publish this variable in the help.
7124
7125
7126  if test "x$FIND" = x; then
7127    # The variable is not set by user, try to locate tool using the code snippet
7128    for ac_prog in find
7129do
7130  # Extract the first word of "$ac_prog", so it can be a program name with args.
7131set dummy $ac_prog; ac_word=$2
7132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7133$as_echo_n "checking for $ac_word... " >&6; }
7134if ${ac_cv_path_FIND+:} false; then :
7135  $as_echo_n "(cached) " >&6
7136else
7137  case $FIND in
7138  [\\/]* | ?:[\\/]*)
7139  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7140  ;;
7141  *)
7142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7143for as_dir in $PATH
7144do
7145  IFS=$as_save_IFS
7146  test -z "$as_dir" && as_dir=.
7147    for ac_exec_ext in '' $ac_executable_extensions; do
7148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7149    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7151    break 2
7152  fi
7153done
7154  done
7155IFS=$as_save_IFS
7156
7157  ;;
7158esac
7159fi
7160FIND=$ac_cv_path_FIND
7161if test -n "$FIND"; then
7162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7163$as_echo "$FIND" >&6; }
7164else
7165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7166$as_echo "no" >&6; }
7167fi
7168
7169
7170  test -n "$FIND" && break
7171done
7172
7173  else
7174    # The variable is set, but is it from the command line or the environment?
7175
7176    # Try to remove the string !FIND! from our list.
7177    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7178    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7179      # If it failed, the variable was not from the command line. Ignore it,
7180      # but warn the user (except for BASH, which is always set by the calling BASH).
7181      if test "xFIND" != xBASH; then
7182        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7183$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7184      fi
7185      # Try to locate tool using the code snippet
7186      for ac_prog in find
7187do
7188  # Extract the first word of "$ac_prog", so it can be a program name with args.
7189set dummy $ac_prog; ac_word=$2
7190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7191$as_echo_n "checking for $ac_word... " >&6; }
7192if ${ac_cv_path_FIND+:} false; then :
7193  $as_echo_n "(cached) " >&6
7194else
7195  case $FIND in
7196  [\\/]* | ?:[\\/]*)
7197  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7198  ;;
7199  *)
7200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7201for as_dir in $PATH
7202do
7203  IFS=$as_save_IFS
7204  test -z "$as_dir" && as_dir=.
7205    for ac_exec_ext in '' $ac_executable_extensions; do
7206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7207    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7209    break 2
7210  fi
7211done
7212  done
7213IFS=$as_save_IFS
7214
7215  ;;
7216esac
7217fi
7218FIND=$ac_cv_path_FIND
7219if test -n "$FIND"; then
7220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7221$as_echo "$FIND" >&6; }
7222else
7223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7224$as_echo "no" >&6; }
7225fi
7226
7227
7228  test -n "$FIND" && break
7229done
7230
7231    else
7232      # If it succeeded, then it was overridden by the user. We will use it
7233      # for the tool.
7234
7235      # First remove it from the list of overridden variables, so we can test
7236      # for unknown variables in the end.
7237      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7238
7239      # Check if the provided tool contains a complete path.
7240      tool_specified="$FIND"
7241      tool_basename="${tool_specified##*/}"
7242      if test "x$tool_basename" = "x$tool_specified"; then
7243        # A command without a complete path is provided, search $PATH.
7244        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7245$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7246        # Extract the first word of "$tool_basename", so it can be a program name with args.
7247set dummy $tool_basename; ac_word=$2
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7249$as_echo_n "checking for $ac_word... " >&6; }
7250if ${ac_cv_path_FIND+:} false; then :
7251  $as_echo_n "(cached) " >&6
7252else
7253  case $FIND in
7254  [\\/]* | ?:[\\/]*)
7255  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7256  ;;
7257  *)
7258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259for as_dir in $PATH
7260do
7261  IFS=$as_save_IFS
7262  test -z "$as_dir" && as_dir=.
7263    for ac_exec_ext in '' $ac_executable_extensions; do
7264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7265    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7267    break 2
7268  fi
7269done
7270  done
7271IFS=$as_save_IFS
7272
7273  ;;
7274esac
7275fi
7276FIND=$ac_cv_path_FIND
7277if test -n "$FIND"; then
7278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7279$as_echo "$FIND" >&6; }
7280else
7281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7282$as_echo "no" >&6; }
7283fi
7284
7285
7286        if test "x$FIND" = x; then
7287          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7288        fi
7289      else
7290        # Otherwise we believe it is a complete path. Use it as it is.
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7292$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7294$as_echo_n "checking for FIND... " >&6; }
7295        if test ! -x "$tool_specified"; then
7296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7297$as_echo "not found" >&6; }
7298          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7299        fi
7300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7301$as_echo "$tool_specified" >&6; }
7302      fi
7303    fi
7304  fi
7305
7306
7307
7308  if test "x$FIND" = x; then
7309    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7310  fi
7311
7312
7313
7314
7315
7316  # Publish this variable in the help.
7317
7318
7319  if test "x$HEAD" = x; then
7320    # The variable is not set by user, try to locate tool using the code snippet
7321    for ac_prog in head
7322do
7323  # Extract the first word of "$ac_prog", so it can be a program name with args.
7324set dummy $ac_prog; ac_word=$2
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7326$as_echo_n "checking for $ac_word... " >&6; }
7327if ${ac_cv_path_HEAD+:} false; then :
7328  $as_echo_n "(cached) " >&6
7329else
7330  case $HEAD in
7331  [\\/]* | ?:[\\/]*)
7332  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7333  ;;
7334  *)
7335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7336for as_dir in $PATH
7337do
7338  IFS=$as_save_IFS
7339  test -z "$as_dir" && as_dir=.
7340    for ac_exec_ext in '' $ac_executable_extensions; do
7341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7342    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7344    break 2
7345  fi
7346done
7347  done
7348IFS=$as_save_IFS
7349
7350  ;;
7351esac
7352fi
7353HEAD=$ac_cv_path_HEAD
7354if test -n "$HEAD"; then
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7356$as_echo "$HEAD" >&6; }
7357else
7358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7359$as_echo "no" >&6; }
7360fi
7361
7362
7363  test -n "$HEAD" && break
7364done
7365
7366  else
7367    # The variable is set, but is it from the command line or the environment?
7368
7369    # Try to remove the string !HEAD! from our list.
7370    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7371    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7372      # If it failed, the variable was not from the command line. Ignore it,
7373      # but warn the user (except for BASH, which is always set by the calling BASH).
7374      if test "xHEAD" != xBASH; then
7375        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7376$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7377      fi
7378      # Try to locate tool using the code snippet
7379      for ac_prog in head
7380do
7381  # Extract the first word of "$ac_prog", so it can be a program name with args.
7382set dummy $ac_prog; ac_word=$2
7383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7384$as_echo_n "checking for $ac_word... " >&6; }
7385if ${ac_cv_path_HEAD+:} false; then :
7386  $as_echo_n "(cached) " >&6
7387else
7388  case $HEAD in
7389  [\\/]* | ?:[\\/]*)
7390  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7391  ;;
7392  *)
7393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7394for as_dir in $PATH
7395do
7396  IFS=$as_save_IFS
7397  test -z "$as_dir" && as_dir=.
7398    for ac_exec_ext in '' $ac_executable_extensions; do
7399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7400    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7402    break 2
7403  fi
7404done
7405  done
7406IFS=$as_save_IFS
7407
7408  ;;
7409esac
7410fi
7411HEAD=$ac_cv_path_HEAD
7412if test -n "$HEAD"; then
7413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7414$as_echo "$HEAD" >&6; }
7415else
7416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417$as_echo "no" >&6; }
7418fi
7419
7420
7421  test -n "$HEAD" && break
7422done
7423
7424    else
7425      # If it succeeded, then it was overridden by the user. We will use it
7426      # for the tool.
7427
7428      # First remove it from the list of overridden variables, so we can test
7429      # for unknown variables in the end.
7430      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7431
7432      # Check if the provided tool contains a complete path.
7433      tool_specified="$HEAD"
7434      tool_basename="${tool_specified##*/}"
7435      if test "x$tool_basename" = "x$tool_specified"; then
7436        # A command without a complete path is provided, search $PATH.
7437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7438$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7439        # Extract the first word of "$tool_basename", so it can be a program name with args.
7440set dummy $tool_basename; ac_word=$2
7441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7442$as_echo_n "checking for $ac_word... " >&6; }
7443if ${ac_cv_path_HEAD+:} false; then :
7444  $as_echo_n "(cached) " >&6
7445else
7446  case $HEAD in
7447  [\\/]* | ?:[\\/]*)
7448  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7449  ;;
7450  *)
7451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7452for as_dir in $PATH
7453do
7454  IFS=$as_save_IFS
7455  test -z "$as_dir" && as_dir=.
7456    for ac_exec_ext in '' $ac_executable_extensions; do
7457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7458    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7460    break 2
7461  fi
7462done
7463  done
7464IFS=$as_save_IFS
7465
7466  ;;
7467esac
7468fi
7469HEAD=$ac_cv_path_HEAD
7470if test -n "$HEAD"; then
7471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7472$as_echo "$HEAD" >&6; }
7473else
7474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7475$as_echo "no" >&6; }
7476fi
7477
7478
7479        if test "x$HEAD" = x; then
7480          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7481        fi
7482      else
7483        # Otherwise we believe it is a complete path. Use it as it is.
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7485$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7486        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7487$as_echo_n "checking for HEAD... " >&6; }
7488        if test ! -x "$tool_specified"; then
7489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7490$as_echo "not found" >&6; }
7491          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7492        fi
7493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7494$as_echo "$tool_specified" >&6; }
7495      fi
7496    fi
7497  fi
7498
7499
7500
7501  if test "x$HEAD" = x; then
7502    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7503  fi
7504
7505
7506
7507
7508
7509  # Publish this variable in the help.
7510
7511
7512  if test "x$LN" = x; then
7513    # The variable is not set by user, try to locate tool using the code snippet
7514    for ac_prog in ln
7515do
7516  # Extract the first word of "$ac_prog", so it can be a program name with args.
7517set dummy $ac_prog; ac_word=$2
7518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519$as_echo_n "checking for $ac_word... " >&6; }
7520if ${ac_cv_path_LN+:} false; then :
7521  $as_echo_n "(cached) " >&6
7522else
7523  case $LN in
7524  [\\/]* | ?:[\\/]*)
7525  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7526  ;;
7527  *)
7528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7529for as_dir in $PATH
7530do
7531  IFS=$as_save_IFS
7532  test -z "$as_dir" && as_dir=.
7533    for ac_exec_ext in '' $ac_executable_extensions; do
7534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7535    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7537    break 2
7538  fi
7539done
7540  done
7541IFS=$as_save_IFS
7542
7543  ;;
7544esac
7545fi
7546LN=$ac_cv_path_LN
7547if test -n "$LN"; then
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7549$as_echo "$LN" >&6; }
7550else
7551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7552$as_echo "no" >&6; }
7553fi
7554
7555
7556  test -n "$LN" && break
7557done
7558
7559  else
7560    # The variable is set, but is it from the command line or the environment?
7561
7562    # Try to remove the string !LN! from our list.
7563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7565      # If it failed, the variable was not from the command line. Ignore it,
7566      # but warn the user (except for BASH, which is always set by the calling BASH).
7567      if test "xLN" != xBASH; then
7568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7569$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7570      fi
7571      # Try to locate tool using the code snippet
7572      for ac_prog in ln
7573do
7574  # Extract the first word of "$ac_prog", so it can be a program name with args.
7575set dummy $ac_prog; ac_word=$2
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7577$as_echo_n "checking for $ac_word... " >&6; }
7578if ${ac_cv_path_LN+:} false; then :
7579  $as_echo_n "(cached) " >&6
7580else
7581  case $LN in
7582  [\\/]* | ?:[\\/]*)
7583  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7584  ;;
7585  *)
7586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7587for as_dir in $PATH
7588do
7589  IFS=$as_save_IFS
7590  test -z "$as_dir" && as_dir=.
7591    for ac_exec_ext in '' $ac_executable_extensions; do
7592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7593    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7595    break 2
7596  fi
7597done
7598  done
7599IFS=$as_save_IFS
7600
7601  ;;
7602esac
7603fi
7604LN=$ac_cv_path_LN
7605if test -n "$LN"; then
7606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7607$as_echo "$LN" >&6; }
7608else
7609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7610$as_echo "no" >&6; }
7611fi
7612
7613
7614  test -n "$LN" && break
7615done
7616
7617    else
7618      # If it succeeded, then it was overridden by the user. We will use it
7619      # for the tool.
7620
7621      # First remove it from the list of overridden variables, so we can test
7622      # for unknown variables in the end.
7623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7624
7625      # Check if the provided tool contains a complete path.
7626      tool_specified="$LN"
7627      tool_basename="${tool_specified##*/}"
7628      if test "x$tool_basename" = "x$tool_specified"; then
7629        # A command without a complete path is provided, search $PATH.
7630        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7631$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7632        # Extract the first word of "$tool_basename", so it can be a program name with args.
7633set dummy $tool_basename; ac_word=$2
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7635$as_echo_n "checking for $ac_word... " >&6; }
7636if ${ac_cv_path_LN+:} false; then :
7637  $as_echo_n "(cached) " >&6
7638else
7639  case $LN in
7640  [\\/]* | ?:[\\/]*)
7641  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7642  ;;
7643  *)
7644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7645for as_dir in $PATH
7646do
7647  IFS=$as_save_IFS
7648  test -z "$as_dir" && as_dir=.
7649    for ac_exec_ext in '' $ac_executable_extensions; do
7650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7651    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7653    break 2
7654  fi
7655done
7656  done
7657IFS=$as_save_IFS
7658
7659  ;;
7660esac
7661fi
7662LN=$ac_cv_path_LN
7663if test -n "$LN"; then
7664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7665$as_echo "$LN" >&6; }
7666else
7667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7668$as_echo "no" >&6; }
7669fi
7670
7671
7672        if test "x$LN" = x; then
7673          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7674        fi
7675      else
7676        # Otherwise we believe it is a complete path. Use it as it is.
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7678$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7680$as_echo_n "checking for LN... " >&6; }
7681        if test ! -x "$tool_specified"; then
7682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7683$as_echo "not found" >&6; }
7684          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7685        fi
7686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7687$as_echo "$tool_specified" >&6; }
7688      fi
7689    fi
7690  fi
7691
7692
7693
7694  if test "x$LN" = x; then
7695    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7696  fi
7697
7698
7699
7700
7701
7702  # Publish this variable in the help.
7703
7704
7705  if test "x$LS" = x; then
7706    # The variable is not set by user, try to locate tool using the code snippet
7707    for ac_prog in ls
7708do
7709  # Extract the first word of "$ac_prog", so it can be a program name with args.
7710set dummy $ac_prog; ac_word=$2
7711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7712$as_echo_n "checking for $ac_word... " >&6; }
7713if ${ac_cv_path_LS+:} false; then :
7714  $as_echo_n "(cached) " >&6
7715else
7716  case $LS in
7717  [\\/]* | ?:[\\/]*)
7718  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7719  ;;
7720  *)
7721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7722for as_dir in $PATH
7723do
7724  IFS=$as_save_IFS
7725  test -z "$as_dir" && as_dir=.
7726    for ac_exec_ext in '' $ac_executable_extensions; do
7727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7728    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7730    break 2
7731  fi
7732done
7733  done
7734IFS=$as_save_IFS
7735
7736  ;;
7737esac
7738fi
7739LS=$ac_cv_path_LS
7740if test -n "$LS"; then
7741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7742$as_echo "$LS" >&6; }
7743else
7744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7745$as_echo "no" >&6; }
7746fi
7747
7748
7749  test -n "$LS" && break
7750done
7751
7752  else
7753    # The variable is set, but is it from the command line or the environment?
7754
7755    # Try to remove the string !LS! from our list.
7756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7758      # If it failed, the variable was not from the command line. Ignore it,
7759      # but warn the user (except for BASH, which is always set by the calling BASH).
7760      if test "xLS" != xBASH; then
7761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7762$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7763      fi
7764      # Try to locate tool using the code snippet
7765      for ac_prog in ls
7766do
7767  # Extract the first word of "$ac_prog", so it can be a program name with args.
7768set dummy $ac_prog; ac_word=$2
7769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7770$as_echo_n "checking for $ac_word... " >&6; }
7771if ${ac_cv_path_LS+:} false; then :
7772  $as_echo_n "(cached) " >&6
7773else
7774  case $LS in
7775  [\\/]* | ?:[\\/]*)
7776  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7777  ;;
7778  *)
7779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7780for as_dir in $PATH
7781do
7782  IFS=$as_save_IFS
7783  test -z "$as_dir" && as_dir=.
7784    for ac_exec_ext in '' $ac_executable_extensions; do
7785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7786    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7788    break 2
7789  fi
7790done
7791  done
7792IFS=$as_save_IFS
7793
7794  ;;
7795esac
7796fi
7797LS=$ac_cv_path_LS
7798if test -n "$LS"; then
7799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7800$as_echo "$LS" >&6; }
7801else
7802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7803$as_echo "no" >&6; }
7804fi
7805
7806
7807  test -n "$LS" && break
7808done
7809
7810    else
7811      # If it succeeded, then it was overridden by the user. We will use it
7812      # for the tool.
7813
7814      # First remove it from the list of overridden variables, so we can test
7815      # for unknown variables in the end.
7816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7817
7818      # Check if the provided tool contains a complete path.
7819      tool_specified="$LS"
7820      tool_basename="${tool_specified##*/}"
7821      if test "x$tool_basename" = "x$tool_specified"; then
7822        # A command without a complete path is provided, search $PATH.
7823        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7824$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7825        # Extract the first word of "$tool_basename", so it can be a program name with args.
7826set dummy $tool_basename; ac_word=$2
7827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7828$as_echo_n "checking for $ac_word... " >&6; }
7829if ${ac_cv_path_LS+:} false; then :
7830  $as_echo_n "(cached) " >&6
7831else
7832  case $LS in
7833  [\\/]* | ?:[\\/]*)
7834  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7835  ;;
7836  *)
7837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7838for as_dir in $PATH
7839do
7840  IFS=$as_save_IFS
7841  test -z "$as_dir" && as_dir=.
7842    for ac_exec_ext in '' $ac_executable_extensions; do
7843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7844    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7846    break 2
7847  fi
7848done
7849  done
7850IFS=$as_save_IFS
7851
7852  ;;
7853esac
7854fi
7855LS=$ac_cv_path_LS
7856if test -n "$LS"; then
7857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7858$as_echo "$LS" >&6; }
7859else
7860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7861$as_echo "no" >&6; }
7862fi
7863
7864
7865        if test "x$LS" = x; then
7866          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7867        fi
7868      else
7869        # Otherwise we believe it is a complete path. Use it as it is.
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7871$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7873$as_echo_n "checking for LS... " >&6; }
7874        if test ! -x "$tool_specified"; then
7875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7876$as_echo "not found" >&6; }
7877          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7878        fi
7879        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7880$as_echo "$tool_specified" >&6; }
7881      fi
7882    fi
7883  fi
7884
7885
7886
7887  if test "x$LS" = x; then
7888    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7889  fi
7890
7891
7892
7893
7894
7895  # Publish this variable in the help.
7896
7897
7898  if test "x$MKDIR" = x; then
7899    # The variable is not set by user, try to locate tool using the code snippet
7900    for ac_prog in mkdir
7901do
7902  # Extract the first word of "$ac_prog", so it can be a program name with args.
7903set dummy $ac_prog; ac_word=$2
7904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7905$as_echo_n "checking for $ac_word... " >&6; }
7906if ${ac_cv_path_MKDIR+:} false; then :
7907  $as_echo_n "(cached) " >&6
7908else
7909  case $MKDIR in
7910  [\\/]* | ?:[\\/]*)
7911  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7912  ;;
7913  *)
7914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7915for as_dir in $PATH
7916do
7917  IFS=$as_save_IFS
7918  test -z "$as_dir" && as_dir=.
7919    for ac_exec_ext in '' $ac_executable_extensions; do
7920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7921    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7923    break 2
7924  fi
7925done
7926  done
7927IFS=$as_save_IFS
7928
7929  ;;
7930esac
7931fi
7932MKDIR=$ac_cv_path_MKDIR
7933if test -n "$MKDIR"; then
7934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7935$as_echo "$MKDIR" >&6; }
7936else
7937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7938$as_echo "no" >&6; }
7939fi
7940
7941
7942  test -n "$MKDIR" && break
7943done
7944
7945  else
7946    # The variable is set, but is it from the command line or the environment?
7947
7948    # Try to remove the string !MKDIR! from our list.
7949    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7950    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7951      # If it failed, the variable was not from the command line. Ignore it,
7952      # but warn the user (except for BASH, which is always set by the calling BASH).
7953      if test "xMKDIR" != xBASH; then
7954        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7955$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7956      fi
7957      # Try to locate tool using the code snippet
7958      for ac_prog in mkdir
7959do
7960  # Extract the first word of "$ac_prog", so it can be a program name with args.
7961set dummy $ac_prog; ac_word=$2
7962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7963$as_echo_n "checking for $ac_word... " >&6; }
7964if ${ac_cv_path_MKDIR+:} false; then :
7965  $as_echo_n "(cached) " >&6
7966else
7967  case $MKDIR in
7968  [\\/]* | ?:[\\/]*)
7969  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7970  ;;
7971  *)
7972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7973for as_dir in $PATH
7974do
7975  IFS=$as_save_IFS
7976  test -z "$as_dir" && as_dir=.
7977    for ac_exec_ext in '' $ac_executable_extensions; do
7978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7979    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7981    break 2
7982  fi
7983done
7984  done
7985IFS=$as_save_IFS
7986
7987  ;;
7988esac
7989fi
7990MKDIR=$ac_cv_path_MKDIR
7991if test -n "$MKDIR"; then
7992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7993$as_echo "$MKDIR" >&6; }
7994else
7995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7996$as_echo "no" >&6; }
7997fi
7998
7999
8000  test -n "$MKDIR" && break
8001done
8002
8003    else
8004      # If it succeeded, then it was overridden by the user. We will use it
8005      # for the tool.
8006
8007      # First remove it from the list of overridden variables, so we can test
8008      # for unknown variables in the end.
8009      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8010
8011      # Check if the provided tool contains a complete path.
8012      tool_specified="$MKDIR"
8013      tool_basename="${tool_specified##*/}"
8014      if test "x$tool_basename" = "x$tool_specified"; then
8015        # A command without a complete path is provided, search $PATH.
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8017$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8018        # Extract the first word of "$tool_basename", so it can be a program name with args.
8019set dummy $tool_basename; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_MKDIR+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $MKDIR in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048MKDIR=$ac_cv_path_MKDIR
8049if test -n "$MKDIR"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8051$as_echo "$MKDIR" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058        if test "x$MKDIR" = x; then
8059          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8060        fi
8061      else
8062        # Otherwise we believe it is a complete path. Use it as it is.
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8064$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8065        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8066$as_echo_n "checking for MKDIR... " >&6; }
8067        if test ! -x "$tool_specified"; then
8068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8069$as_echo "not found" >&6; }
8070          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8071        fi
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8073$as_echo "$tool_specified" >&6; }
8074      fi
8075    fi
8076  fi
8077
8078
8079
8080  if test "x$MKDIR" = x; then
8081    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8082  fi
8083
8084
8085
8086
8087
8088  # Publish this variable in the help.
8089
8090
8091  if test "x$MKTEMP" = x; then
8092    # The variable is not set by user, try to locate tool using the code snippet
8093    for ac_prog in mktemp
8094do
8095  # Extract the first word of "$ac_prog", so it can be a program name with args.
8096set dummy $ac_prog; ac_word=$2
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8098$as_echo_n "checking for $ac_word... " >&6; }
8099if ${ac_cv_path_MKTEMP+:} false; then :
8100  $as_echo_n "(cached) " >&6
8101else
8102  case $MKTEMP in
8103  [\\/]* | ?:[\\/]*)
8104  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8105  ;;
8106  *)
8107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8108for as_dir in $PATH
8109do
8110  IFS=$as_save_IFS
8111  test -z "$as_dir" && as_dir=.
8112    for ac_exec_ext in '' $ac_executable_extensions; do
8113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8114    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8116    break 2
8117  fi
8118done
8119  done
8120IFS=$as_save_IFS
8121
8122  ;;
8123esac
8124fi
8125MKTEMP=$ac_cv_path_MKTEMP
8126if test -n "$MKTEMP"; then
8127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8128$as_echo "$MKTEMP" >&6; }
8129else
8130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8131$as_echo "no" >&6; }
8132fi
8133
8134
8135  test -n "$MKTEMP" && break
8136done
8137
8138  else
8139    # The variable is set, but is it from the command line or the environment?
8140
8141    # Try to remove the string !MKTEMP! from our list.
8142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8144      # If it failed, the variable was not from the command line. Ignore it,
8145      # but warn the user (except for BASH, which is always set by the calling BASH).
8146      if test "xMKTEMP" != xBASH; then
8147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8148$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8149      fi
8150      # Try to locate tool using the code snippet
8151      for ac_prog in mktemp
8152do
8153  # Extract the first word of "$ac_prog", so it can be a program name with args.
8154set dummy $ac_prog; ac_word=$2
8155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8156$as_echo_n "checking for $ac_word... " >&6; }
8157if ${ac_cv_path_MKTEMP+:} false; then :
8158  $as_echo_n "(cached) " >&6
8159else
8160  case $MKTEMP in
8161  [\\/]* | ?:[\\/]*)
8162  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8163  ;;
8164  *)
8165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8166for as_dir in $PATH
8167do
8168  IFS=$as_save_IFS
8169  test -z "$as_dir" && as_dir=.
8170    for ac_exec_ext in '' $ac_executable_extensions; do
8171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8172    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8174    break 2
8175  fi
8176done
8177  done
8178IFS=$as_save_IFS
8179
8180  ;;
8181esac
8182fi
8183MKTEMP=$ac_cv_path_MKTEMP
8184if test -n "$MKTEMP"; then
8185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8186$as_echo "$MKTEMP" >&6; }
8187else
8188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8189$as_echo "no" >&6; }
8190fi
8191
8192
8193  test -n "$MKTEMP" && break
8194done
8195
8196    else
8197      # If it succeeded, then it was overridden by the user. We will use it
8198      # for the tool.
8199
8200      # First remove it from the list of overridden variables, so we can test
8201      # for unknown variables in the end.
8202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8203
8204      # Check if the provided tool contains a complete path.
8205      tool_specified="$MKTEMP"
8206      tool_basename="${tool_specified##*/}"
8207      if test "x$tool_basename" = "x$tool_specified"; then
8208        # A command without a complete path is provided, search $PATH.
8209        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8210$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8211        # Extract the first word of "$tool_basename", so it can be a program name with args.
8212set dummy $tool_basename; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if ${ac_cv_path_MKTEMP+:} false; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  case $MKTEMP in
8219  [\\/]* | ?:[\\/]*)
8220  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8221  ;;
8222  *)
8223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8230    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238  ;;
8239esac
8240fi
8241MKTEMP=$ac_cv_path_MKTEMP
8242if test -n "$MKTEMP"; then
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8244$as_echo "$MKTEMP" >&6; }
8245else
8246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247$as_echo "no" >&6; }
8248fi
8249
8250
8251        if test "x$MKTEMP" = x; then
8252          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8253        fi
8254      else
8255        # Otherwise we believe it is a complete path. Use it as it is.
8256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8257$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8258        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8259$as_echo_n "checking for MKTEMP... " >&6; }
8260        if test ! -x "$tool_specified"; then
8261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8262$as_echo "not found" >&6; }
8263          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8264        fi
8265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8266$as_echo "$tool_specified" >&6; }
8267      fi
8268    fi
8269  fi
8270
8271
8272
8273  if test "x$MKTEMP" = x; then
8274    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8275  fi
8276
8277
8278
8279
8280
8281  # Publish this variable in the help.
8282
8283
8284  if test "x$MV" = x; then
8285    # The variable is not set by user, try to locate tool using the code snippet
8286    for ac_prog in mv
8287do
8288  # Extract the first word of "$ac_prog", so it can be a program name with args.
8289set dummy $ac_prog; ac_word=$2
8290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8291$as_echo_n "checking for $ac_word... " >&6; }
8292if ${ac_cv_path_MV+:} false; then :
8293  $as_echo_n "(cached) " >&6
8294else
8295  case $MV in
8296  [\\/]* | ?:[\\/]*)
8297  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8298  ;;
8299  *)
8300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8301for as_dir in $PATH
8302do
8303  IFS=$as_save_IFS
8304  test -z "$as_dir" && as_dir=.
8305    for ac_exec_ext in '' $ac_executable_extensions; do
8306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8307    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8309    break 2
8310  fi
8311done
8312  done
8313IFS=$as_save_IFS
8314
8315  ;;
8316esac
8317fi
8318MV=$ac_cv_path_MV
8319if test -n "$MV"; then
8320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8321$as_echo "$MV" >&6; }
8322else
8323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8324$as_echo "no" >&6; }
8325fi
8326
8327
8328  test -n "$MV" && break
8329done
8330
8331  else
8332    # The variable is set, but is it from the command line or the environment?
8333
8334    # Try to remove the string !MV! from our list.
8335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8337      # If it failed, the variable was not from the command line. Ignore it,
8338      # but warn the user (except for BASH, which is always set by the calling BASH).
8339      if test "xMV" != xBASH; then
8340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8341$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8342      fi
8343      # Try to locate tool using the code snippet
8344      for ac_prog in mv
8345do
8346  # Extract the first word of "$ac_prog", so it can be a program name with args.
8347set dummy $ac_prog; ac_word=$2
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8349$as_echo_n "checking for $ac_word... " >&6; }
8350if ${ac_cv_path_MV+:} false; then :
8351  $as_echo_n "(cached) " >&6
8352else
8353  case $MV in
8354  [\\/]* | ?:[\\/]*)
8355  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8356  ;;
8357  *)
8358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8359for as_dir in $PATH
8360do
8361  IFS=$as_save_IFS
8362  test -z "$as_dir" && as_dir=.
8363    for ac_exec_ext in '' $ac_executable_extensions; do
8364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8365    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8367    break 2
8368  fi
8369done
8370  done
8371IFS=$as_save_IFS
8372
8373  ;;
8374esac
8375fi
8376MV=$ac_cv_path_MV
8377if test -n "$MV"; then
8378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8379$as_echo "$MV" >&6; }
8380else
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8382$as_echo "no" >&6; }
8383fi
8384
8385
8386  test -n "$MV" && break
8387done
8388
8389    else
8390      # If it succeeded, then it was overridden by the user. We will use it
8391      # for the tool.
8392
8393      # First remove it from the list of overridden variables, so we can test
8394      # for unknown variables in the end.
8395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8396
8397      # Check if the provided tool contains a complete path.
8398      tool_specified="$MV"
8399      tool_basename="${tool_specified##*/}"
8400      if test "x$tool_basename" = "x$tool_specified"; then
8401        # A command without a complete path is provided, search $PATH.
8402        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8403$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8404        # Extract the first word of "$tool_basename", so it can be a program name with args.
8405set dummy $tool_basename; ac_word=$2
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407$as_echo_n "checking for $ac_word... " >&6; }
8408if ${ac_cv_path_MV+:} false; then :
8409  $as_echo_n "(cached) " >&6
8410else
8411  case $MV in
8412  [\\/]* | ?:[\\/]*)
8413  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8414  ;;
8415  *)
8416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417for as_dir in $PATH
8418do
8419  IFS=$as_save_IFS
8420  test -z "$as_dir" && as_dir=.
8421    for ac_exec_ext in '' $ac_executable_extensions; do
8422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425    break 2
8426  fi
8427done
8428  done
8429IFS=$as_save_IFS
8430
8431  ;;
8432esac
8433fi
8434MV=$ac_cv_path_MV
8435if test -n "$MV"; then
8436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8437$as_echo "$MV" >&6; }
8438else
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440$as_echo "no" >&6; }
8441fi
8442
8443
8444        if test "x$MV" = x; then
8445          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8446        fi
8447      else
8448        # Otherwise we believe it is a complete path. Use it as it is.
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8450$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8452$as_echo_n "checking for MV... " >&6; }
8453        if test ! -x "$tool_specified"; then
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8455$as_echo "not found" >&6; }
8456          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8457        fi
8458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8459$as_echo "$tool_specified" >&6; }
8460      fi
8461    fi
8462  fi
8463
8464
8465
8466  if test "x$MV" = x; then
8467    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8468  fi
8469
8470
8471
8472
8473
8474  # Publish this variable in the help.
8475
8476
8477  if test "x$NAWK" = x; then
8478    # The variable is not set by user, try to locate tool using the code snippet
8479    for ac_prog in nawk gawk awk
8480do
8481  # Extract the first word of "$ac_prog", so it can be a program name with args.
8482set dummy $ac_prog; ac_word=$2
8483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8484$as_echo_n "checking for $ac_word... " >&6; }
8485if ${ac_cv_path_NAWK+:} false; then :
8486  $as_echo_n "(cached) " >&6
8487else
8488  case $NAWK in
8489  [\\/]* | ?:[\\/]*)
8490  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8491  ;;
8492  *)
8493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8494for as_dir in $PATH
8495do
8496  IFS=$as_save_IFS
8497  test -z "$as_dir" && as_dir=.
8498    for ac_exec_ext in '' $ac_executable_extensions; do
8499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8500    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8502    break 2
8503  fi
8504done
8505  done
8506IFS=$as_save_IFS
8507
8508  ;;
8509esac
8510fi
8511NAWK=$ac_cv_path_NAWK
8512if test -n "$NAWK"; then
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8514$as_echo "$NAWK" >&6; }
8515else
8516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8517$as_echo "no" >&6; }
8518fi
8519
8520
8521  test -n "$NAWK" && break
8522done
8523
8524  else
8525    # The variable is set, but is it from the command line or the environment?
8526
8527    # Try to remove the string !NAWK! from our list.
8528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8530      # If it failed, the variable was not from the command line. Ignore it,
8531      # but warn the user (except for BASH, which is always set by the calling BASH).
8532      if test "xNAWK" != xBASH; then
8533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8534$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8535      fi
8536      # Try to locate tool using the code snippet
8537      for ac_prog in nawk gawk awk
8538do
8539  # Extract the first word of "$ac_prog", so it can be a program name with args.
8540set dummy $ac_prog; ac_word=$2
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8542$as_echo_n "checking for $ac_word... " >&6; }
8543if ${ac_cv_path_NAWK+:} false; then :
8544  $as_echo_n "(cached) " >&6
8545else
8546  case $NAWK in
8547  [\\/]* | ?:[\\/]*)
8548  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8549  ;;
8550  *)
8551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8552for as_dir in $PATH
8553do
8554  IFS=$as_save_IFS
8555  test -z "$as_dir" && as_dir=.
8556    for ac_exec_ext in '' $ac_executable_extensions; do
8557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8558    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8560    break 2
8561  fi
8562done
8563  done
8564IFS=$as_save_IFS
8565
8566  ;;
8567esac
8568fi
8569NAWK=$ac_cv_path_NAWK
8570if test -n "$NAWK"; then
8571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8572$as_echo "$NAWK" >&6; }
8573else
8574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8575$as_echo "no" >&6; }
8576fi
8577
8578
8579  test -n "$NAWK" && break
8580done
8581
8582    else
8583      # If it succeeded, then it was overridden by the user. We will use it
8584      # for the tool.
8585
8586      # First remove it from the list of overridden variables, so we can test
8587      # for unknown variables in the end.
8588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8589
8590      # Check if the provided tool contains a complete path.
8591      tool_specified="$NAWK"
8592      tool_basename="${tool_specified##*/}"
8593      if test "x$tool_basename" = "x$tool_specified"; then
8594        # A command without a complete path is provided, search $PATH.
8595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8596$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8597        # Extract the first word of "$tool_basename", so it can be a program name with args.
8598set dummy $tool_basename; ac_word=$2
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8600$as_echo_n "checking for $ac_word... " >&6; }
8601if ${ac_cv_path_NAWK+:} false; then :
8602  $as_echo_n "(cached) " >&6
8603else
8604  case $NAWK in
8605  [\\/]* | ?:[\\/]*)
8606  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8607  ;;
8608  *)
8609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8610for as_dir in $PATH
8611do
8612  IFS=$as_save_IFS
8613  test -z "$as_dir" && as_dir=.
8614    for ac_exec_ext in '' $ac_executable_extensions; do
8615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8616    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8618    break 2
8619  fi
8620done
8621  done
8622IFS=$as_save_IFS
8623
8624  ;;
8625esac
8626fi
8627NAWK=$ac_cv_path_NAWK
8628if test -n "$NAWK"; then
8629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8630$as_echo "$NAWK" >&6; }
8631else
8632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8633$as_echo "no" >&6; }
8634fi
8635
8636
8637        if test "x$NAWK" = x; then
8638          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8639        fi
8640      else
8641        # Otherwise we believe it is a complete path. Use it as it is.
8642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8643$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8645$as_echo_n "checking for NAWK... " >&6; }
8646        if test ! -x "$tool_specified"; then
8647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8648$as_echo "not found" >&6; }
8649          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8650        fi
8651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8652$as_echo "$tool_specified" >&6; }
8653      fi
8654    fi
8655  fi
8656
8657
8658
8659  if test "x$NAWK" = x; then
8660    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8661  fi
8662
8663
8664
8665
8666
8667  # Publish this variable in the help.
8668
8669
8670  if test "x$PRINTF" = x; then
8671    # The variable is not set by user, try to locate tool using the code snippet
8672    for ac_prog in printf
8673do
8674  # Extract the first word of "$ac_prog", so it can be a program name with args.
8675set dummy $ac_prog; ac_word=$2
8676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8677$as_echo_n "checking for $ac_word... " >&6; }
8678if ${ac_cv_path_PRINTF+:} false; then :
8679  $as_echo_n "(cached) " >&6
8680else
8681  case $PRINTF in
8682  [\\/]* | ?:[\\/]*)
8683  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8684  ;;
8685  *)
8686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8687for as_dir in $PATH
8688do
8689  IFS=$as_save_IFS
8690  test -z "$as_dir" && as_dir=.
8691    for ac_exec_ext in '' $ac_executable_extensions; do
8692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8693    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8695    break 2
8696  fi
8697done
8698  done
8699IFS=$as_save_IFS
8700
8701  ;;
8702esac
8703fi
8704PRINTF=$ac_cv_path_PRINTF
8705if test -n "$PRINTF"; then
8706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8707$as_echo "$PRINTF" >&6; }
8708else
8709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8710$as_echo "no" >&6; }
8711fi
8712
8713
8714  test -n "$PRINTF" && break
8715done
8716
8717  else
8718    # The variable is set, but is it from the command line or the environment?
8719
8720    # Try to remove the string !PRINTF! from our list.
8721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8723      # If it failed, the variable was not from the command line. Ignore it,
8724      # but warn the user (except for BASH, which is always set by the calling BASH).
8725      if test "xPRINTF" != xBASH; then
8726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8727$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8728      fi
8729      # Try to locate tool using the code snippet
8730      for ac_prog in printf
8731do
8732  # Extract the first word of "$ac_prog", so it can be a program name with args.
8733set dummy $ac_prog; ac_word=$2
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8735$as_echo_n "checking for $ac_word... " >&6; }
8736if ${ac_cv_path_PRINTF+:} false; then :
8737  $as_echo_n "(cached) " >&6
8738else
8739  case $PRINTF in
8740  [\\/]* | ?:[\\/]*)
8741  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8742  ;;
8743  *)
8744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8745for as_dir in $PATH
8746do
8747  IFS=$as_save_IFS
8748  test -z "$as_dir" && as_dir=.
8749    for ac_exec_ext in '' $ac_executable_extensions; do
8750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8751    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8753    break 2
8754  fi
8755done
8756  done
8757IFS=$as_save_IFS
8758
8759  ;;
8760esac
8761fi
8762PRINTF=$ac_cv_path_PRINTF
8763if test -n "$PRINTF"; then
8764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8765$as_echo "$PRINTF" >&6; }
8766else
8767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8768$as_echo "no" >&6; }
8769fi
8770
8771
8772  test -n "$PRINTF" && break
8773done
8774
8775    else
8776      # If it succeeded, then it was overridden by the user. We will use it
8777      # for the tool.
8778
8779      # First remove it from the list of overridden variables, so we can test
8780      # for unknown variables in the end.
8781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8782
8783      # Check if the provided tool contains a complete path.
8784      tool_specified="$PRINTF"
8785      tool_basename="${tool_specified##*/}"
8786      if test "x$tool_basename" = "x$tool_specified"; then
8787        # A command without a complete path is provided, search $PATH.
8788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8789$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8790        # Extract the first word of "$tool_basename", so it can be a program name with args.
8791set dummy $tool_basename; ac_word=$2
8792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8793$as_echo_n "checking for $ac_word... " >&6; }
8794if ${ac_cv_path_PRINTF+:} false; then :
8795  $as_echo_n "(cached) " >&6
8796else
8797  case $PRINTF in
8798  [\\/]* | ?:[\\/]*)
8799  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8800  ;;
8801  *)
8802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8803for as_dir in $PATH
8804do
8805  IFS=$as_save_IFS
8806  test -z "$as_dir" && as_dir=.
8807    for ac_exec_ext in '' $ac_executable_extensions; do
8808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8809    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8811    break 2
8812  fi
8813done
8814  done
8815IFS=$as_save_IFS
8816
8817  ;;
8818esac
8819fi
8820PRINTF=$ac_cv_path_PRINTF
8821if test -n "$PRINTF"; then
8822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8823$as_echo "$PRINTF" >&6; }
8824else
8825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8826$as_echo "no" >&6; }
8827fi
8828
8829
8830        if test "x$PRINTF" = x; then
8831          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8832        fi
8833      else
8834        # Otherwise we believe it is a complete path. Use it as it is.
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8836$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8838$as_echo_n "checking for PRINTF... " >&6; }
8839        if test ! -x "$tool_specified"; then
8840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8841$as_echo "not found" >&6; }
8842          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8843        fi
8844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8845$as_echo "$tool_specified" >&6; }
8846      fi
8847    fi
8848  fi
8849
8850
8851
8852  if test "x$PRINTF" = x; then
8853    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8854  fi
8855
8856
8857
8858
8859
8860  # Publish this variable in the help.
8861
8862
8863  if test "x$RM" = x; then
8864    # The variable is not set by user, try to locate tool using the code snippet
8865    for ac_prog in rm
8866do
8867  # Extract the first word of "$ac_prog", so it can be a program name with args.
8868set dummy $ac_prog; ac_word=$2
8869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8870$as_echo_n "checking for $ac_word... " >&6; }
8871if ${ac_cv_path_RM+:} false; then :
8872  $as_echo_n "(cached) " >&6
8873else
8874  case $RM in
8875  [\\/]* | ?:[\\/]*)
8876  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8877  ;;
8878  *)
8879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8880for as_dir in $PATH
8881do
8882  IFS=$as_save_IFS
8883  test -z "$as_dir" && as_dir=.
8884    for ac_exec_ext in '' $ac_executable_extensions; do
8885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8886    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8888    break 2
8889  fi
8890done
8891  done
8892IFS=$as_save_IFS
8893
8894  ;;
8895esac
8896fi
8897RM=$ac_cv_path_RM
8898if test -n "$RM"; then
8899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8900$as_echo "$RM" >&6; }
8901else
8902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8903$as_echo "no" >&6; }
8904fi
8905
8906
8907  test -n "$RM" && break
8908done
8909
8910  else
8911    # The variable is set, but is it from the command line or the environment?
8912
8913    # Try to remove the string !RM! from our list.
8914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8916      # If it failed, the variable was not from the command line. Ignore it,
8917      # but warn the user (except for BASH, which is always set by the calling BASH).
8918      if test "xRM" != xBASH; then
8919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8920$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8921      fi
8922      # Try to locate tool using the code snippet
8923      for ac_prog in rm
8924do
8925  # Extract the first word of "$ac_prog", so it can be a program name with args.
8926set dummy $ac_prog; ac_word=$2
8927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8928$as_echo_n "checking for $ac_word... " >&6; }
8929if ${ac_cv_path_RM+:} false; then :
8930  $as_echo_n "(cached) " >&6
8931else
8932  case $RM in
8933  [\\/]* | ?:[\\/]*)
8934  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8935  ;;
8936  *)
8937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8938for as_dir in $PATH
8939do
8940  IFS=$as_save_IFS
8941  test -z "$as_dir" && as_dir=.
8942    for ac_exec_ext in '' $ac_executable_extensions; do
8943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8944    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8946    break 2
8947  fi
8948done
8949  done
8950IFS=$as_save_IFS
8951
8952  ;;
8953esac
8954fi
8955RM=$ac_cv_path_RM
8956if test -n "$RM"; then
8957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8958$as_echo "$RM" >&6; }
8959else
8960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8961$as_echo "no" >&6; }
8962fi
8963
8964
8965  test -n "$RM" && break
8966done
8967
8968    else
8969      # If it succeeded, then it was overridden by the user. We will use it
8970      # for the tool.
8971
8972      # First remove it from the list of overridden variables, so we can test
8973      # for unknown variables in the end.
8974      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8975
8976      # Check if the provided tool contains a complete path.
8977      tool_specified="$RM"
8978      tool_basename="${tool_specified##*/}"
8979      if test "x$tool_basename" = "x$tool_specified"; then
8980        # A command without a complete path is provided, search $PATH.
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8982$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8983        # Extract the first word of "$tool_basename", so it can be a program name with args.
8984set dummy $tool_basename; ac_word=$2
8985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8986$as_echo_n "checking for $ac_word... " >&6; }
8987if ${ac_cv_path_RM+:} false; then :
8988  $as_echo_n "(cached) " >&6
8989else
8990  case $RM in
8991  [\\/]* | ?:[\\/]*)
8992  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8993  ;;
8994  *)
8995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8996for as_dir in $PATH
8997do
8998  IFS=$as_save_IFS
8999  test -z "$as_dir" && as_dir=.
9000    for ac_exec_ext in '' $ac_executable_extensions; do
9001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9002    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9004    break 2
9005  fi
9006done
9007  done
9008IFS=$as_save_IFS
9009
9010  ;;
9011esac
9012fi
9013RM=$ac_cv_path_RM
9014if test -n "$RM"; then
9015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9016$as_echo "$RM" >&6; }
9017else
9018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9019$as_echo "no" >&6; }
9020fi
9021
9022
9023        if test "x$RM" = x; then
9024          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9025        fi
9026      else
9027        # Otherwise we believe it is a complete path. Use it as it is.
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9029$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9031$as_echo_n "checking for RM... " >&6; }
9032        if test ! -x "$tool_specified"; then
9033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9034$as_echo "not found" >&6; }
9035          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9036        fi
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9038$as_echo "$tool_specified" >&6; }
9039      fi
9040    fi
9041  fi
9042
9043
9044
9045  if test "x$RM" = x; then
9046    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9047  fi
9048
9049
9050
9051
9052
9053  # Publish this variable in the help.
9054
9055
9056  if test "x$SH" = x; then
9057    # The variable is not set by user, try to locate tool using the code snippet
9058    for ac_prog in sh
9059do
9060  # Extract the first word of "$ac_prog", so it can be a program name with args.
9061set dummy $ac_prog; ac_word=$2
9062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9063$as_echo_n "checking for $ac_word... " >&6; }
9064if ${ac_cv_path_SH+:} false; then :
9065  $as_echo_n "(cached) " >&6
9066else
9067  case $SH in
9068  [\\/]* | ?:[\\/]*)
9069  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9070  ;;
9071  *)
9072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9073for as_dir in $PATH
9074do
9075  IFS=$as_save_IFS
9076  test -z "$as_dir" && as_dir=.
9077    for ac_exec_ext in '' $ac_executable_extensions; do
9078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9079    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9081    break 2
9082  fi
9083done
9084  done
9085IFS=$as_save_IFS
9086
9087  ;;
9088esac
9089fi
9090SH=$ac_cv_path_SH
9091if test -n "$SH"; then
9092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9093$as_echo "$SH" >&6; }
9094else
9095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9096$as_echo "no" >&6; }
9097fi
9098
9099
9100  test -n "$SH" && break
9101done
9102
9103  else
9104    # The variable is set, but is it from the command line or the environment?
9105
9106    # Try to remove the string !SH! from our list.
9107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9109      # If it failed, the variable was not from the command line. Ignore it,
9110      # but warn the user (except for BASH, which is always set by the calling BASH).
9111      if test "xSH" != xBASH; then
9112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9113$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9114      fi
9115      # Try to locate tool using the code snippet
9116      for ac_prog in sh
9117do
9118  # Extract the first word of "$ac_prog", so it can be a program name with args.
9119set dummy $ac_prog; ac_word=$2
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9121$as_echo_n "checking for $ac_word... " >&6; }
9122if ${ac_cv_path_SH+:} false; then :
9123  $as_echo_n "(cached) " >&6
9124else
9125  case $SH in
9126  [\\/]* | ?:[\\/]*)
9127  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9128  ;;
9129  *)
9130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9131for as_dir in $PATH
9132do
9133  IFS=$as_save_IFS
9134  test -z "$as_dir" && as_dir=.
9135    for ac_exec_ext in '' $ac_executable_extensions; do
9136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9137    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9139    break 2
9140  fi
9141done
9142  done
9143IFS=$as_save_IFS
9144
9145  ;;
9146esac
9147fi
9148SH=$ac_cv_path_SH
9149if test -n "$SH"; then
9150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9151$as_echo "$SH" >&6; }
9152else
9153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9154$as_echo "no" >&6; }
9155fi
9156
9157
9158  test -n "$SH" && break
9159done
9160
9161    else
9162      # If it succeeded, then it was overridden by the user. We will use it
9163      # for the tool.
9164
9165      # First remove it from the list of overridden variables, so we can test
9166      # for unknown variables in the end.
9167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9168
9169      # Check if the provided tool contains a complete path.
9170      tool_specified="$SH"
9171      tool_basename="${tool_specified##*/}"
9172      if test "x$tool_basename" = "x$tool_specified"; then
9173        # A command without a complete path is provided, search $PATH.
9174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9175$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9176        # Extract the first word of "$tool_basename", so it can be a program name with args.
9177set dummy $tool_basename; ac_word=$2
9178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9179$as_echo_n "checking for $ac_word... " >&6; }
9180if ${ac_cv_path_SH+:} false; then :
9181  $as_echo_n "(cached) " >&6
9182else
9183  case $SH in
9184  [\\/]* | ?:[\\/]*)
9185  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9186  ;;
9187  *)
9188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9189for as_dir in $PATH
9190do
9191  IFS=$as_save_IFS
9192  test -z "$as_dir" && as_dir=.
9193    for ac_exec_ext in '' $ac_executable_extensions; do
9194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9195    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9197    break 2
9198  fi
9199done
9200  done
9201IFS=$as_save_IFS
9202
9203  ;;
9204esac
9205fi
9206SH=$ac_cv_path_SH
9207if test -n "$SH"; then
9208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9209$as_echo "$SH" >&6; }
9210else
9211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9212$as_echo "no" >&6; }
9213fi
9214
9215
9216        if test "x$SH" = x; then
9217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9218        fi
9219      else
9220        # Otherwise we believe it is a complete path. Use it as it is.
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9222$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9224$as_echo_n "checking for SH... " >&6; }
9225        if test ! -x "$tool_specified"; then
9226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9227$as_echo "not found" >&6; }
9228          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9229        fi
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9231$as_echo "$tool_specified" >&6; }
9232      fi
9233    fi
9234  fi
9235
9236
9237
9238  if test "x$SH" = x; then
9239    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9240  fi
9241
9242
9243
9244
9245
9246  # Publish this variable in the help.
9247
9248
9249  if test "x$SORT" = x; then
9250    # The variable is not set by user, try to locate tool using the code snippet
9251    for ac_prog in sort
9252do
9253  # Extract the first word of "$ac_prog", so it can be a program name with args.
9254set dummy $ac_prog; ac_word=$2
9255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9256$as_echo_n "checking for $ac_word... " >&6; }
9257if ${ac_cv_path_SORT+:} false; then :
9258  $as_echo_n "(cached) " >&6
9259else
9260  case $SORT in
9261  [\\/]* | ?:[\\/]*)
9262  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9263  ;;
9264  *)
9265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9266for as_dir in $PATH
9267do
9268  IFS=$as_save_IFS
9269  test -z "$as_dir" && as_dir=.
9270    for ac_exec_ext in '' $ac_executable_extensions; do
9271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9272    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9274    break 2
9275  fi
9276done
9277  done
9278IFS=$as_save_IFS
9279
9280  ;;
9281esac
9282fi
9283SORT=$ac_cv_path_SORT
9284if test -n "$SORT"; then
9285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9286$as_echo "$SORT" >&6; }
9287else
9288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9289$as_echo "no" >&6; }
9290fi
9291
9292
9293  test -n "$SORT" && break
9294done
9295
9296  else
9297    # The variable is set, but is it from the command line or the environment?
9298
9299    # Try to remove the string !SORT! from our list.
9300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9302      # If it failed, the variable was not from the command line. Ignore it,
9303      # but warn the user (except for BASH, which is always set by the calling BASH).
9304      if test "xSORT" != xBASH; then
9305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9306$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9307      fi
9308      # Try to locate tool using the code snippet
9309      for ac_prog in sort
9310do
9311  # Extract the first word of "$ac_prog", so it can be a program name with args.
9312set dummy $ac_prog; ac_word=$2
9313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9314$as_echo_n "checking for $ac_word... " >&6; }
9315if ${ac_cv_path_SORT+:} false; then :
9316  $as_echo_n "(cached) " >&6
9317else
9318  case $SORT in
9319  [\\/]* | ?:[\\/]*)
9320  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9321  ;;
9322  *)
9323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9324for as_dir in $PATH
9325do
9326  IFS=$as_save_IFS
9327  test -z "$as_dir" && as_dir=.
9328    for ac_exec_ext in '' $ac_executable_extensions; do
9329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9330    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9332    break 2
9333  fi
9334done
9335  done
9336IFS=$as_save_IFS
9337
9338  ;;
9339esac
9340fi
9341SORT=$ac_cv_path_SORT
9342if test -n "$SORT"; then
9343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9344$as_echo "$SORT" >&6; }
9345else
9346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9347$as_echo "no" >&6; }
9348fi
9349
9350
9351  test -n "$SORT" && break
9352done
9353
9354    else
9355      # If it succeeded, then it was overridden by the user. We will use it
9356      # for the tool.
9357
9358      # First remove it from the list of overridden variables, so we can test
9359      # for unknown variables in the end.
9360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9361
9362      # Check if the provided tool contains a complete path.
9363      tool_specified="$SORT"
9364      tool_basename="${tool_specified##*/}"
9365      if test "x$tool_basename" = "x$tool_specified"; then
9366        # A command without a complete path is provided, search $PATH.
9367        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9368$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9369        # Extract the first word of "$tool_basename", so it can be a program name with args.
9370set dummy $tool_basename; ac_word=$2
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372$as_echo_n "checking for $ac_word... " >&6; }
9373if ${ac_cv_path_SORT+:} false; then :
9374  $as_echo_n "(cached) " >&6
9375else
9376  case $SORT in
9377  [\\/]* | ?:[\\/]*)
9378  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9379  ;;
9380  *)
9381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382for as_dir in $PATH
9383do
9384  IFS=$as_save_IFS
9385  test -z "$as_dir" && as_dir=.
9386    for ac_exec_ext in '' $ac_executable_extensions; do
9387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390    break 2
9391  fi
9392done
9393  done
9394IFS=$as_save_IFS
9395
9396  ;;
9397esac
9398fi
9399SORT=$ac_cv_path_SORT
9400if test -n "$SORT"; then
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9402$as_echo "$SORT" >&6; }
9403else
9404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
9406fi
9407
9408
9409        if test "x$SORT" = x; then
9410          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9411        fi
9412      else
9413        # Otherwise we believe it is a complete path. Use it as it is.
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9415$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9417$as_echo_n "checking for SORT... " >&6; }
9418        if test ! -x "$tool_specified"; then
9419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9420$as_echo "not found" >&6; }
9421          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9422        fi
9423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9424$as_echo "$tool_specified" >&6; }
9425      fi
9426    fi
9427  fi
9428
9429
9430
9431  if test "x$SORT" = x; then
9432    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9433  fi
9434
9435
9436
9437
9438
9439  # Publish this variable in the help.
9440
9441
9442  if test "x$TAIL" = x; then
9443    # The variable is not set by user, try to locate tool using the code snippet
9444    for ac_prog in tail
9445do
9446  # Extract the first word of "$ac_prog", so it can be a program name with args.
9447set dummy $ac_prog; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_TAIL+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $TAIL in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476TAIL=$ac_cv_path_TAIL
9477if test -n "$TAIL"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9479$as_echo "$TAIL" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486  test -n "$TAIL" && break
9487done
9488
9489  else
9490    # The variable is set, but is it from the command line or the environment?
9491
9492    # Try to remove the string !TAIL! from our list.
9493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9495      # If it failed, the variable was not from the command line. Ignore it,
9496      # but warn the user (except for BASH, which is always set by the calling BASH).
9497      if test "xTAIL" != xBASH; then
9498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9499$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9500      fi
9501      # Try to locate tool using the code snippet
9502      for ac_prog in tail
9503do
9504  # Extract the first word of "$ac_prog", so it can be a program name with args.
9505set dummy $ac_prog; ac_word=$2
9506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9507$as_echo_n "checking for $ac_word... " >&6; }
9508if ${ac_cv_path_TAIL+:} false; then :
9509  $as_echo_n "(cached) " >&6
9510else
9511  case $TAIL in
9512  [\\/]* | ?:[\\/]*)
9513  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9514  ;;
9515  *)
9516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9517for as_dir in $PATH
9518do
9519  IFS=$as_save_IFS
9520  test -z "$as_dir" && as_dir=.
9521    for ac_exec_ext in '' $ac_executable_extensions; do
9522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9523    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9525    break 2
9526  fi
9527done
9528  done
9529IFS=$as_save_IFS
9530
9531  ;;
9532esac
9533fi
9534TAIL=$ac_cv_path_TAIL
9535if test -n "$TAIL"; then
9536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9537$as_echo "$TAIL" >&6; }
9538else
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540$as_echo "no" >&6; }
9541fi
9542
9543
9544  test -n "$TAIL" && break
9545done
9546
9547    else
9548      # If it succeeded, then it was overridden by the user. We will use it
9549      # for the tool.
9550
9551      # First remove it from the list of overridden variables, so we can test
9552      # for unknown variables in the end.
9553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9554
9555      # Check if the provided tool contains a complete path.
9556      tool_specified="$TAIL"
9557      tool_basename="${tool_specified##*/}"
9558      if test "x$tool_basename" = "x$tool_specified"; then
9559        # A command without a complete path is provided, search $PATH.
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9561$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9562        # Extract the first word of "$tool_basename", so it can be a program name with args.
9563set dummy $tool_basename; ac_word=$2
9564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9565$as_echo_n "checking for $ac_word... " >&6; }
9566if ${ac_cv_path_TAIL+:} false; then :
9567  $as_echo_n "(cached) " >&6
9568else
9569  case $TAIL in
9570  [\\/]* | ?:[\\/]*)
9571  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9572  ;;
9573  *)
9574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9575for as_dir in $PATH
9576do
9577  IFS=$as_save_IFS
9578  test -z "$as_dir" && as_dir=.
9579    for ac_exec_ext in '' $ac_executable_extensions; do
9580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9581    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9583    break 2
9584  fi
9585done
9586  done
9587IFS=$as_save_IFS
9588
9589  ;;
9590esac
9591fi
9592TAIL=$ac_cv_path_TAIL
9593if test -n "$TAIL"; then
9594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9595$as_echo "$TAIL" >&6; }
9596else
9597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598$as_echo "no" >&6; }
9599fi
9600
9601
9602        if test "x$TAIL" = x; then
9603          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9604        fi
9605      else
9606        # Otherwise we believe it is a complete path. Use it as it is.
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9608$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9609        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9610$as_echo_n "checking for TAIL... " >&6; }
9611        if test ! -x "$tool_specified"; then
9612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9613$as_echo "not found" >&6; }
9614          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9615        fi
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9617$as_echo "$tool_specified" >&6; }
9618      fi
9619    fi
9620  fi
9621
9622
9623
9624  if test "x$TAIL" = x; then
9625    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9626  fi
9627
9628
9629
9630
9631
9632  # Publish this variable in the help.
9633
9634
9635  if test "x$TAR" = x; then
9636    # The variable is not set by user, try to locate tool using the code snippet
9637    for ac_prog in tar
9638do
9639  # Extract the first word of "$ac_prog", so it can be a program name with args.
9640set dummy $ac_prog; ac_word=$2
9641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9642$as_echo_n "checking for $ac_word... " >&6; }
9643if ${ac_cv_path_TAR+:} false; then :
9644  $as_echo_n "(cached) " >&6
9645else
9646  case $TAR in
9647  [\\/]* | ?:[\\/]*)
9648  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9649  ;;
9650  *)
9651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9652for as_dir in $PATH
9653do
9654  IFS=$as_save_IFS
9655  test -z "$as_dir" && as_dir=.
9656    for ac_exec_ext in '' $ac_executable_extensions; do
9657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9658    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9660    break 2
9661  fi
9662done
9663  done
9664IFS=$as_save_IFS
9665
9666  ;;
9667esac
9668fi
9669TAR=$ac_cv_path_TAR
9670if test -n "$TAR"; then
9671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9672$as_echo "$TAR" >&6; }
9673else
9674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9675$as_echo "no" >&6; }
9676fi
9677
9678
9679  test -n "$TAR" && break
9680done
9681
9682  else
9683    # The variable is set, but is it from the command line or the environment?
9684
9685    # Try to remove the string !TAR! from our list.
9686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9688      # If it failed, the variable was not from the command line. Ignore it,
9689      # but warn the user (except for BASH, which is always set by the calling BASH).
9690      if test "xTAR" != xBASH; then
9691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9692$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9693      fi
9694      # Try to locate tool using the code snippet
9695      for ac_prog in tar
9696do
9697  # Extract the first word of "$ac_prog", so it can be a program name with args.
9698set dummy $ac_prog; ac_word=$2
9699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9700$as_echo_n "checking for $ac_word... " >&6; }
9701if ${ac_cv_path_TAR+:} false; then :
9702  $as_echo_n "(cached) " >&6
9703else
9704  case $TAR in
9705  [\\/]* | ?:[\\/]*)
9706  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9707  ;;
9708  *)
9709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9710for as_dir in $PATH
9711do
9712  IFS=$as_save_IFS
9713  test -z "$as_dir" && as_dir=.
9714    for ac_exec_ext in '' $ac_executable_extensions; do
9715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9716    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9718    break 2
9719  fi
9720done
9721  done
9722IFS=$as_save_IFS
9723
9724  ;;
9725esac
9726fi
9727TAR=$ac_cv_path_TAR
9728if test -n "$TAR"; then
9729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9730$as_echo "$TAR" >&6; }
9731else
9732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9733$as_echo "no" >&6; }
9734fi
9735
9736
9737  test -n "$TAR" && break
9738done
9739
9740    else
9741      # If it succeeded, then it was overridden by the user. We will use it
9742      # for the tool.
9743
9744      # First remove it from the list of overridden variables, so we can test
9745      # for unknown variables in the end.
9746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9747
9748      # Check if the provided tool contains a complete path.
9749      tool_specified="$TAR"
9750      tool_basename="${tool_specified##*/}"
9751      if test "x$tool_basename" = "x$tool_specified"; then
9752        # A command without a complete path is provided, search $PATH.
9753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9754$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9755        # Extract the first word of "$tool_basename", so it can be a program name with args.
9756set dummy $tool_basename; ac_word=$2
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9758$as_echo_n "checking for $ac_word... " >&6; }
9759if ${ac_cv_path_TAR+:} false; then :
9760  $as_echo_n "(cached) " >&6
9761else
9762  case $TAR in
9763  [\\/]* | ?:[\\/]*)
9764  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9765  ;;
9766  *)
9767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9768for as_dir in $PATH
9769do
9770  IFS=$as_save_IFS
9771  test -z "$as_dir" && as_dir=.
9772    for ac_exec_ext in '' $ac_executable_extensions; do
9773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9774    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9776    break 2
9777  fi
9778done
9779  done
9780IFS=$as_save_IFS
9781
9782  ;;
9783esac
9784fi
9785TAR=$ac_cv_path_TAR
9786if test -n "$TAR"; then
9787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9788$as_echo "$TAR" >&6; }
9789else
9790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9791$as_echo "no" >&6; }
9792fi
9793
9794
9795        if test "x$TAR" = x; then
9796          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9797        fi
9798      else
9799        # Otherwise we believe it is a complete path. Use it as it is.
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9801$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9803$as_echo_n "checking for TAR... " >&6; }
9804        if test ! -x "$tool_specified"; then
9805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9806$as_echo "not found" >&6; }
9807          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9808        fi
9809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9810$as_echo "$tool_specified" >&6; }
9811      fi
9812    fi
9813  fi
9814
9815
9816
9817  if test "x$TAR" = x; then
9818    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9819  fi
9820
9821
9822
9823
9824
9825  # Publish this variable in the help.
9826
9827
9828  if test "x$TEE" = x; then
9829    # The variable is not set by user, try to locate tool using the code snippet
9830    for ac_prog in tee
9831do
9832  # Extract the first word of "$ac_prog", so it can be a program name with args.
9833set dummy $ac_prog; ac_word=$2
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835$as_echo_n "checking for $ac_word... " >&6; }
9836if ${ac_cv_path_TEE+:} false; then :
9837  $as_echo_n "(cached) " >&6
9838else
9839  case $TEE in
9840  [\\/]* | ?:[\\/]*)
9841  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9842  ;;
9843  *)
9844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845for as_dir in $PATH
9846do
9847  IFS=$as_save_IFS
9848  test -z "$as_dir" && as_dir=.
9849    for ac_exec_ext in '' $ac_executable_extensions; do
9850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853    break 2
9854  fi
9855done
9856  done
9857IFS=$as_save_IFS
9858
9859  ;;
9860esac
9861fi
9862TEE=$ac_cv_path_TEE
9863if test -n "$TEE"; then
9864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9865$as_echo "$TEE" >&6; }
9866else
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
9869fi
9870
9871
9872  test -n "$TEE" && break
9873done
9874
9875  else
9876    # The variable is set, but is it from the command line or the environment?
9877
9878    # Try to remove the string !TEE! from our list.
9879    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9880    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9881      # If it failed, the variable was not from the command line. Ignore it,
9882      # but warn the user (except for BASH, which is always set by the calling BASH).
9883      if test "xTEE" != xBASH; then
9884        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9885$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9886      fi
9887      # Try to locate tool using the code snippet
9888      for ac_prog in tee
9889do
9890  # Extract the first word of "$ac_prog", so it can be a program name with args.
9891set dummy $ac_prog; ac_word=$2
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9893$as_echo_n "checking for $ac_word... " >&6; }
9894if ${ac_cv_path_TEE+:} false; then :
9895  $as_echo_n "(cached) " >&6
9896else
9897  case $TEE in
9898  [\\/]* | ?:[\\/]*)
9899  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9900  ;;
9901  *)
9902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9903for as_dir in $PATH
9904do
9905  IFS=$as_save_IFS
9906  test -z "$as_dir" && as_dir=.
9907    for ac_exec_ext in '' $ac_executable_extensions; do
9908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9909    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9911    break 2
9912  fi
9913done
9914  done
9915IFS=$as_save_IFS
9916
9917  ;;
9918esac
9919fi
9920TEE=$ac_cv_path_TEE
9921if test -n "$TEE"; then
9922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9923$as_echo "$TEE" >&6; }
9924else
9925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927fi
9928
9929
9930  test -n "$TEE" && break
9931done
9932
9933    else
9934      # If it succeeded, then it was overridden by the user. We will use it
9935      # for the tool.
9936
9937      # First remove it from the list of overridden variables, so we can test
9938      # for unknown variables in the end.
9939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9940
9941      # Check if the provided tool contains a complete path.
9942      tool_specified="$TEE"
9943      tool_basename="${tool_specified##*/}"
9944      if test "x$tool_basename" = "x$tool_specified"; then
9945        # A command without a complete path is provided, search $PATH.
9946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9947$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9948        # Extract the first word of "$tool_basename", so it can be a program name with args.
9949set dummy $tool_basename; ac_word=$2
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9951$as_echo_n "checking for $ac_word... " >&6; }
9952if ${ac_cv_path_TEE+:} false; then :
9953  $as_echo_n "(cached) " >&6
9954else
9955  case $TEE in
9956  [\\/]* | ?:[\\/]*)
9957  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9958  ;;
9959  *)
9960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9961for as_dir in $PATH
9962do
9963  IFS=$as_save_IFS
9964  test -z "$as_dir" && as_dir=.
9965    for ac_exec_ext in '' $ac_executable_extensions; do
9966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9967    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9969    break 2
9970  fi
9971done
9972  done
9973IFS=$as_save_IFS
9974
9975  ;;
9976esac
9977fi
9978TEE=$ac_cv_path_TEE
9979if test -n "$TEE"; then
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9981$as_echo "$TEE" >&6; }
9982else
9983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985fi
9986
9987
9988        if test "x$TEE" = x; then
9989          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9990        fi
9991      else
9992        # Otherwise we believe it is a complete path. Use it as it is.
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9994$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9996$as_echo_n "checking for TEE... " >&6; }
9997        if test ! -x "$tool_specified"; then
9998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9999$as_echo "not found" >&6; }
10000          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10001        fi
10002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10003$as_echo "$tool_specified" >&6; }
10004      fi
10005    fi
10006  fi
10007
10008
10009
10010  if test "x$TEE" = x; then
10011    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10012  fi
10013
10014
10015
10016
10017
10018  # Publish this variable in the help.
10019
10020
10021  if test "x$TOUCH" = x; then
10022    # The variable is not set by user, try to locate tool using the code snippet
10023    for ac_prog in touch
10024do
10025  # Extract the first word of "$ac_prog", so it can be a program name with args.
10026set dummy $ac_prog; ac_word=$2
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10028$as_echo_n "checking for $ac_word... " >&6; }
10029if ${ac_cv_path_TOUCH+:} false; then :
10030  $as_echo_n "(cached) " >&6
10031else
10032  case $TOUCH in
10033  [\\/]* | ?:[\\/]*)
10034  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10035  ;;
10036  *)
10037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10038for as_dir in $PATH
10039do
10040  IFS=$as_save_IFS
10041  test -z "$as_dir" && as_dir=.
10042    for ac_exec_ext in '' $ac_executable_extensions; do
10043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10044    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10046    break 2
10047  fi
10048done
10049  done
10050IFS=$as_save_IFS
10051
10052  ;;
10053esac
10054fi
10055TOUCH=$ac_cv_path_TOUCH
10056if test -n "$TOUCH"; then
10057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10058$as_echo "$TOUCH" >&6; }
10059else
10060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10061$as_echo "no" >&6; }
10062fi
10063
10064
10065  test -n "$TOUCH" && break
10066done
10067
10068  else
10069    # The variable is set, but is it from the command line or the environment?
10070
10071    # Try to remove the string !TOUCH! from our list.
10072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10074      # If it failed, the variable was not from the command line. Ignore it,
10075      # but warn the user (except for BASH, which is always set by the calling BASH).
10076      if test "xTOUCH" != xBASH; then
10077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10078$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10079      fi
10080      # Try to locate tool using the code snippet
10081      for ac_prog in touch
10082do
10083  # Extract the first word of "$ac_prog", so it can be a program name with args.
10084set dummy $ac_prog; ac_word=$2
10085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10086$as_echo_n "checking for $ac_word... " >&6; }
10087if ${ac_cv_path_TOUCH+:} false; then :
10088  $as_echo_n "(cached) " >&6
10089else
10090  case $TOUCH in
10091  [\\/]* | ?:[\\/]*)
10092  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10093  ;;
10094  *)
10095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10096for as_dir in $PATH
10097do
10098  IFS=$as_save_IFS
10099  test -z "$as_dir" && as_dir=.
10100    for ac_exec_ext in '' $ac_executable_extensions; do
10101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10102    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10104    break 2
10105  fi
10106done
10107  done
10108IFS=$as_save_IFS
10109
10110  ;;
10111esac
10112fi
10113TOUCH=$ac_cv_path_TOUCH
10114if test -n "$TOUCH"; then
10115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10116$as_echo "$TOUCH" >&6; }
10117else
10118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119$as_echo "no" >&6; }
10120fi
10121
10122
10123  test -n "$TOUCH" && break
10124done
10125
10126    else
10127      # If it succeeded, then it was overridden by the user. We will use it
10128      # for the tool.
10129
10130      # First remove it from the list of overridden variables, so we can test
10131      # for unknown variables in the end.
10132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10133
10134      # Check if the provided tool contains a complete path.
10135      tool_specified="$TOUCH"
10136      tool_basename="${tool_specified##*/}"
10137      if test "x$tool_basename" = "x$tool_specified"; then
10138        # A command without a complete path is provided, search $PATH.
10139        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10140$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10141        # Extract the first word of "$tool_basename", so it can be a program name with args.
10142set dummy $tool_basename; ac_word=$2
10143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10144$as_echo_n "checking for $ac_word... " >&6; }
10145if ${ac_cv_path_TOUCH+:} false; then :
10146  $as_echo_n "(cached) " >&6
10147else
10148  case $TOUCH in
10149  [\\/]* | ?:[\\/]*)
10150  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10151  ;;
10152  *)
10153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10154for as_dir in $PATH
10155do
10156  IFS=$as_save_IFS
10157  test -z "$as_dir" && as_dir=.
10158    for ac_exec_ext in '' $ac_executable_extensions; do
10159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10160    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10162    break 2
10163  fi
10164done
10165  done
10166IFS=$as_save_IFS
10167
10168  ;;
10169esac
10170fi
10171TOUCH=$ac_cv_path_TOUCH
10172if test -n "$TOUCH"; then
10173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10174$as_echo "$TOUCH" >&6; }
10175else
10176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178fi
10179
10180
10181        if test "x$TOUCH" = x; then
10182          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10183        fi
10184      else
10185        # Otherwise we believe it is a complete path. Use it as it is.
10186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10187$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10188        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10189$as_echo_n "checking for TOUCH... " >&6; }
10190        if test ! -x "$tool_specified"; then
10191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10192$as_echo "not found" >&6; }
10193          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10194        fi
10195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10196$as_echo "$tool_specified" >&6; }
10197      fi
10198    fi
10199  fi
10200
10201
10202
10203  if test "x$TOUCH" = x; then
10204    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10205  fi
10206
10207
10208
10209
10210
10211  # Publish this variable in the help.
10212
10213
10214  if test "x$TR" = x; then
10215    # The variable is not set by user, try to locate tool using the code snippet
10216    for ac_prog in tr
10217do
10218  # Extract the first word of "$ac_prog", so it can be a program name with args.
10219set dummy $ac_prog; ac_word=$2
10220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10221$as_echo_n "checking for $ac_word... " >&6; }
10222if ${ac_cv_path_TR+:} false; then :
10223  $as_echo_n "(cached) " >&6
10224else
10225  case $TR in
10226  [\\/]* | ?:[\\/]*)
10227  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10228  ;;
10229  *)
10230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10231for as_dir in $PATH
10232do
10233  IFS=$as_save_IFS
10234  test -z "$as_dir" && as_dir=.
10235    for ac_exec_ext in '' $ac_executable_extensions; do
10236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10237    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10239    break 2
10240  fi
10241done
10242  done
10243IFS=$as_save_IFS
10244
10245  ;;
10246esac
10247fi
10248TR=$ac_cv_path_TR
10249if test -n "$TR"; then
10250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10251$as_echo "$TR" >&6; }
10252else
10253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10254$as_echo "no" >&6; }
10255fi
10256
10257
10258  test -n "$TR" && break
10259done
10260
10261  else
10262    # The variable is set, but is it from the command line or the environment?
10263
10264    # Try to remove the string !TR! from our list.
10265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10267      # If it failed, the variable was not from the command line. Ignore it,
10268      # but warn the user (except for BASH, which is always set by the calling BASH).
10269      if test "xTR" != xBASH; then
10270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10271$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10272      fi
10273      # Try to locate tool using the code snippet
10274      for ac_prog in tr
10275do
10276  # Extract the first word of "$ac_prog", so it can be a program name with args.
10277set dummy $ac_prog; ac_word=$2
10278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279$as_echo_n "checking for $ac_word... " >&6; }
10280if ${ac_cv_path_TR+:} false; then :
10281  $as_echo_n "(cached) " >&6
10282else
10283  case $TR in
10284  [\\/]* | ?:[\\/]*)
10285  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10286  ;;
10287  *)
10288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289for as_dir in $PATH
10290do
10291  IFS=$as_save_IFS
10292  test -z "$as_dir" && as_dir=.
10293    for ac_exec_ext in '' $ac_executable_extensions; do
10294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10295    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297    break 2
10298  fi
10299done
10300  done
10301IFS=$as_save_IFS
10302
10303  ;;
10304esac
10305fi
10306TR=$ac_cv_path_TR
10307if test -n "$TR"; then
10308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10309$as_echo "$TR" >&6; }
10310else
10311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312$as_echo "no" >&6; }
10313fi
10314
10315
10316  test -n "$TR" && break
10317done
10318
10319    else
10320      # If it succeeded, then it was overridden by the user. We will use it
10321      # for the tool.
10322
10323      # First remove it from the list of overridden variables, so we can test
10324      # for unknown variables in the end.
10325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10326
10327      # Check if the provided tool contains a complete path.
10328      tool_specified="$TR"
10329      tool_basename="${tool_specified##*/}"
10330      if test "x$tool_basename" = "x$tool_specified"; then
10331        # A command without a complete path is provided, search $PATH.
10332        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10333$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10334        # Extract the first word of "$tool_basename", so it can be a program name with args.
10335set dummy $tool_basename; ac_word=$2
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10337$as_echo_n "checking for $ac_word... " >&6; }
10338if ${ac_cv_path_TR+:} false; then :
10339  $as_echo_n "(cached) " >&6
10340else
10341  case $TR in
10342  [\\/]* | ?:[\\/]*)
10343  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10344  ;;
10345  *)
10346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10347for as_dir in $PATH
10348do
10349  IFS=$as_save_IFS
10350  test -z "$as_dir" && as_dir=.
10351    for ac_exec_ext in '' $ac_executable_extensions; do
10352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10353    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10355    break 2
10356  fi
10357done
10358  done
10359IFS=$as_save_IFS
10360
10361  ;;
10362esac
10363fi
10364TR=$ac_cv_path_TR
10365if test -n "$TR"; then
10366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10367$as_echo "$TR" >&6; }
10368else
10369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10370$as_echo "no" >&6; }
10371fi
10372
10373
10374        if test "x$TR" = x; then
10375          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10376        fi
10377      else
10378        # Otherwise we believe it is a complete path. Use it as it is.
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10380$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10382$as_echo_n "checking for TR... " >&6; }
10383        if test ! -x "$tool_specified"; then
10384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10385$as_echo "not found" >&6; }
10386          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10387        fi
10388        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10389$as_echo "$tool_specified" >&6; }
10390      fi
10391    fi
10392  fi
10393
10394
10395
10396  if test "x$TR" = x; then
10397    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10398  fi
10399
10400
10401
10402
10403
10404  # Publish this variable in the help.
10405
10406
10407  if test "x$UNAME" = x; then
10408    # The variable is not set by user, try to locate tool using the code snippet
10409    for ac_prog in uname
10410do
10411  # Extract the first word of "$ac_prog", so it can be a program name with args.
10412set dummy $ac_prog; ac_word=$2
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10414$as_echo_n "checking for $ac_word... " >&6; }
10415if ${ac_cv_path_UNAME+:} false; then :
10416  $as_echo_n "(cached) " >&6
10417else
10418  case $UNAME in
10419  [\\/]* | ?:[\\/]*)
10420  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10421  ;;
10422  *)
10423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10424for as_dir in $PATH
10425do
10426  IFS=$as_save_IFS
10427  test -z "$as_dir" && as_dir=.
10428    for ac_exec_ext in '' $ac_executable_extensions; do
10429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10430    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10432    break 2
10433  fi
10434done
10435  done
10436IFS=$as_save_IFS
10437
10438  ;;
10439esac
10440fi
10441UNAME=$ac_cv_path_UNAME
10442if test -n "$UNAME"; then
10443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10444$as_echo "$UNAME" >&6; }
10445else
10446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
10448fi
10449
10450
10451  test -n "$UNAME" && break
10452done
10453
10454  else
10455    # The variable is set, but is it from the command line or the environment?
10456
10457    # Try to remove the string !UNAME! from our list.
10458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10460      # If it failed, the variable was not from the command line. Ignore it,
10461      # but warn the user (except for BASH, which is always set by the calling BASH).
10462      if test "xUNAME" != xBASH; then
10463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10464$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10465      fi
10466      # Try to locate tool using the code snippet
10467      for ac_prog in uname
10468do
10469  # Extract the first word of "$ac_prog", so it can be a program name with args.
10470set dummy $ac_prog; ac_word=$2
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472$as_echo_n "checking for $ac_word... " >&6; }
10473if ${ac_cv_path_UNAME+:} false; then :
10474  $as_echo_n "(cached) " >&6
10475else
10476  case $UNAME in
10477  [\\/]* | ?:[\\/]*)
10478  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10479  ;;
10480  *)
10481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10482for as_dir in $PATH
10483do
10484  IFS=$as_save_IFS
10485  test -z "$as_dir" && as_dir=.
10486    for ac_exec_ext in '' $ac_executable_extensions; do
10487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10488    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10490    break 2
10491  fi
10492done
10493  done
10494IFS=$as_save_IFS
10495
10496  ;;
10497esac
10498fi
10499UNAME=$ac_cv_path_UNAME
10500if test -n "$UNAME"; then
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10502$as_echo "$UNAME" >&6; }
10503else
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509  test -n "$UNAME" && break
10510done
10511
10512    else
10513      # If it succeeded, then it was overridden by the user. We will use it
10514      # for the tool.
10515
10516      # First remove it from the list of overridden variables, so we can test
10517      # for unknown variables in the end.
10518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10519
10520      # Check if the provided tool contains a complete path.
10521      tool_specified="$UNAME"
10522      tool_basename="${tool_specified##*/}"
10523      if test "x$tool_basename" = "x$tool_specified"; then
10524        # A command without a complete path is provided, search $PATH.
10525        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10526$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10527        # Extract the first word of "$tool_basename", so it can be a program name with args.
10528set dummy $tool_basename; ac_word=$2
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530$as_echo_n "checking for $ac_word... " >&6; }
10531if ${ac_cv_path_UNAME+:} false; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  case $UNAME in
10535  [\\/]* | ?:[\\/]*)
10536  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10537  ;;
10538  *)
10539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540for as_dir in $PATH
10541do
10542  IFS=$as_save_IFS
10543  test -z "$as_dir" && as_dir=.
10544    for ac_exec_ext in '' $ac_executable_extensions; do
10545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548    break 2
10549  fi
10550done
10551  done
10552IFS=$as_save_IFS
10553
10554  ;;
10555esac
10556fi
10557UNAME=$ac_cv_path_UNAME
10558if test -n "$UNAME"; then
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10560$as_echo "$UNAME" >&6; }
10561else
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564fi
10565
10566
10567        if test "x$UNAME" = x; then
10568          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10569        fi
10570      else
10571        # Otherwise we believe it is a complete path. Use it as it is.
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10573$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10575$as_echo_n "checking for UNAME... " >&6; }
10576        if test ! -x "$tool_specified"; then
10577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10578$as_echo "not found" >&6; }
10579          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10580        fi
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10582$as_echo "$tool_specified" >&6; }
10583      fi
10584    fi
10585  fi
10586
10587
10588
10589  if test "x$UNAME" = x; then
10590    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10591  fi
10592
10593
10594
10595
10596
10597  # Publish this variable in the help.
10598
10599
10600  if test "x$UNIQ" = x; then
10601    # The variable is not set by user, try to locate tool using the code snippet
10602    for ac_prog in uniq
10603do
10604  # Extract the first word of "$ac_prog", so it can be a program name with args.
10605set dummy $ac_prog; ac_word=$2
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10607$as_echo_n "checking for $ac_word... " >&6; }
10608if ${ac_cv_path_UNIQ+:} false; then :
10609  $as_echo_n "(cached) " >&6
10610else
10611  case $UNIQ in
10612  [\\/]* | ?:[\\/]*)
10613  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10614  ;;
10615  *)
10616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10617for as_dir in $PATH
10618do
10619  IFS=$as_save_IFS
10620  test -z "$as_dir" && as_dir=.
10621    for ac_exec_ext in '' $ac_executable_extensions; do
10622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10623    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10625    break 2
10626  fi
10627done
10628  done
10629IFS=$as_save_IFS
10630
10631  ;;
10632esac
10633fi
10634UNIQ=$ac_cv_path_UNIQ
10635if test -n "$UNIQ"; then
10636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10637$as_echo "$UNIQ" >&6; }
10638else
10639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10640$as_echo "no" >&6; }
10641fi
10642
10643
10644  test -n "$UNIQ" && break
10645done
10646
10647  else
10648    # The variable is set, but is it from the command line or the environment?
10649
10650    # Try to remove the string !UNIQ! from our list.
10651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10653      # If it failed, the variable was not from the command line. Ignore it,
10654      # but warn the user (except for BASH, which is always set by the calling BASH).
10655      if test "xUNIQ" != xBASH; then
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10657$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10658      fi
10659      # Try to locate tool using the code snippet
10660      for ac_prog in uniq
10661do
10662  # Extract the first word of "$ac_prog", so it can be a program name with args.
10663set dummy $ac_prog; ac_word=$2
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10665$as_echo_n "checking for $ac_word... " >&6; }
10666if ${ac_cv_path_UNIQ+:} false; then :
10667  $as_echo_n "(cached) " >&6
10668else
10669  case $UNIQ in
10670  [\\/]* | ?:[\\/]*)
10671  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10672  ;;
10673  *)
10674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10675for as_dir in $PATH
10676do
10677  IFS=$as_save_IFS
10678  test -z "$as_dir" && as_dir=.
10679    for ac_exec_ext in '' $ac_executable_extensions; do
10680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10681    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10683    break 2
10684  fi
10685done
10686  done
10687IFS=$as_save_IFS
10688
10689  ;;
10690esac
10691fi
10692UNIQ=$ac_cv_path_UNIQ
10693if test -n "$UNIQ"; then
10694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10695$as_echo "$UNIQ" >&6; }
10696else
10697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698$as_echo "no" >&6; }
10699fi
10700
10701
10702  test -n "$UNIQ" && break
10703done
10704
10705    else
10706      # If it succeeded, then it was overridden by the user. We will use it
10707      # for the tool.
10708
10709      # First remove it from the list of overridden variables, so we can test
10710      # for unknown variables in the end.
10711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10712
10713      # Check if the provided tool contains a complete path.
10714      tool_specified="$UNIQ"
10715      tool_basename="${tool_specified##*/}"
10716      if test "x$tool_basename" = "x$tool_specified"; then
10717        # A command without a complete path is provided, search $PATH.
10718        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10719$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10720        # Extract the first word of "$tool_basename", so it can be a program name with args.
10721set dummy $tool_basename; ac_word=$2
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10723$as_echo_n "checking for $ac_word... " >&6; }
10724if ${ac_cv_path_UNIQ+:} false; then :
10725  $as_echo_n "(cached) " >&6
10726else
10727  case $UNIQ in
10728  [\\/]* | ?:[\\/]*)
10729  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10730  ;;
10731  *)
10732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10733for as_dir in $PATH
10734do
10735  IFS=$as_save_IFS
10736  test -z "$as_dir" && as_dir=.
10737    for ac_exec_ext in '' $ac_executable_extensions; do
10738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10739    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10741    break 2
10742  fi
10743done
10744  done
10745IFS=$as_save_IFS
10746
10747  ;;
10748esac
10749fi
10750UNIQ=$ac_cv_path_UNIQ
10751if test -n "$UNIQ"; then
10752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10753$as_echo "$UNIQ" >&6; }
10754else
10755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
10757fi
10758
10759
10760        if test "x$UNIQ" = x; then
10761          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10762        fi
10763      else
10764        # Otherwise we believe it is a complete path. Use it as it is.
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10766$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10768$as_echo_n "checking for UNIQ... " >&6; }
10769        if test ! -x "$tool_specified"; then
10770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10771$as_echo "not found" >&6; }
10772          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10773        fi
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10775$as_echo "$tool_specified" >&6; }
10776      fi
10777    fi
10778  fi
10779
10780
10781
10782  if test "x$UNIQ" = x; then
10783    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10784  fi
10785
10786
10787
10788
10789
10790  # Publish this variable in the help.
10791
10792
10793  if test "x$WC" = x; then
10794    # The variable is not set by user, try to locate tool using the code snippet
10795    for ac_prog in wc
10796do
10797  # Extract the first word of "$ac_prog", so it can be a program name with args.
10798set dummy $ac_prog; ac_word=$2
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10800$as_echo_n "checking for $ac_word... " >&6; }
10801if ${ac_cv_path_WC+:} false; then :
10802  $as_echo_n "(cached) " >&6
10803else
10804  case $WC in
10805  [\\/]* | ?:[\\/]*)
10806  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10807  ;;
10808  *)
10809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10810for as_dir in $PATH
10811do
10812  IFS=$as_save_IFS
10813  test -z "$as_dir" && as_dir=.
10814    for ac_exec_ext in '' $ac_executable_extensions; do
10815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10816    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10818    break 2
10819  fi
10820done
10821  done
10822IFS=$as_save_IFS
10823
10824  ;;
10825esac
10826fi
10827WC=$ac_cv_path_WC
10828if test -n "$WC"; then
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10830$as_echo "$WC" >&6; }
10831else
10832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10833$as_echo "no" >&6; }
10834fi
10835
10836
10837  test -n "$WC" && break
10838done
10839
10840  else
10841    # The variable is set, but is it from the command line or the environment?
10842
10843    # Try to remove the string !WC! from our list.
10844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10846      # If it failed, the variable was not from the command line. Ignore it,
10847      # but warn the user (except for BASH, which is always set by the calling BASH).
10848      if test "xWC" != xBASH; then
10849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10850$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10851      fi
10852      # Try to locate tool using the code snippet
10853      for ac_prog in wc
10854do
10855  # Extract the first word of "$ac_prog", so it can be a program name with args.
10856set dummy $ac_prog; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_path_WC+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  case $WC in
10863  [\\/]* | ?:[\\/]*)
10864  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10865  ;;
10866  *)
10867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10868for as_dir in $PATH
10869do
10870  IFS=$as_save_IFS
10871  test -z "$as_dir" && as_dir=.
10872    for ac_exec_ext in '' $ac_executable_extensions; do
10873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10874    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10876    break 2
10877  fi
10878done
10879  done
10880IFS=$as_save_IFS
10881
10882  ;;
10883esac
10884fi
10885WC=$ac_cv_path_WC
10886if test -n "$WC"; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10888$as_echo "$WC" >&6; }
10889else
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892fi
10893
10894
10895  test -n "$WC" && break
10896done
10897
10898    else
10899      # If it succeeded, then it was overridden by the user. We will use it
10900      # for the tool.
10901
10902      # First remove it from the list of overridden variables, so we can test
10903      # for unknown variables in the end.
10904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10905
10906      # Check if the provided tool contains a complete path.
10907      tool_specified="$WC"
10908      tool_basename="${tool_specified##*/}"
10909      if test "x$tool_basename" = "x$tool_specified"; then
10910        # A command without a complete path is provided, search $PATH.
10911        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10912$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10913        # Extract the first word of "$tool_basename", so it can be a program name with args.
10914set dummy $tool_basename; ac_word=$2
10915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10916$as_echo_n "checking for $ac_word... " >&6; }
10917if ${ac_cv_path_WC+:} false; then :
10918  $as_echo_n "(cached) " >&6
10919else
10920  case $WC in
10921  [\\/]* | ?:[\\/]*)
10922  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10923  ;;
10924  *)
10925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10926for as_dir in $PATH
10927do
10928  IFS=$as_save_IFS
10929  test -z "$as_dir" && as_dir=.
10930    for ac_exec_ext in '' $ac_executable_extensions; do
10931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10932    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10934    break 2
10935  fi
10936done
10937  done
10938IFS=$as_save_IFS
10939
10940  ;;
10941esac
10942fi
10943WC=$ac_cv_path_WC
10944if test -n "$WC"; then
10945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10946$as_echo "$WC" >&6; }
10947else
10948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10949$as_echo "no" >&6; }
10950fi
10951
10952
10953        if test "x$WC" = x; then
10954          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10955        fi
10956      else
10957        # Otherwise we believe it is a complete path. Use it as it is.
10958        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10959$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10961$as_echo_n "checking for WC... " >&6; }
10962        if test ! -x "$tool_specified"; then
10963          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10964$as_echo "not found" >&6; }
10965          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10966        fi
10967        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10968$as_echo "$tool_specified" >&6; }
10969      fi
10970    fi
10971  fi
10972
10973
10974
10975  if test "x$WC" = x; then
10976    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10977  fi
10978
10979
10980
10981
10982
10983  # Publish this variable in the help.
10984
10985
10986  if test "x$WHICH" = x; then
10987    # The variable is not set by user, try to locate tool using the code snippet
10988    for ac_prog in which
10989do
10990  # Extract the first word of "$ac_prog", so it can be a program name with args.
10991set dummy $ac_prog; ac_word=$2
10992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10993$as_echo_n "checking for $ac_word... " >&6; }
10994if ${ac_cv_path_WHICH+:} false; then :
10995  $as_echo_n "(cached) " >&6
10996else
10997  case $WHICH in
10998  [\\/]* | ?:[\\/]*)
10999  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11000  ;;
11001  *)
11002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11003for as_dir in $PATH
11004do
11005  IFS=$as_save_IFS
11006  test -z "$as_dir" && as_dir=.
11007    for ac_exec_ext in '' $ac_executable_extensions; do
11008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11009    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11011    break 2
11012  fi
11013done
11014  done
11015IFS=$as_save_IFS
11016
11017  ;;
11018esac
11019fi
11020WHICH=$ac_cv_path_WHICH
11021if test -n "$WHICH"; then
11022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11023$as_echo "$WHICH" >&6; }
11024else
11025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11026$as_echo "no" >&6; }
11027fi
11028
11029
11030  test -n "$WHICH" && break
11031done
11032
11033  else
11034    # The variable is set, but is it from the command line or the environment?
11035
11036    # Try to remove the string !WHICH! from our list.
11037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11039      # If it failed, the variable was not from the command line. Ignore it,
11040      # but warn the user (except for BASH, which is always set by the calling BASH).
11041      if test "xWHICH" != xBASH; then
11042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11043$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11044      fi
11045      # Try to locate tool using the code snippet
11046      for ac_prog in which
11047do
11048  # Extract the first word of "$ac_prog", so it can be a program name with args.
11049set dummy $ac_prog; ac_word=$2
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11051$as_echo_n "checking for $ac_word... " >&6; }
11052if ${ac_cv_path_WHICH+:} false; then :
11053  $as_echo_n "(cached) " >&6
11054else
11055  case $WHICH in
11056  [\\/]* | ?:[\\/]*)
11057  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11058  ;;
11059  *)
11060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11061for as_dir in $PATH
11062do
11063  IFS=$as_save_IFS
11064  test -z "$as_dir" && as_dir=.
11065    for ac_exec_ext in '' $ac_executable_extensions; do
11066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11067    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11069    break 2
11070  fi
11071done
11072  done
11073IFS=$as_save_IFS
11074
11075  ;;
11076esac
11077fi
11078WHICH=$ac_cv_path_WHICH
11079if test -n "$WHICH"; then
11080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11081$as_echo "$WHICH" >&6; }
11082else
11083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11084$as_echo "no" >&6; }
11085fi
11086
11087
11088  test -n "$WHICH" && break
11089done
11090
11091    else
11092      # If it succeeded, then it was overridden by the user. We will use it
11093      # for the tool.
11094
11095      # First remove it from the list of overridden variables, so we can test
11096      # for unknown variables in the end.
11097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11098
11099      # Check if the provided tool contains a complete path.
11100      tool_specified="$WHICH"
11101      tool_basename="${tool_specified##*/}"
11102      if test "x$tool_basename" = "x$tool_specified"; then
11103        # A command without a complete path is provided, search $PATH.
11104        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11105$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11106        # Extract the first word of "$tool_basename", so it can be a program name with args.
11107set dummy $tool_basename; ac_word=$2
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11109$as_echo_n "checking for $ac_word... " >&6; }
11110if ${ac_cv_path_WHICH+:} false; then :
11111  $as_echo_n "(cached) " >&6
11112else
11113  case $WHICH in
11114  [\\/]* | ?:[\\/]*)
11115  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11116  ;;
11117  *)
11118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11119for as_dir in $PATH
11120do
11121  IFS=$as_save_IFS
11122  test -z "$as_dir" && as_dir=.
11123    for ac_exec_ext in '' $ac_executable_extensions; do
11124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11125    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11127    break 2
11128  fi
11129done
11130  done
11131IFS=$as_save_IFS
11132
11133  ;;
11134esac
11135fi
11136WHICH=$ac_cv_path_WHICH
11137if test -n "$WHICH"; then
11138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11139$as_echo "$WHICH" >&6; }
11140else
11141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11142$as_echo "no" >&6; }
11143fi
11144
11145
11146        if test "x$WHICH" = x; then
11147          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11148        fi
11149      else
11150        # Otherwise we believe it is a complete path. Use it as it is.
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11152$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11154$as_echo_n "checking for WHICH... " >&6; }
11155        if test ! -x "$tool_specified"; then
11156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11157$as_echo "not found" >&6; }
11158          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11159        fi
11160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11161$as_echo "$tool_specified" >&6; }
11162      fi
11163    fi
11164  fi
11165
11166
11167
11168  if test "x$WHICH" = x; then
11169    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11170  fi
11171
11172
11173
11174
11175
11176  # Publish this variable in the help.
11177
11178
11179  if test "x$XARGS" = x; then
11180    # The variable is not set by user, try to locate tool using the code snippet
11181    for ac_prog in xargs
11182do
11183  # Extract the first word of "$ac_prog", so it can be a program name with args.
11184set dummy $ac_prog; ac_word=$2
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11186$as_echo_n "checking for $ac_word... " >&6; }
11187if ${ac_cv_path_XARGS+:} false; then :
11188  $as_echo_n "(cached) " >&6
11189else
11190  case $XARGS in
11191  [\\/]* | ?:[\\/]*)
11192  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11193  ;;
11194  *)
11195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11196for as_dir in $PATH
11197do
11198  IFS=$as_save_IFS
11199  test -z "$as_dir" && as_dir=.
11200    for ac_exec_ext in '' $ac_executable_extensions; do
11201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11202    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11204    break 2
11205  fi
11206done
11207  done
11208IFS=$as_save_IFS
11209
11210  ;;
11211esac
11212fi
11213XARGS=$ac_cv_path_XARGS
11214if test -n "$XARGS"; then
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11216$as_echo "$XARGS" >&6; }
11217else
11218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219$as_echo "no" >&6; }
11220fi
11221
11222
11223  test -n "$XARGS" && break
11224done
11225
11226  else
11227    # The variable is set, but is it from the command line or the environment?
11228
11229    # Try to remove the string !XARGS! from our list.
11230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11232      # If it failed, the variable was not from the command line. Ignore it,
11233      # but warn the user (except for BASH, which is always set by the calling BASH).
11234      if test "xXARGS" != xBASH; then
11235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11236$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11237      fi
11238      # Try to locate tool using the code snippet
11239      for ac_prog in xargs
11240do
11241  # Extract the first word of "$ac_prog", so it can be a program name with args.
11242set dummy $ac_prog; ac_word=$2
11243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11244$as_echo_n "checking for $ac_word... " >&6; }
11245if ${ac_cv_path_XARGS+:} false; then :
11246  $as_echo_n "(cached) " >&6
11247else
11248  case $XARGS in
11249  [\\/]* | ?:[\\/]*)
11250  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11251  ;;
11252  *)
11253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11254for as_dir in $PATH
11255do
11256  IFS=$as_save_IFS
11257  test -z "$as_dir" && as_dir=.
11258    for ac_exec_ext in '' $ac_executable_extensions; do
11259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11260    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11262    break 2
11263  fi
11264done
11265  done
11266IFS=$as_save_IFS
11267
11268  ;;
11269esac
11270fi
11271XARGS=$ac_cv_path_XARGS
11272if test -n "$XARGS"; then
11273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11274$as_echo "$XARGS" >&6; }
11275else
11276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
11278fi
11279
11280
11281  test -n "$XARGS" && break
11282done
11283
11284    else
11285      # If it succeeded, then it was overridden by the user. We will use it
11286      # for the tool.
11287
11288      # First remove it from the list of overridden variables, so we can test
11289      # for unknown variables in the end.
11290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11291
11292      # Check if the provided tool contains a complete path.
11293      tool_specified="$XARGS"
11294      tool_basename="${tool_specified##*/}"
11295      if test "x$tool_basename" = "x$tool_specified"; then
11296        # A command without a complete path is provided, search $PATH.
11297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11298$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11299        # Extract the first word of "$tool_basename", so it can be a program name with args.
11300set dummy $tool_basename; ac_word=$2
11301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11302$as_echo_n "checking for $ac_word... " >&6; }
11303if ${ac_cv_path_XARGS+:} false; then :
11304  $as_echo_n "(cached) " >&6
11305else
11306  case $XARGS in
11307  [\\/]* | ?:[\\/]*)
11308  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11309  ;;
11310  *)
11311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11312for as_dir in $PATH
11313do
11314  IFS=$as_save_IFS
11315  test -z "$as_dir" && as_dir=.
11316    for ac_exec_ext in '' $ac_executable_extensions; do
11317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11318    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11320    break 2
11321  fi
11322done
11323  done
11324IFS=$as_save_IFS
11325
11326  ;;
11327esac
11328fi
11329XARGS=$ac_cv_path_XARGS
11330if test -n "$XARGS"; then
11331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11332$as_echo "$XARGS" >&6; }
11333else
11334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11335$as_echo "no" >&6; }
11336fi
11337
11338
11339        if test "x$XARGS" = x; then
11340          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11341        fi
11342      else
11343        # Otherwise we believe it is a complete path. Use it as it is.
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11345$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11347$as_echo_n "checking for XARGS... " >&6; }
11348        if test ! -x "$tool_specified"; then
11349          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11350$as_echo "not found" >&6; }
11351          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11352        fi
11353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11354$as_echo "$tool_specified" >&6; }
11355      fi
11356    fi
11357  fi
11358
11359
11360
11361  if test "x$XARGS" = x; then
11362    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11363  fi
11364
11365
11366
11367  # Then required tools that require some special treatment.
11368
11369
11370  # Publish this variable in the help.
11371
11372
11373  if test "x$AWK" = x; then
11374    # The variable is not set by user, try to locate tool using the code snippet
11375    for ac_prog in gawk mawk nawk awk
11376do
11377  # Extract the first word of "$ac_prog", so it can be a program name with args.
11378set dummy $ac_prog; ac_word=$2
11379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11380$as_echo_n "checking for $ac_word... " >&6; }
11381if ${ac_cv_prog_AWK+:} false; then :
11382  $as_echo_n "(cached) " >&6
11383else
11384  if test -n "$AWK"; then
11385  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11386else
11387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388for as_dir in $PATH
11389do
11390  IFS=$as_save_IFS
11391  test -z "$as_dir" && as_dir=.
11392    for ac_exec_ext in '' $ac_executable_extensions; do
11393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394    ac_cv_prog_AWK="$ac_prog"
11395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396    break 2
11397  fi
11398done
11399  done
11400IFS=$as_save_IFS
11401
11402fi
11403fi
11404AWK=$ac_cv_prog_AWK
11405if test -n "$AWK"; then
11406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11407$as_echo "$AWK" >&6; }
11408else
11409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
11411fi
11412
11413
11414  test -n "$AWK" && break
11415done
11416
11417  else
11418    # The variable is set, but is it from the command line or the environment?
11419
11420    # Try to remove the string !AWK! from our list.
11421    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11422    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11423      # If it failed, the variable was not from the command line. Ignore it,
11424      # but warn the user (except for BASH, which is always set by the calling BASH).
11425      if test "xAWK" != xBASH; then
11426        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11427$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11428      fi
11429      # Try to locate tool using the code snippet
11430      for ac_prog in gawk mawk nawk awk
11431do
11432  # Extract the first word of "$ac_prog", so it can be a program name with args.
11433set dummy $ac_prog; ac_word=$2
11434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11435$as_echo_n "checking for $ac_word... " >&6; }
11436if ${ac_cv_prog_AWK+:} false; then :
11437  $as_echo_n "(cached) " >&6
11438else
11439  if test -n "$AWK"; then
11440  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11441else
11442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11443for as_dir in $PATH
11444do
11445  IFS=$as_save_IFS
11446  test -z "$as_dir" && as_dir=.
11447    for ac_exec_ext in '' $ac_executable_extensions; do
11448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11449    ac_cv_prog_AWK="$ac_prog"
11450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11451    break 2
11452  fi
11453done
11454  done
11455IFS=$as_save_IFS
11456
11457fi
11458fi
11459AWK=$ac_cv_prog_AWK
11460if test -n "$AWK"; then
11461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11462$as_echo "$AWK" >&6; }
11463else
11464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11465$as_echo "no" >&6; }
11466fi
11467
11468
11469  test -n "$AWK" && break
11470done
11471
11472    else
11473      # If it succeeded, then it was overridden by the user. We will use it
11474      # for the tool.
11475
11476      # First remove it from the list of overridden variables, so we can test
11477      # for unknown variables in the end.
11478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11479
11480      # Check if the provided tool contains a complete path.
11481      tool_specified="$AWK"
11482      tool_basename="${tool_specified##*/}"
11483      if test "x$tool_basename" = "x$tool_specified"; then
11484        # A command without a complete path is provided, search $PATH.
11485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11486$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11487        # Extract the first word of "$tool_basename", so it can be a program name with args.
11488set dummy $tool_basename; ac_word=$2
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11490$as_echo_n "checking for $ac_word... " >&6; }
11491if ${ac_cv_path_AWK+:} false; then :
11492  $as_echo_n "(cached) " >&6
11493else
11494  case $AWK in
11495  [\\/]* | ?:[\\/]*)
11496  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11497  ;;
11498  *)
11499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11500for as_dir in $PATH
11501do
11502  IFS=$as_save_IFS
11503  test -z "$as_dir" && as_dir=.
11504    for ac_exec_ext in '' $ac_executable_extensions; do
11505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11506    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11508    break 2
11509  fi
11510done
11511  done
11512IFS=$as_save_IFS
11513
11514  ;;
11515esac
11516fi
11517AWK=$ac_cv_path_AWK
11518if test -n "$AWK"; then
11519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11520$as_echo "$AWK" >&6; }
11521else
11522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11523$as_echo "no" >&6; }
11524fi
11525
11526
11527        if test "x$AWK" = x; then
11528          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11529        fi
11530      else
11531        # Otherwise we believe it is a complete path. Use it as it is.
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11533$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11535$as_echo_n "checking for AWK... " >&6; }
11536        if test ! -x "$tool_specified"; then
11537          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11538$as_echo "not found" >&6; }
11539          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11540        fi
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11542$as_echo "$tool_specified" >&6; }
11543      fi
11544    fi
11545  fi
11546
11547
11548  if test "x$AWK" = x; then
11549    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11550  fi
11551
11552
11553
11554
11555  # Publish this variable in the help.
11556
11557
11558  if test "x$GREP" = x; then
11559    # The variable is not set by user, try to locate tool using the code snippet
11560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11561$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11562if ${ac_cv_path_GREP+:} false; then :
11563  $as_echo_n "(cached) " >&6
11564else
11565  if test -z "$GREP"; then
11566  ac_path_GREP_found=false
11567  # Loop through the user's path and test for each of PROGNAME-LIST
11568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11569for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11570do
11571  IFS=$as_save_IFS
11572  test -z "$as_dir" && as_dir=.
11573    for ac_prog in grep ggrep; do
11574    for ac_exec_ext in '' $ac_executable_extensions; do
11575      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11576      as_fn_executable_p "$ac_path_GREP" || continue
11577# Check for GNU ac_path_GREP and select it if it is found.
11578  # Check for GNU $ac_path_GREP
11579case `"$ac_path_GREP" --version 2>&1` in
11580*GNU*)
11581  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11582*)
11583  ac_count=0
11584  $as_echo_n 0123456789 >"conftest.in"
11585  while :
11586  do
11587    cat "conftest.in" "conftest.in" >"conftest.tmp"
11588    mv "conftest.tmp" "conftest.in"
11589    cp "conftest.in" "conftest.nl"
11590    $as_echo 'GREP' >> "conftest.nl"
11591    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11592    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11593    as_fn_arith $ac_count + 1 && ac_count=$as_val
11594    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11595      # Best one so far, save it but keep looking for a better one
11596      ac_cv_path_GREP="$ac_path_GREP"
11597      ac_path_GREP_max=$ac_count
11598    fi
11599    # 10*(2^10) chars as input seems more than enough
11600    test $ac_count -gt 10 && break
11601  done
11602  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11603esac
11604
11605      $ac_path_GREP_found && break 3
11606    done
11607  done
11608  done
11609IFS=$as_save_IFS
11610  if test -z "$ac_cv_path_GREP"; then
11611    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11612  fi
11613else
11614  ac_cv_path_GREP=$GREP
11615fi
11616
11617fi
11618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11619$as_echo "$ac_cv_path_GREP" >&6; }
11620 GREP="$ac_cv_path_GREP"
11621
11622
11623  else
11624    # The variable is set, but is it from the command line or the environment?
11625
11626    # Try to remove the string !GREP! from our list.
11627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11629      # If it failed, the variable was not from the command line. Ignore it,
11630      # but warn the user (except for BASH, which is always set by the calling BASH).
11631      if test "xGREP" != xBASH; then
11632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11633$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11634      fi
11635      # Try to locate tool using the code snippet
11636      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11637$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11638if ${ac_cv_path_GREP+:} false; then :
11639  $as_echo_n "(cached) " >&6
11640else
11641  if test -z "$GREP"; then
11642  ac_path_GREP_found=false
11643  # Loop through the user's path and test for each of PROGNAME-LIST
11644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11645for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11646do
11647  IFS=$as_save_IFS
11648  test -z "$as_dir" && as_dir=.
11649    for ac_prog in grep ggrep; do
11650    for ac_exec_ext in '' $ac_executable_extensions; do
11651      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11652      as_fn_executable_p "$ac_path_GREP" || continue
11653# Check for GNU ac_path_GREP and select it if it is found.
11654  # Check for GNU $ac_path_GREP
11655case `"$ac_path_GREP" --version 2>&1` in
11656*GNU*)
11657  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11658*)
11659  ac_count=0
11660  $as_echo_n 0123456789 >"conftest.in"
11661  while :
11662  do
11663    cat "conftest.in" "conftest.in" >"conftest.tmp"
11664    mv "conftest.tmp" "conftest.in"
11665    cp "conftest.in" "conftest.nl"
11666    $as_echo 'GREP' >> "conftest.nl"
11667    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11668    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11669    as_fn_arith $ac_count + 1 && ac_count=$as_val
11670    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11671      # Best one so far, save it but keep looking for a better one
11672      ac_cv_path_GREP="$ac_path_GREP"
11673      ac_path_GREP_max=$ac_count
11674    fi
11675    # 10*(2^10) chars as input seems more than enough
11676    test $ac_count -gt 10 && break
11677  done
11678  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11679esac
11680
11681      $ac_path_GREP_found && break 3
11682    done
11683  done
11684  done
11685IFS=$as_save_IFS
11686  if test -z "$ac_cv_path_GREP"; then
11687    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11688  fi
11689else
11690  ac_cv_path_GREP=$GREP
11691fi
11692
11693fi
11694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11695$as_echo "$ac_cv_path_GREP" >&6; }
11696 GREP="$ac_cv_path_GREP"
11697
11698
11699    else
11700      # If it succeeded, then it was overridden by the user. We will use it
11701      # for the tool.
11702
11703      # First remove it from the list of overridden variables, so we can test
11704      # for unknown variables in the end.
11705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11706
11707      # Check if the provided tool contains a complete path.
11708      tool_specified="$GREP"
11709      tool_basename="${tool_specified##*/}"
11710      if test "x$tool_basename" = "x$tool_specified"; then
11711        # A command without a complete path is provided, search $PATH.
11712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11713$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11714        # Extract the first word of "$tool_basename", so it can be a program name with args.
11715set dummy $tool_basename; ac_word=$2
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11717$as_echo_n "checking for $ac_word... " >&6; }
11718if ${ac_cv_path_GREP+:} false; then :
11719  $as_echo_n "(cached) " >&6
11720else
11721  case $GREP in
11722  [\\/]* | ?:[\\/]*)
11723  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11724  ;;
11725  *)
11726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11727for as_dir in $PATH
11728do
11729  IFS=$as_save_IFS
11730  test -z "$as_dir" && as_dir=.
11731    for ac_exec_ext in '' $ac_executable_extensions; do
11732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11733    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11735    break 2
11736  fi
11737done
11738  done
11739IFS=$as_save_IFS
11740
11741  ;;
11742esac
11743fi
11744GREP=$ac_cv_path_GREP
11745if test -n "$GREP"; then
11746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11747$as_echo "$GREP" >&6; }
11748else
11749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750$as_echo "no" >&6; }
11751fi
11752
11753
11754        if test "x$GREP" = x; then
11755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11756        fi
11757      else
11758        # Otherwise we believe it is a complete path. Use it as it is.
11759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11760$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11762$as_echo_n "checking for GREP... " >&6; }
11763        if test ! -x "$tool_specified"; then
11764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11765$as_echo "not found" >&6; }
11766          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11767        fi
11768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11769$as_echo "$tool_specified" >&6; }
11770      fi
11771    fi
11772  fi
11773
11774
11775  if test "x$GREP" = x; then
11776    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11777  fi
11778
11779
11780
11781
11782  # Publish this variable in the help.
11783
11784
11785  if test "x$EGREP" = x; then
11786    # The variable is not set by user, try to locate tool using the code snippet
11787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11788$as_echo_n "checking for egrep... " >&6; }
11789if ${ac_cv_path_EGREP+:} false; then :
11790  $as_echo_n "(cached) " >&6
11791else
11792  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11793   then ac_cv_path_EGREP="$GREP -E"
11794   else
11795     if test -z "$EGREP"; then
11796  ac_path_EGREP_found=false
11797  # Loop through the user's path and test for each of PROGNAME-LIST
11798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11799for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11800do
11801  IFS=$as_save_IFS
11802  test -z "$as_dir" && as_dir=.
11803    for ac_prog in egrep; do
11804    for ac_exec_ext in '' $ac_executable_extensions; do
11805      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11806      as_fn_executable_p "$ac_path_EGREP" || continue
11807# Check for GNU ac_path_EGREP and select it if it is found.
11808  # Check for GNU $ac_path_EGREP
11809case `"$ac_path_EGREP" --version 2>&1` in
11810*GNU*)
11811  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11812*)
11813  ac_count=0
11814  $as_echo_n 0123456789 >"conftest.in"
11815  while :
11816  do
11817    cat "conftest.in" "conftest.in" >"conftest.tmp"
11818    mv "conftest.tmp" "conftest.in"
11819    cp "conftest.in" "conftest.nl"
11820    $as_echo 'EGREP' >> "conftest.nl"
11821    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11822    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11823    as_fn_arith $ac_count + 1 && ac_count=$as_val
11824    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11825      # Best one so far, save it but keep looking for a better one
11826      ac_cv_path_EGREP="$ac_path_EGREP"
11827      ac_path_EGREP_max=$ac_count
11828    fi
11829    # 10*(2^10) chars as input seems more than enough
11830    test $ac_count -gt 10 && break
11831  done
11832  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11833esac
11834
11835      $ac_path_EGREP_found && break 3
11836    done
11837  done
11838  done
11839IFS=$as_save_IFS
11840  if test -z "$ac_cv_path_EGREP"; then
11841    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11842  fi
11843else
11844  ac_cv_path_EGREP=$EGREP
11845fi
11846
11847   fi
11848fi
11849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11850$as_echo "$ac_cv_path_EGREP" >&6; }
11851 EGREP="$ac_cv_path_EGREP"
11852
11853
11854  else
11855    # The variable is set, but is it from the command line or the environment?
11856
11857    # Try to remove the string !EGREP! from our list.
11858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11860      # If it failed, the variable was not from the command line. Ignore it,
11861      # but warn the user (except for BASH, which is always set by the calling BASH).
11862      if test "xEGREP" != xBASH; then
11863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11864$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11865      fi
11866      # Try to locate tool using the code snippet
11867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11868$as_echo_n "checking for egrep... " >&6; }
11869if ${ac_cv_path_EGREP+:} false; then :
11870  $as_echo_n "(cached) " >&6
11871else
11872  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11873   then ac_cv_path_EGREP="$GREP -E"
11874   else
11875     if test -z "$EGREP"; then
11876  ac_path_EGREP_found=false
11877  # Loop through the user's path and test for each of PROGNAME-LIST
11878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11879for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11880do
11881  IFS=$as_save_IFS
11882  test -z "$as_dir" && as_dir=.
11883    for ac_prog in egrep; do
11884    for ac_exec_ext in '' $ac_executable_extensions; do
11885      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11886      as_fn_executable_p "$ac_path_EGREP" || continue
11887# Check for GNU ac_path_EGREP and select it if it is found.
11888  # Check for GNU $ac_path_EGREP
11889case `"$ac_path_EGREP" --version 2>&1` in
11890*GNU*)
11891  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11892*)
11893  ac_count=0
11894  $as_echo_n 0123456789 >"conftest.in"
11895  while :
11896  do
11897    cat "conftest.in" "conftest.in" >"conftest.tmp"
11898    mv "conftest.tmp" "conftest.in"
11899    cp "conftest.in" "conftest.nl"
11900    $as_echo 'EGREP' >> "conftest.nl"
11901    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11902    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11903    as_fn_arith $ac_count + 1 && ac_count=$as_val
11904    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11905      # Best one so far, save it but keep looking for a better one
11906      ac_cv_path_EGREP="$ac_path_EGREP"
11907      ac_path_EGREP_max=$ac_count
11908    fi
11909    # 10*(2^10) chars as input seems more than enough
11910    test $ac_count -gt 10 && break
11911  done
11912  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11913esac
11914
11915      $ac_path_EGREP_found && break 3
11916    done
11917  done
11918  done
11919IFS=$as_save_IFS
11920  if test -z "$ac_cv_path_EGREP"; then
11921    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11922  fi
11923else
11924  ac_cv_path_EGREP=$EGREP
11925fi
11926
11927   fi
11928fi
11929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11930$as_echo "$ac_cv_path_EGREP" >&6; }
11931 EGREP="$ac_cv_path_EGREP"
11932
11933
11934    else
11935      # If it succeeded, then it was overridden by the user. We will use it
11936      # for the tool.
11937
11938      # First remove it from the list of overridden variables, so we can test
11939      # for unknown variables in the end.
11940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11941
11942      # Check if the provided tool contains a complete path.
11943      tool_specified="$EGREP"
11944      tool_basename="${tool_specified##*/}"
11945      if test "x$tool_basename" = "x$tool_specified"; then
11946        # A command without a complete path is provided, search $PATH.
11947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11948$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11949        # Extract the first word of "$tool_basename", so it can be a program name with args.
11950set dummy $tool_basename; ac_word=$2
11951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11952$as_echo_n "checking for $ac_word... " >&6; }
11953if ${ac_cv_path_EGREP+:} false; then :
11954  $as_echo_n "(cached) " >&6
11955else
11956  case $EGREP in
11957  [\\/]* | ?:[\\/]*)
11958  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11959  ;;
11960  *)
11961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11962for as_dir in $PATH
11963do
11964  IFS=$as_save_IFS
11965  test -z "$as_dir" && as_dir=.
11966    for ac_exec_ext in '' $ac_executable_extensions; do
11967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11968    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11970    break 2
11971  fi
11972done
11973  done
11974IFS=$as_save_IFS
11975
11976  ;;
11977esac
11978fi
11979EGREP=$ac_cv_path_EGREP
11980if test -n "$EGREP"; then
11981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11982$as_echo "$EGREP" >&6; }
11983else
11984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11985$as_echo "no" >&6; }
11986fi
11987
11988
11989        if test "x$EGREP" = x; then
11990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11991        fi
11992      else
11993        # Otherwise we believe it is a complete path. Use it as it is.
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11995$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11997$as_echo_n "checking for EGREP... " >&6; }
11998        if test ! -x "$tool_specified"; then
11999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12000$as_echo "not found" >&6; }
12001          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12002        fi
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12004$as_echo "$tool_specified" >&6; }
12005      fi
12006    fi
12007  fi
12008
12009
12010  if test "x$EGREP" = x; then
12011    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12012  fi
12013
12014
12015
12016
12017  # Publish this variable in the help.
12018
12019
12020  if test "x$FGREP" = x; then
12021    # The variable is not set by user, try to locate tool using the code snippet
12022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12023$as_echo_n "checking for fgrep... " >&6; }
12024if ${ac_cv_path_FGREP+:} false; then :
12025  $as_echo_n "(cached) " >&6
12026else
12027  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12028   then ac_cv_path_FGREP="$GREP -F"
12029   else
12030     if test -z "$FGREP"; then
12031  ac_path_FGREP_found=false
12032  # Loop through the user's path and test for each of PROGNAME-LIST
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_prog in fgrep; do
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12041      as_fn_executable_p "$ac_path_FGREP" || continue
12042# Check for GNU ac_path_FGREP and select it if it is found.
12043  # Check for GNU $ac_path_FGREP
12044case `"$ac_path_FGREP" --version 2>&1` in
12045*GNU*)
12046  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12047*)
12048  ac_count=0
12049  $as_echo_n 0123456789 >"conftest.in"
12050  while :
12051  do
12052    cat "conftest.in" "conftest.in" >"conftest.tmp"
12053    mv "conftest.tmp" "conftest.in"
12054    cp "conftest.in" "conftest.nl"
12055    $as_echo 'FGREP' >> "conftest.nl"
12056    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12057    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12058    as_fn_arith $ac_count + 1 && ac_count=$as_val
12059    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12060      # Best one so far, save it but keep looking for a better one
12061      ac_cv_path_FGREP="$ac_path_FGREP"
12062      ac_path_FGREP_max=$ac_count
12063    fi
12064    # 10*(2^10) chars as input seems more than enough
12065    test $ac_count -gt 10 && break
12066  done
12067  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12068esac
12069
12070      $ac_path_FGREP_found && break 3
12071    done
12072  done
12073  done
12074IFS=$as_save_IFS
12075  if test -z "$ac_cv_path_FGREP"; then
12076    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12077  fi
12078else
12079  ac_cv_path_FGREP=$FGREP
12080fi
12081
12082   fi
12083fi
12084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12085$as_echo "$ac_cv_path_FGREP" >&6; }
12086 FGREP="$ac_cv_path_FGREP"
12087
12088
12089  else
12090    # The variable is set, but is it from the command line or the environment?
12091
12092    # Try to remove the string !FGREP! from our list.
12093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12095      # If it failed, the variable was not from the command line. Ignore it,
12096      # but warn the user (except for BASH, which is always set by the calling BASH).
12097      if test "xFGREP" != xBASH; then
12098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12099$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12100      fi
12101      # Try to locate tool using the code snippet
12102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12103$as_echo_n "checking for fgrep... " >&6; }
12104if ${ac_cv_path_FGREP+:} false; then :
12105  $as_echo_n "(cached) " >&6
12106else
12107  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12108   then ac_cv_path_FGREP="$GREP -F"
12109   else
12110     if test -z "$FGREP"; then
12111  ac_path_FGREP_found=false
12112  # Loop through the user's path and test for each of PROGNAME-LIST
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_prog in fgrep; do
12119    for ac_exec_ext in '' $ac_executable_extensions; do
12120      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12121      as_fn_executable_p "$ac_path_FGREP" || continue
12122# Check for GNU ac_path_FGREP and select it if it is found.
12123  # Check for GNU $ac_path_FGREP
12124case `"$ac_path_FGREP" --version 2>&1` in
12125*GNU*)
12126  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12127*)
12128  ac_count=0
12129  $as_echo_n 0123456789 >"conftest.in"
12130  while :
12131  do
12132    cat "conftest.in" "conftest.in" >"conftest.tmp"
12133    mv "conftest.tmp" "conftest.in"
12134    cp "conftest.in" "conftest.nl"
12135    $as_echo 'FGREP' >> "conftest.nl"
12136    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12137    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12138    as_fn_arith $ac_count + 1 && ac_count=$as_val
12139    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12140      # Best one so far, save it but keep looking for a better one
12141      ac_cv_path_FGREP="$ac_path_FGREP"
12142      ac_path_FGREP_max=$ac_count
12143    fi
12144    # 10*(2^10) chars as input seems more than enough
12145    test $ac_count -gt 10 && break
12146  done
12147  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12148esac
12149
12150      $ac_path_FGREP_found && break 3
12151    done
12152  done
12153  done
12154IFS=$as_save_IFS
12155  if test -z "$ac_cv_path_FGREP"; then
12156    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12157  fi
12158else
12159  ac_cv_path_FGREP=$FGREP
12160fi
12161
12162   fi
12163fi
12164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12165$as_echo "$ac_cv_path_FGREP" >&6; }
12166 FGREP="$ac_cv_path_FGREP"
12167
12168
12169    else
12170      # If it succeeded, then it was overridden by the user. We will use it
12171      # for the tool.
12172
12173      # First remove it from the list of overridden variables, so we can test
12174      # for unknown variables in the end.
12175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12176
12177      # Check if the provided tool contains a complete path.
12178      tool_specified="$FGREP"
12179      tool_basename="${tool_specified##*/}"
12180      if test "x$tool_basename" = "x$tool_specified"; then
12181        # A command without a complete path is provided, search $PATH.
12182        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12183$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12184        # Extract the first word of "$tool_basename", so it can be a program name with args.
12185set dummy $tool_basename; ac_word=$2
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12187$as_echo_n "checking for $ac_word... " >&6; }
12188if ${ac_cv_path_FGREP+:} false; then :
12189  $as_echo_n "(cached) " >&6
12190else
12191  case $FGREP in
12192  [\\/]* | ?:[\\/]*)
12193  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12194  ;;
12195  *)
12196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12197for as_dir in $PATH
12198do
12199  IFS=$as_save_IFS
12200  test -z "$as_dir" && as_dir=.
12201    for ac_exec_ext in '' $ac_executable_extensions; do
12202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12203    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12205    break 2
12206  fi
12207done
12208  done
12209IFS=$as_save_IFS
12210
12211  ;;
12212esac
12213fi
12214FGREP=$ac_cv_path_FGREP
12215if test -n "$FGREP"; then
12216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12217$as_echo "$FGREP" >&6; }
12218else
12219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12220$as_echo "no" >&6; }
12221fi
12222
12223
12224        if test "x$FGREP" = x; then
12225          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12226        fi
12227      else
12228        # Otherwise we believe it is a complete path. Use it as it is.
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12230$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12232$as_echo_n "checking for FGREP... " >&6; }
12233        if test ! -x "$tool_specified"; then
12234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12235$as_echo "not found" >&6; }
12236          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12237        fi
12238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12239$as_echo "$tool_specified" >&6; }
12240      fi
12241    fi
12242  fi
12243
12244
12245  if test "x$FGREP" = x; then
12246    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12247  fi
12248
12249
12250
12251
12252  # Publish this variable in the help.
12253
12254
12255  if test "x$SED" = x; then
12256    # The variable is not set by user, try to locate tool using the code snippet
12257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12258$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12259if ${ac_cv_path_SED+:} false; then :
12260  $as_echo_n "(cached) " >&6
12261else
12262            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12263     for ac_i in 1 2 3 4 5 6 7; do
12264       ac_script="$ac_script$as_nl$ac_script"
12265     done
12266     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12267     { ac_script=; unset ac_script;}
12268     if test -z "$SED"; then
12269  ac_path_SED_found=false
12270  # Loop through the user's path and test for each of PROGNAME-LIST
12271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12272for as_dir in $PATH
12273do
12274  IFS=$as_save_IFS
12275  test -z "$as_dir" && as_dir=.
12276    for ac_prog in sed gsed; do
12277    for ac_exec_ext in '' $ac_executable_extensions; do
12278      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12279      as_fn_executable_p "$ac_path_SED" || continue
12280# Check for GNU ac_path_SED and select it if it is found.
12281  # Check for GNU $ac_path_SED
12282case `"$ac_path_SED" --version 2>&1` in
12283*GNU*)
12284  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12285*)
12286  ac_count=0
12287  $as_echo_n 0123456789 >"conftest.in"
12288  while :
12289  do
12290    cat "conftest.in" "conftest.in" >"conftest.tmp"
12291    mv "conftest.tmp" "conftest.in"
12292    cp "conftest.in" "conftest.nl"
12293    $as_echo '' >> "conftest.nl"
12294    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12295    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12296    as_fn_arith $ac_count + 1 && ac_count=$as_val
12297    if test $ac_count -gt ${ac_path_SED_max-0}; then
12298      # Best one so far, save it but keep looking for a better one
12299      ac_cv_path_SED="$ac_path_SED"
12300      ac_path_SED_max=$ac_count
12301    fi
12302    # 10*(2^10) chars as input seems more than enough
12303    test $ac_count -gt 10 && break
12304  done
12305  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12306esac
12307
12308      $ac_path_SED_found && break 3
12309    done
12310  done
12311  done
12312IFS=$as_save_IFS
12313  if test -z "$ac_cv_path_SED"; then
12314    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12315  fi
12316else
12317  ac_cv_path_SED=$SED
12318fi
12319
12320fi
12321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12322$as_echo "$ac_cv_path_SED" >&6; }
12323 SED="$ac_cv_path_SED"
12324  rm -f conftest.sed
12325
12326  else
12327    # The variable is set, but is it from the command line or the environment?
12328
12329    # Try to remove the string !SED! from our list.
12330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12332      # If it failed, the variable was not from the command line. Ignore it,
12333      # but warn the user (except for BASH, which is always set by the calling BASH).
12334      if test "xSED" != xBASH; then
12335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12336$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12337      fi
12338      # Try to locate tool using the code snippet
12339      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12340$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12341if ${ac_cv_path_SED+:} false; then :
12342  $as_echo_n "(cached) " >&6
12343else
12344            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12345     for ac_i in 1 2 3 4 5 6 7; do
12346       ac_script="$ac_script$as_nl$ac_script"
12347     done
12348     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12349     { ac_script=; unset ac_script;}
12350     if test -z "$SED"; then
12351  ac_path_SED_found=false
12352  # Loop through the user's path and test for each of PROGNAME-LIST
12353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12354for as_dir in $PATH
12355do
12356  IFS=$as_save_IFS
12357  test -z "$as_dir" && as_dir=.
12358    for ac_prog in sed gsed; do
12359    for ac_exec_ext in '' $ac_executable_extensions; do
12360      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12361      as_fn_executable_p "$ac_path_SED" || continue
12362# Check for GNU ac_path_SED and select it if it is found.
12363  # Check for GNU $ac_path_SED
12364case `"$ac_path_SED" --version 2>&1` in
12365*GNU*)
12366  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12367*)
12368  ac_count=0
12369  $as_echo_n 0123456789 >"conftest.in"
12370  while :
12371  do
12372    cat "conftest.in" "conftest.in" >"conftest.tmp"
12373    mv "conftest.tmp" "conftest.in"
12374    cp "conftest.in" "conftest.nl"
12375    $as_echo '' >> "conftest.nl"
12376    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12377    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12378    as_fn_arith $ac_count + 1 && ac_count=$as_val
12379    if test $ac_count -gt ${ac_path_SED_max-0}; then
12380      # Best one so far, save it but keep looking for a better one
12381      ac_cv_path_SED="$ac_path_SED"
12382      ac_path_SED_max=$ac_count
12383    fi
12384    # 10*(2^10) chars as input seems more than enough
12385    test $ac_count -gt 10 && break
12386  done
12387  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12388esac
12389
12390      $ac_path_SED_found && break 3
12391    done
12392  done
12393  done
12394IFS=$as_save_IFS
12395  if test -z "$ac_cv_path_SED"; then
12396    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12397  fi
12398else
12399  ac_cv_path_SED=$SED
12400fi
12401
12402fi
12403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12404$as_echo "$ac_cv_path_SED" >&6; }
12405 SED="$ac_cv_path_SED"
12406  rm -f conftest.sed
12407
12408    else
12409      # If it succeeded, then it was overridden by the user. We will use it
12410      # for the tool.
12411
12412      # First remove it from the list of overridden variables, so we can test
12413      # for unknown variables in the end.
12414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12415
12416      # Check if the provided tool contains a complete path.
12417      tool_specified="$SED"
12418      tool_basename="${tool_specified##*/}"
12419      if test "x$tool_basename" = "x$tool_specified"; then
12420        # A command without a complete path is provided, search $PATH.
12421        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12422$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12423        # Extract the first word of "$tool_basename", so it can be a program name with args.
12424set dummy $tool_basename; ac_word=$2
12425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12426$as_echo_n "checking for $ac_word... " >&6; }
12427if ${ac_cv_path_SED+:} false; then :
12428  $as_echo_n "(cached) " >&6
12429else
12430  case $SED in
12431  [\\/]* | ?:[\\/]*)
12432  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12433  ;;
12434  *)
12435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12436for as_dir in $PATH
12437do
12438  IFS=$as_save_IFS
12439  test -z "$as_dir" && as_dir=.
12440    for ac_exec_ext in '' $ac_executable_extensions; do
12441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12442    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12444    break 2
12445  fi
12446done
12447  done
12448IFS=$as_save_IFS
12449
12450  ;;
12451esac
12452fi
12453SED=$ac_cv_path_SED
12454if test -n "$SED"; then
12455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12456$as_echo "$SED" >&6; }
12457else
12458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
12460fi
12461
12462
12463        if test "x$SED" = x; then
12464          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12465        fi
12466      else
12467        # Otherwise we believe it is a complete path. Use it as it is.
12468        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12469$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12471$as_echo_n "checking for SED... " >&6; }
12472        if test ! -x "$tool_specified"; then
12473          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12474$as_echo "not found" >&6; }
12475          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12476        fi
12477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12478$as_echo "$tool_specified" >&6; }
12479      fi
12480    fi
12481  fi
12482
12483
12484  if test "x$SED" = x; then
12485    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12486  fi
12487
12488
12489
12490  # Always force rm.
12491  RM="$RM -f"
12492
12493  # pwd behaves differently on various platforms and some don't support the -L flag.
12494  # Always use the bash builtin pwd to get uniform behavior.
12495  THEPWDCMD=pwd
12496
12497  # These are not required on all platforms
12498
12499
12500  # Publish this variable in the help.
12501
12502
12503  if test "x$CYGPATH" = x; then
12504    # The variable is not set by user, try to locate tool using the code snippet
12505    for ac_prog in cygpath
12506do
12507  # Extract the first word of "$ac_prog", so it can be a program name with args.
12508set dummy $ac_prog; ac_word=$2
12509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12510$as_echo_n "checking for $ac_word... " >&6; }
12511if ${ac_cv_path_CYGPATH+:} false; then :
12512  $as_echo_n "(cached) " >&6
12513else
12514  case $CYGPATH in
12515  [\\/]* | ?:[\\/]*)
12516  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12517  ;;
12518  *)
12519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12520for as_dir in $PATH
12521do
12522  IFS=$as_save_IFS
12523  test -z "$as_dir" && as_dir=.
12524    for ac_exec_ext in '' $ac_executable_extensions; do
12525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12526    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12528    break 2
12529  fi
12530done
12531  done
12532IFS=$as_save_IFS
12533
12534  ;;
12535esac
12536fi
12537CYGPATH=$ac_cv_path_CYGPATH
12538if test -n "$CYGPATH"; then
12539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12540$as_echo "$CYGPATH" >&6; }
12541else
12542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12543$as_echo "no" >&6; }
12544fi
12545
12546
12547  test -n "$CYGPATH" && break
12548done
12549
12550  else
12551    # The variable is set, but is it from the command line or the environment?
12552
12553    # Try to remove the string !CYGPATH! from our list.
12554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12556      # If it failed, the variable was not from the command line. Ignore it,
12557      # but warn the user (except for BASH, which is always set by the calling BASH).
12558      if test "xCYGPATH" != xBASH; then
12559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12560$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12561      fi
12562      # Try to locate tool using the code snippet
12563      for ac_prog in cygpath
12564do
12565  # Extract the first word of "$ac_prog", so it can be a program name with args.
12566set dummy $ac_prog; ac_word=$2
12567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12568$as_echo_n "checking for $ac_word... " >&6; }
12569if ${ac_cv_path_CYGPATH+:} false; then :
12570  $as_echo_n "(cached) " >&6
12571else
12572  case $CYGPATH in
12573  [\\/]* | ?:[\\/]*)
12574  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12575  ;;
12576  *)
12577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12578for as_dir in $PATH
12579do
12580  IFS=$as_save_IFS
12581  test -z "$as_dir" && as_dir=.
12582    for ac_exec_ext in '' $ac_executable_extensions; do
12583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12584    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12586    break 2
12587  fi
12588done
12589  done
12590IFS=$as_save_IFS
12591
12592  ;;
12593esac
12594fi
12595CYGPATH=$ac_cv_path_CYGPATH
12596if test -n "$CYGPATH"; then
12597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12598$as_echo "$CYGPATH" >&6; }
12599else
12600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601$as_echo "no" >&6; }
12602fi
12603
12604
12605  test -n "$CYGPATH" && break
12606done
12607
12608    else
12609      # If it succeeded, then it was overridden by the user. We will use it
12610      # for the tool.
12611
12612      # First remove it from the list of overridden variables, so we can test
12613      # for unknown variables in the end.
12614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12615
12616      # Check if the provided tool contains a complete path.
12617      tool_specified="$CYGPATH"
12618      tool_basename="${tool_specified##*/}"
12619      if test "x$tool_basename" = "x$tool_specified"; then
12620        # A command without a complete path is provided, search $PATH.
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12622$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12623        # Extract the first word of "$tool_basename", so it can be a program name with args.
12624set dummy $tool_basename; ac_word=$2
12625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12626$as_echo_n "checking for $ac_word... " >&6; }
12627if ${ac_cv_path_CYGPATH+:} false; then :
12628  $as_echo_n "(cached) " >&6
12629else
12630  case $CYGPATH in
12631  [\\/]* | ?:[\\/]*)
12632  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12633  ;;
12634  *)
12635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12636for as_dir in $PATH
12637do
12638  IFS=$as_save_IFS
12639  test -z "$as_dir" && as_dir=.
12640    for ac_exec_ext in '' $ac_executable_extensions; do
12641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12642    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12644    break 2
12645  fi
12646done
12647  done
12648IFS=$as_save_IFS
12649
12650  ;;
12651esac
12652fi
12653CYGPATH=$ac_cv_path_CYGPATH
12654if test -n "$CYGPATH"; then
12655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12656$as_echo "$CYGPATH" >&6; }
12657else
12658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12659$as_echo "no" >&6; }
12660fi
12661
12662
12663        if test "x$CYGPATH" = x; then
12664          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12665        fi
12666      else
12667        # Otherwise we believe it is a complete path. Use it as it is.
12668        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12669$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12671$as_echo_n "checking for CYGPATH... " >&6; }
12672        if test ! -x "$tool_specified"; then
12673          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12674$as_echo "not found" >&6; }
12675          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12676        fi
12677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12678$as_echo "$tool_specified" >&6; }
12679      fi
12680    fi
12681  fi
12682
12683
12684
12685
12686  # Publish this variable in the help.
12687
12688
12689  if test "x$READLINK" = x; then
12690    # The variable is not set by user, try to locate tool using the code snippet
12691    for ac_prog in greadlink readlink
12692do
12693  # Extract the first word of "$ac_prog", so it can be a program name with args.
12694set dummy $ac_prog; ac_word=$2
12695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12696$as_echo_n "checking for $ac_word... " >&6; }
12697if ${ac_cv_path_READLINK+:} false; then :
12698  $as_echo_n "(cached) " >&6
12699else
12700  case $READLINK in
12701  [\\/]* | ?:[\\/]*)
12702  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12703  ;;
12704  *)
12705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12706for as_dir in $PATH
12707do
12708  IFS=$as_save_IFS
12709  test -z "$as_dir" && as_dir=.
12710    for ac_exec_ext in '' $ac_executable_extensions; do
12711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12712    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12714    break 2
12715  fi
12716done
12717  done
12718IFS=$as_save_IFS
12719
12720  ;;
12721esac
12722fi
12723READLINK=$ac_cv_path_READLINK
12724if test -n "$READLINK"; then
12725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12726$as_echo "$READLINK" >&6; }
12727else
12728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12729$as_echo "no" >&6; }
12730fi
12731
12732
12733  test -n "$READLINK" && break
12734done
12735
12736  else
12737    # The variable is set, but is it from the command line or the environment?
12738
12739    # Try to remove the string !READLINK! from our list.
12740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12742      # If it failed, the variable was not from the command line. Ignore it,
12743      # but warn the user (except for BASH, which is always set by the calling BASH).
12744      if test "xREADLINK" != xBASH; then
12745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12746$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12747      fi
12748      # Try to locate tool using the code snippet
12749      for ac_prog in greadlink readlink
12750do
12751  # Extract the first word of "$ac_prog", so it can be a program name with args.
12752set dummy $ac_prog; ac_word=$2
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12754$as_echo_n "checking for $ac_word... " >&6; }
12755if ${ac_cv_path_READLINK+:} false; then :
12756  $as_echo_n "(cached) " >&6
12757else
12758  case $READLINK in
12759  [\\/]* | ?:[\\/]*)
12760  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12761  ;;
12762  *)
12763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12764for as_dir in $PATH
12765do
12766  IFS=$as_save_IFS
12767  test -z "$as_dir" && as_dir=.
12768    for ac_exec_ext in '' $ac_executable_extensions; do
12769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12770    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12772    break 2
12773  fi
12774done
12775  done
12776IFS=$as_save_IFS
12777
12778  ;;
12779esac
12780fi
12781READLINK=$ac_cv_path_READLINK
12782if test -n "$READLINK"; then
12783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12784$as_echo "$READLINK" >&6; }
12785else
12786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12787$as_echo "no" >&6; }
12788fi
12789
12790
12791  test -n "$READLINK" && break
12792done
12793
12794    else
12795      # If it succeeded, then it was overridden by the user. We will use it
12796      # for the tool.
12797
12798      # First remove it from the list of overridden variables, so we can test
12799      # for unknown variables in the end.
12800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12801
12802      # Check if the provided tool contains a complete path.
12803      tool_specified="$READLINK"
12804      tool_basename="${tool_specified##*/}"
12805      if test "x$tool_basename" = "x$tool_specified"; then
12806        # A command without a complete path is provided, search $PATH.
12807        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12808$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12809        # Extract the first word of "$tool_basename", so it can be a program name with args.
12810set dummy $tool_basename; ac_word=$2
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12812$as_echo_n "checking for $ac_word... " >&6; }
12813if ${ac_cv_path_READLINK+:} false; then :
12814  $as_echo_n "(cached) " >&6
12815else
12816  case $READLINK in
12817  [\\/]* | ?:[\\/]*)
12818  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12819  ;;
12820  *)
12821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822for as_dir in $PATH
12823do
12824  IFS=$as_save_IFS
12825  test -z "$as_dir" && as_dir=.
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12830    break 2
12831  fi
12832done
12833  done
12834IFS=$as_save_IFS
12835
12836  ;;
12837esac
12838fi
12839READLINK=$ac_cv_path_READLINK
12840if test -n "$READLINK"; then
12841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12842$as_echo "$READLINK" >&6; }
12843else
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12845$as_echo "no" >&6; }
12846fi
12847
12848
12849        if test "x$READLINK" = x; then
12850          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12851        fi
12852      else
12853        # Otherwise we believe it is a complete path. Use it as it is.
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12855$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12857$as_echo_n "checking for READLINK... " >&6; }
12858        if test ! -x "$tool_specified"; then
12859          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12860$as_echo "not found" >&6; }
12861          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12862        fi
12863        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12864$as_echo "$tool_specified" >&6; }
12865      fi
12866    fi
12867  fi
12868
12869
12870
12871
12872  # Publish this variable in the help.
12873
12874
12875  if test "x$DF" = x; then
12876    # The variable is not set by user, try to locate tool using the code snippet
12877    for ac_prog in df
12878do
12879  # Extract the first word of "$ac_prog", so it can be a program name with args.
12880set dummy $ac_prog; ac_word=$2
12881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12882$as_echo_n "checking for $ac_word... " >&6; }
12883if ${ac_cv_path_DF+:} false; then :
12884  $as_echo_n "(cached) " >&6
12885else
12886  case $DF in
12887  [\\/]* | ?:[\\/]*)
12888  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12889  ;;
12890  *)
12891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12892for as_dir in $PATH
12893do
12894  IFS=$as_save_IFS
12895  test -z "$as_dir" && as_dir=.
12896    for ac_exec_ext in '' $ac_executable_extensions; do
12897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12898    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12900    break 2
12901  fi
12902done
12903  done
12904IFS=$as_save_IFS
12905
12906  ;;
12907esac
12908fi
12909DF=$ac_cv_path_DF
12910if test -n "$DF"; then
12911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12912$as_echo "$DF" >&6; }
12913else
12914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12915$as_echo "no" >&6; }
12916fi
12917
12918
12919  test -n "$DF" && break
12920done
12921
12922  else
12923    # The variable is set, but is it from the command line or the environment?
12924
12925    # Try to remove the string !DF! from our list.
12926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12928      # If it failed, the variable was not from the command line. Ignore it,
12929      # but warn the user (except for BASH, which is always set by the calling BASH).
12930      if test "xDF" != xBASH; then
12931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12932$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12933      fi
12934      # Try to locate tool using the code snippet
12935      for ac_prog in df
12936do
12937  # Extract the first word of "$ac_prog", so it can be a program name with args.
12938set dummy $ac_prog; ac_word=$2
12939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12940$as_echo_n "checking for $ac_word... " >&6; }
12941if ${ac_cv_path_DF+:} false; then :
12942  $as_echo_n "(cached) " >&6
12943else
12944  case $DF in
12945  [\\/]* | ?:[\\/]*)
12946  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12947  ;;
12948  *)
12949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12950for as_dir in $PATH
12951do
12952  IFS=$as_save_IFS
12953  test -z "$as_dir" && as_dir=.
12954    for ac_exec_ext in '' $ac_executable_extensions; do
12955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12956    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12958    break 2
12959  fi
12960done
12961  done
12962IFS=$as_save_IFS
12963
12964  ;;
12965esac
12966fi
12967DF=$ac_cv_path_DF
12968if test -n "$DF"; then
12969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12970$as_echo "$DF" >&6; }
12971else
12972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12973$as_echo "no" >&6; }
12974fi
12975
12976
12977  test -n "$DF" && break
12978done
12979
12980    else
12981      # If it succeeded, then it was overridden by the user. We will use it
12982      # for the tool.
12983
12984      # First remove it from the list of overridden variables, so we can test
12985      # for unknown variables in the end.
12986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12987
12988      # Check if the provided tool contains a complete path.
12989      tool_specified="$DF"
12990      tool_basename="${tool_specified##*/}"
12991      if test "x$tool_basename" = "x$tool_specified"; then
12992        # A command without a complete path is provided, search $PATH.
12993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12994$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12995        # Extract the first word of "$tool_basename", so it can be a program name with args.
12996set dummy $tool_basename; ac_word=$2
12997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12998$as_echo_n "checking for $ac_word... " >&6; }
12999if ${ac_cv_path_DF+:} false; then :
13000  $as_echo_n "(cached) " >&6
13001else
13002  case $DF in
13003  [\\/]* | ?:[\\/]*)
13004  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13005  ;;
13006  *)
13007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13008for as_dir in $PATH
13009do
13010  IFS=$as_save_IFS
13011  test -z "$as_dir" && as_dir=.
13012    for ac_exec_ext in '' $ac_executable_extensions; do
13013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13014    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13016    break 2
13017  fi
13018done
13019  done
13020IFS=$as_save_IFS
13021
13022  ;;
13023esac
13024fi
13025DF=$ac_cv_path_DF
13026if test -n "$DF"; then
13027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13028$as_echo "$DF" >&6; }
13029else
13030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13031$as_echo "no" >&6; }
13032fi
13033
13034
13035        if test "x$DF" = x; then
13036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13037        fi
13038      else
13039        # Otherwise we believe it is a complete path. Use it as it is.
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13041$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13043$as_echo_n "checking for DF... " >&6; }
13044        if test ! -x "$tool_specified"; then
13045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13046$as_echo "not found" >&6; }
13047          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13048        fi
13049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13050$as_echo "$tool_specified" >&6; }
13051      fi
13052    fi
13053  fi
13054
13055
13056
13057
13058  # Publish this variable in the help.
13059
13060
13061  if test "x$CPIO" = x; then
13062    # The variable is not set by user, try to locate tool using the code snippet
13063    for ac_prog in cpio bsdcpio
13064do
13065  # Extract the first word of "$ac_prog", so it can be a program name with args.
13066set dummy $ac_prog; ac_word=$2
13067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13068$as_echo_n "checking for $ac_word... " >&6; }
13069if ${ac_cv_path_CPIO+:} false; then :
13070  $as_echo_n "(cached) " >&6
13071else
13072  case $CPIO in
13073  [\\/]* | ?:[\\/]*)
13074  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13075  ;;
13076  *)
13077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13078for as_dir in $PATH
13079do
13080  IFS=$as_save_IFS
13081  test -z "$as_dir" && as_dir=.
13082    for ac_exec_ext in '' $ac_executable_extensions; do
13083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13084    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13086    break 2
13087  fi
13088done
13089  done
13090IFS=$as_save_IFS
13091
13092  ;;
13093esac
13094fi
13095CPIO=$ac_cv_path_CPIO
13096if test -n "$CPIO"; then
13097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13098$as_echo "$CPIO" >&6; }
13099else
13100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13101$as_echo "no" >&6; }
13102fi
13103
13104
13105  test -n "$CPIO" && break
13106done
13107
13108  else
13109    # The variable is set, but is it from the command line or the environment?
13110
13111    # Try to remove the string !CPIO! from our list.
13112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13114      # If it failed, the variable was not from the command line. Ignore it,
13115      # but warn the user (except for BASH, which is always set by the calling BASH).
13116      if test "xCPIO" != xBASH; then
13117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13118$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13119      fi
13120      # Try to locate tool using the code snippet
13121      for ac_prog in cpio bsdcpio
13122do
13123  # Extract the first word of "$ac_prog", so it can be a program name with args.
13124set dummy $ac_prog; ac_word=$2
13125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13126$as_echo_n "checking for $ac_word... " >&6; }
13127if ${ac_cv_path_CPIO+:} false; then :
13128  $as_echo_n "(cached) " >&6
13129else
13130  case $CPIO in
13131  [\\/]* | ?:[\\/]*)
13132  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13133  ;;
13134  *)
13135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13136for as_dir in $PATH
13137do
13138  IFS=$as_save_IFS
13139  test -z "$as_dir" && as_dir=.
13140    for ac_exec_ext in '' $ac_executable_extensions; do
13141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13142    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13144    break 2
13145  fi
13146done
13147  done
13148IFS=$as_save_IFS
13149
13150  ;;
13151esac
13152fi
13153CPIO=$ac_cv_path_CPIO
13154if test -n "$CPIO"; then
13155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13156$as_echo "$CPIO" >&6; }
13157else
13158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13159$as_echo "no" >&6; }
13160fi
13161
13162
13163  test -n "$CPIO" && break
13164done
13165
13166    else
13167      # If it succeeded, then it was overridden by the user. We will use it
13168      # for the tool.
13169
13170      # First remove it from the list of overridden variables, so we can test
13171      # for unknown variables in the end.
13172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13173
13174      # Check if the provided tool contains a complete path.
13175      tool_specified="$CPIO"
13176      tool_basename="${tool_specified##*/}"
13177      if test "x$tool_basename" = "x$tool_specified"; then
13178        # A command without a complete path is provided, search $PATH.
13179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13180$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13181        # Extract the first word of "$tool_basename", so it can be a program name with args.
13182set dummy $tool_basename; ac_word=$2
13183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13184$as_echo_n "checking for $ac_word... " >&6; }
13185if ${ac_cv_path_CPIO+:} false; then :
13186  $as_echo_n "(cached) " >&6
13187else
13188  case $CPIO in
13189  [\\/]* | ?:[\\/]*)
13190  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13191  ;;
13192  *)
13193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13194for as_dir in $PATH
13195do
13196  IFS=$as_save_IFS
13197  test -z "$as_dir" && as_dir=.
13198    for ac_exec_ext in '' $ac_executable_extensions; do
13199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13200    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13202    break 2
13203  fi
13204done
13205  done
13206IFS=$as_save_IFS
13207
13208  ;;
13209esac
13210fi
13211CPIO=$ac_cv_path_CPIO
13212if test -n "$CPIO"; then
13213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13214$as_echo "$CPIO" >&6; }
13215else
13216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13217$as_echo "no" >&6; }
13218fi
13219
13220
13221        if test "x$CPIO" = x; then
13222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13223        fi
13224      else
13225        # Otherwise we believe it is a complete path. Use it as it is.
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13227$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13229$as_echo_n "checking for CPIO... " >&6; }
13230        if test ! -x "$tool_specified"; then
13231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13232$as_echo "not found" >&6; }
13233          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13234        fi
13235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13236$as_echo "$tool_specified" >&6; }
13237      fi
13238    fi
13239  fi
13240
13241
13242
13243
13244# Now we can determine OpenJDK build and target platforms. This is required to
13245# have early on.
13246# Make sure we can run config.sub.
13247$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13248  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13249
13250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13251$as_echo_n "checking build system type... " >&6; }
13252if ${ac_cv_build+:} false; then :
13253  $as_echo_n "(cached) " >&6
13254else
13255  ac_build_alias=$build_alias
13256test "x$ac_build_alias" = x &&
13257  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13258test "x$ac_build_alias" = x &&
13259  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13260ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13261  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13262
13263fi
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13265$as_echo "$ac_cv_build" >&6; }
13266case $ac_cv_build in
13267*-*-*) ;;
13268*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13269esac
13270build=$ac_cv_build
13271ac_save_IFS=$IFS; IFS='-'
13272set x $ac_cv_build
13273shift
13274build_cpu=$1
13275build_vendor=$2
13276shift; shift
13277# Remember, the first character of IFS is used to create $*,
13278# except with old shells:
13279build_os=$*
13280IFS=$ac_save_IFS
13281case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13282
13283
13284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13285$as_echo_n "checking host system type... " >&6; }
13286if ${ac_cv_host+:} false; then :
13287  $as_echo_n "(cached) " >&6
13288else
13289  if test "x$host_alias" = x; then
13290  ac_cv_host=$ac_cv_build
13291else
13292  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13293    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13294fi
13295
13296fi
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13298$as_echo "$ac_cv_host" >&6; }
13299case $ac_cv_host in
13300*-*-*) ;;
13301*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13302esac
13303host=$ac_cv_host
13304ac_save_IFS=$IFS; IFS='-'
13305set x $ac_cv_host
13306shift
13307host_cpu=$1
13308host_vendor=$2
13309shift; shift
13310# Remember, the first character of IFS is used to create $*,
13311# except with old shells:
13312host_os=$*
13313IFS=$ac_save_IFS
13314case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13315
13316
13317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13318$as_echo_n "checking target system type... " >&6; }
13319if ${ac_cv_target+:} false; then :
13320  $as_echo_n "(cached) " >&6
13321else
13322  if test "x$target_alias" = x; then
13323  ac_cv_target=$ac_cv_host
13324else
13325  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13326    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13327fi
13328
13329fi
13330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13331$as_echo "$ac_cv_target" >&6; }
13332case $ac_cv_target in
13333*-*-*) ;;
13334*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13335esac
13336target=$ac_cv_target
13337ac_save_IFS=$IFS; IFS='-'
13338set x $ac_cv_target
13339shift
13340target_cpu=$1
13341target_vendor=$2
13342shift; shift
13343# Remember, the first character of IFS is used to create $*,
13344# except with old shells:
13345target_os=$*
13346IFS=$ac_save_IFS
13347case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13348
13349
13350# The aliases save the names the user supplied, while $host etc.
13351# will get canonicalized.
13352test -n "$target_alias" &&
13353  test "$program_prefix$program_suffix$program_transform_name" = \
13354    NONENONEs,x,x, &&
13355  program_prefix=${target_alias}-
13356
13357  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13358  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13359  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13360  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13361  # to use the configure naming style.
13362
13363
13364
13365
13366
13367  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13368  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13369  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13370  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13371  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13372  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13373
13374
13375
13376  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13377
13378  case "$build_os" in
13379    *linux*)
13380      VAR_OS=linux
13381      VAR_OS_TYPE=unix
13382      ;;
13383    *solaris*)
13384      VAR_OS=solaris
13385      VAR_OS_TYPE=unix
13386      ;;
13387    *darwin*)
13388      VAR_OS=macosx
13389      VAR_OS_TYPE=unix
13390      ;;
13391    *bsd*)
13392      VAR_OS=bsd
13393      VAR_OS_TYPE=unix
13394      ;;
13395    *cygwin*)
13396      VAR_OS=windows
13397      VAR_OS_ENV=windows.cygwin
13398      ;;
13399    *mingw*)
13400      VAR_OS=windows
13401      VAR_OS_ENV=windows.msys
13402      ;;
13403    *aix*)
13404      VAR_OS=aix
13405      VAR_OS_TYPE=unix
13406      ;;
13407    *)
13408      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13409      ;;
13410  esac
13411
13412
13413  # First argument is the cpu name from the trip/quad
13414  case "$build_cpu" in
13415    x86_64)
13416      VAR_CPU=x86_64
13417      VAR_CPU_ARCH=x86
13418      VAR_CPU_BITS=64
13419      VAR_CPU_ENDIAN=little
13420      ;;
13421    i?86)
13422      VAR_CPU=x86
13423      VAR_CPU_ARCH=x86
13424      VAR_CPU_BITS=32
13425      VAR_CPU_ENDIAN=little
13426      ;;
13427    arm*)
13428      VAR_CPU=arm
13429      VAR_CPU_ARCH=arm
13430      VAR_CPU_BITS=32
13431      VAR_CPU_ENDIAN=little
13432      ;;
13433    aarch64)
13434      VAR_CPU=aarch64
13435      VAR_CPU_ARCH=aarch64
13436      VAR_CPU_BITS=64
13437      VAR_CPU_ENDIAN=little
13438      ;;
13439    powerpc)
13440      VAR_CPU=ppc
13441      VAR_CPU_ARCH=ppc
13442      VAR_CPU_BITS=32
13443      VAR_CPU_ENDIAN=big
13444      ;;
13445    powerpc64)
13446      VAR_CPU=ppc64
13447      VAR_CPU_ARCH=ppc
13448      VAR_CPU_BITS=64
13449      VAR_CPU_ENDIAN=big
13450      ;;
13451    powerpc64le)
13452      VAR_CPU=ppc64
13453      VAR_CPU_ARCH=ppc
13454      VAR_CPU_BITS=64
13455      VAR_CPU_ENDIAN=little
13456      ;;
13457    s390)
13458      VAR_CPU=s390
13459      VAR_CPU_ARCH=s390
13460      VAR_CPU_BITS=32
13461      VAR_CPU_ENDIAN=big
13462      ;;
13463    s390x)
13464      VAR_CPU=s390x
13465      VAR_CPU_ARCH=s390
13466      VAR_CPU_BITS=64
13467      VAR_CPU_ENDIAN=big
13468      ;;
13469    sparc)
13470      VAR_CPU=sparc
13471      VAR_CPU_ARCH=sparc
13472      VAR_CPU_BITS=32
13473      VAR_CPU_ENDIAN=big
13474      ;;
13475    sparcv9|sparc64)
13476      VAR_CPU=sparcv9
13477      VAR_CPU_ARCH=sparc
13478      VAR_CPU_BITS=64
13479      VAR_CPU_ENDIAN=big
13480      ;;
13481    *)
13482      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13483      ;;
13484  esac
13485
13486  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13487  OPENJDK_BUILD_OS="$VAR_OS"
13488  if test "x$VAR_OS_TYPE" != x; then
13489    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13490  else
13491    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13492  fi
13493  if test "x$VAR_OS_ENV" != x; then
13494    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13495  else
13496    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13497  fi
13498  OPENJDK_BUILD_CPU="$VAR_CPU"
13499  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13500  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13501  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13502
13503
13504
13505
13506
13507
13508
13509
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13511$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13513$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13514
13515  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13516
13517  case "$host_os" in
13518    *linux*)
13519      VAR_OS=linux
13520      VAR_OS_TYPE=unix
13521      ;;
13522    *solaris*)
13523      VAR_OS=solaris
13524      VAR_OS_TYPE=unix
13525      ;;
13526    *darwin*)
13527      VAR_OS=macosx
13528      VAR_OS_TYPE=unix
13529      ;;
13530    *bsd*)
13531      VAR_OS=bsd
13532      VAR_OS_TYPE=unix
13533      ;;
13534    *cygwin*)
13535      VAR_OS=windows
13536      VAR_OS_ENV=windows.cygwin
13537      ;;
13538    *mingw*)
13539      VAR_OS=windows
13540      VAR_OS_ENV=windows.msys
13541      ;;
13542    *aix*)
13543      VAR_OS=aix
13544      VAR_OS_TYPE=unix
13545      ;;
13546    *)
13547      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13548      ;;
13549  esac
13550
13551
13552  # First argument is the cpu name from the trip/quad
13553  case "$host_cpu" in
13554    x86_64)
13555      VAR_CPU=x86_64
13556      VAR_CPU_ARCH=x86
13557      VAR_CPU_BITS=64
13558      VAR_CPU_ENDIAN=little
13559      ;;
13560    i?86)
13561      VAR_CPU=x86
13562      VAR_CPU_ARCH=x86
13563      VAR_CPU_BITS=32
13564      VAR_CPU_ENDIAN=little
13565      ;;
13566    arm*)
13567      VAR_CPU=arm
13568      VAR_CPU_ARCH=arm
13569      VAR_CPU_BITS=32
13570      VAR_CPU_ENDIAN=little
13571      ;;
13572    aarch64)
13573      VAR_CPU=aarch64
13574      VAR_CPU_ARCH=aarch64
13575      VAR_CPU_BITS=64
13576      VAR_CPU_ENDIAN=little
13577      ;;
13578    powerpc)
13579      VAR_CPU=ppc
13580      VAR_CPU_ARCH=ppc
13581      VAR_CPU_BITS=32
13582      VAR_CPU_ENDIAN=big
13583      ;;
13584    powerpc64)
13585      VAR_CPU=ppc64
13586      VAR_CPU_ARCH=ppc
13587      VAR_CPU_BITS=64
13588      VAR_CPU_ENDIAN=big
13589      ;;
13590    powerpc64le)
13591      VAR_CPU=ppc64
13592      VAR_CPU_ARCH=ppc
13593      VAR_CPU_BITS=64
13594      VAR_CPU_ENDIAN=little
13595      ;;
13596    s390)
13597      VAR_CPU=s390
13598      VAR_CPU_ARCH=s390
13599      VAR_CPU_BITS=32
13600      VAR_CPU_ENDIAN=big
13601      ;;
13602    s390x)
13603      VAR_CPU=s390x
13604      VAR_CPU_ARCH=s390
13605      VAR_CPU_BITS=64
13606      VAR_CPU_ENDIAN=big
13607      ;;
13608    sparc)
13609      VAR_CPU=sparc
13610      VAR_CPU_ARCH=sparc
13611      VAR_CPU_BITS=32
13612      VAR_CPU_ENDIAN=big
13613      ;;
13614    sparcv9|sparc64)
13615      VAR_CPU=sparcv9
13616      VAR_CPU_ARCH=sparc
13617      VAR_CPU_BITS=64
13618      VAR_CPU_ENDIAN=big
13619      ;;
13620    *)
13621      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13622      ;;
13623  esac
13624
13625  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13626  OPENJDK_TARGET_OS="$VAR_OS"
13627  if test "x$VAR_OS_TYPE" != x; then
13628    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13629  else
13630    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13631  fi
13632  if test "x$VAR_OS_ENV" != x; then
13633    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13634  else
13635    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13636  fi
13637  OPENJDK_TARGET_CPU="$VAR_CPU"
13638  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13639  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13640  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13641
13642
13643
13644
13645
13646
13647
13648
13649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13650$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13652$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13653
13654
13655
13656# Check whether --with-target-bits was given.
13657if test "${with_target_bits+set}" = set; then :
13658  withval=$with_target_bits;
13659fi
13660
13661
13662  # We have three types of compiles:
13663  # native  == normal compilation, target system == build system
13664  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13665  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13666  #
13667  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13668    # We're doing a proper cross-compilation
13669    COMPILE_TYPE="cross"
13670  else
13671    COMPILE_TYPE="native"
13672  fi
13673
13674  if test "x$with_target_bits" != x; then
13675    if test "x$COMPILE_TYPE" = "xcross"; then
13676      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13677    fi
13678
13679    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13680      # A reduced build is requested
13681      COMPILE_TYPE="reduced"
13682      OPENJDK_TARGET_CPU_BITS=32
13683      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13684        OPENJDK_TARGET_CPU=x86
13685      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13686        OPENJDK_TARGET_CPU=sparc
13687      else
13688        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13689      fi
13690    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13691      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
13692    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13693      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13694$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13695    else
13696      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13697    fi
13698  fi
13699
13700
13701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13702$as_echo_n "checking compilation type... " >&6; }
13703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13704$as_echo "$COMPILE_TYPE" >&6; }
13705
13706
13707  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13708    REQUIRED_OS_NAME=SunOS
13709    REQUIRED_OS_VERSION=5.10
13710  fi
13711  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13712    REQUIRED_OS_NAME=Linux
13713    REQUIRED_OS_VERSION=2.6
13714  fi
13715  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13716    REQUIRED_OS_NAME=Windows
13717    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13718      REQUIRED_OS_VERSION=5.2
13719    else
13720      REQUIRED_OS_VERSION=5.1
13721    fi
13722  fi
13723  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13724    REQUIRED_OS_NAME=Darwin
13725    REQUIRED_OS_VERSION=11.2
13726  fi
13727
13728
13729
13730
13731
13732  # Also store the legacy naming of the cpu.
13733  # Ie i586 and amd64 instead of x86 and x86_64
13734  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13735  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13736    OPENJDK_TARGET_CPU_LEGACY="i586"
13737  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13738    # On all platforms except MacOSX replace x86_64 with amd64.
13739    OPENJDK_TARGET_CPU_LEGACY="amd64"
13740  fi
13741
13742
13743  # And the second legacy naming of the cpu.
13744  # Ie i386 and amd64 instead of x86 and x86_64.
13745  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13746  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13747    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13748  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13749    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13750  fi
13751
13752
13753  # This is the name of the cpu (but using i386 and amd64 instead of
13754  # x86 and x86_64, respectively), preceeded by a /, to be used when
13755  # locating libraries. On macosx, it's empty, though.
13756  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13757  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13758    OPENJDK_TARGET_CPU_LIBDIR=""
13759  fi
13760
13761
13762  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13763  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13764  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13765  OPENJDK_TARGET_CPU_ISADIR=""
13766  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13767    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13768      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13769    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13770      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13771    fi
13772  fi
13773
13774
13775  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13776  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13777  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13778    # On linux only, we replace x86 with i386.
13779    OPENJDK_TARGET_CPU_OSARCH="i386"
13780  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13781    # On all platforms except macosx, we replace x86_64 with amd64.
13782    OPENJDK_TARGET_CPU_OSARCH="amd64"
13783  fi
13784
13785
13786  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13787  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13788    OPENJDK_TARGET_CPU_JLI="i386"
13789  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13790    # On all platforms except macosx, we replace x86_64 with amd64.
13791    OPENJDK_TARGET_CPU_JLI="amd64"
13792  fi
13793  # Now setup the -D flags for building libjli.
13794  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13795  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13796    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13797      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13798    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13799      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13800    fi
13801  fi
13802
13803
13804  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13805      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13806  else
13807      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13808  fi
13809
13810
13811  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13812    A_LP64="LP64:="
13813    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13814    # unpack200.exe
13815    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13816      ADD_LP64="-D_LP64=1"
13817    fi
13818  fi
13819  LP64=$A_LP64
13820
13821
13822  if test "x$COMPILE_TYPE" = "xcross"; then
13823    # FIXME: ... or should this include reduced builds..?
13824    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13825  else
13826    DEFINE_CROSS_COMPILE_ARCH=""
13827  fi
13828
13829
13830  # ZERO_ARCHDEF is used to enable architecture-specific code
13831  case "${OPENJDK_TARGET_CPU}" in
13832    ppc)     ZERO_ARCHDEF=PPC32 ;;
13833    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13834    s390*)   ZERO_ARCHDEF=S390  ;;
13835    sparc*)  ZERO_ARCHDEF=SPARC ;;
13836    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13837    x86)     ZERO_ARCHDEF=IA32  ;;
13838    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13839  esac
13840
13841
13842
13843
13844# Continue setting up basic stuff. Most remaining code require fundamental tools.
13845
13846  # Save the current directory this script was started from
13847  CURDIR="$PWD"
13848
13849  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13850    PATH_SEP=";"
13851
13852  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13853  if test $SRC_ROOT_LENGTH -gt 100; then
13854    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13855  fi
13856
13857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13859$as_echo_n "checking cygwin release... " >&6; }
13860    CYGWIN_VERSION=`$UNAME -r`
13861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13862$as_echo "$CYGWIN_VERSION" >&6; }
13863    WINDOWS_ENV_VENDOR='cygwin'
13864    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13865
13866    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13867    if test "x$CYGWIN_VERSION_OLD" != x; then
13868      { $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
13869$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;}
13870      as_fn_error $? "Cannot continue" "$LINENO" 5
13871    fi
13872    if test "x$CYGPATH" = x; then
13873      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13874    fi
13875    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13876$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13877    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13878    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13879    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13880    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13882$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13883    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13884    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13885    if test "x$test_cygdrive_prefix" = x; then
13886      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13887    fi
13888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13890$as_echo_n "checking msys release... " >&6; }
13891    MSYS_VERSION=`$UNAME -r`
13892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13893$as_echo "$MSYS_VERSION" >&6; }
13894
13895    WINDOWS_ENV_VENDOR='msys'
13896    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13897
13898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13899$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13900    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13901    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13902
13903  windows_path="$MSYS_ROOT_PATH"
13904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13905    unix_path=`$CYGPATH -u "$windows_path"`
13906    MSYS_ROOT_PATH="$unix_path"
13907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13909    MSYS_ROOT_PATH="$unix_path"
13910  fi
13911
13912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13913$as_echo "$MSYS_ROOT_PATH" >&6; }
13914    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13915  else
13916    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13917  fi
13918
13919  # Test if windows or unix (cygwin/msys) find is first in path.
13920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13921$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13922  FIND_BINARY_OUTPUT=`find --version 2>&1`
13923  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13925$as_echo "unix style" >&6; }
13926  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13928$as_echo "Windows" >&6; }
13929    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13930$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13931    { $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
13932$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13933    as_fn_error $? "Cannot continue" "$LINENO" 5
13934  else
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13936$as_echo "unknown" >&6; }
13937    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13938$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13939  fi
13940
13941  else
13942    PATH_SEP=":"
13943  fi
13944
13945
13946  # We get the top-level directory from the supporting wrappers.
13947  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13948$as_echo_n "checking for top-level directory... " >&6; }
13949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13950$as_echo "$TOPDIR" >&6; }
13951
13952
13953  # Save the original version of TOPDIR for string comparisons
13954  ORIGINAL_TOPDIR="$TOPDIR"
13955
13956
13957  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13958
13959  # Only process if variable expands to non-empty
13960
13961  if test "x$CURDIR" != x; then
13962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13963
13964  # Input might be given as Windows format, start by converting to
13965  # unix format.
13966  path="$CURDIR"
13967  new_path=`$CYGPATH -u "$path"`
13968
13969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13972  # "foo.exe" is OK but "foo" is an error.
13973  #
13974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13975  # It is also a way to make sure we got the proper file name for the real test later on.
13976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13977  if test "x$test_shortpath" = x; then
13978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13979$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13980    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13981  fi
13982
13983  # Call helper function which possibly converts this using DOS-style short mode.
13984  # If so, the updated path is stored in $new_path.
13985
13986  input_path="$new_path"
13987  # Check if we need to convert this using DOS-style short mode. If the path
13988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13989  # take no chances and rewrite it.
13990  # Note: m4 eats our [], so we need to use [ and ] instead.
13991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13992  if test "x$has_forbidden_chars" != x; then
13993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13997      # Going to short mode and back again did indeed matter. Since short mode is
13998      # case insensitive, let's make it lowercase to improve readability.
13999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14000      # Now convert it back to Unix-style (cygpath)
14001      input_path=`$CYGPATH -u "$shortmode_path"`
14002      new_path="$input_path"
14003    fi
14004  fi
14005
14006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14007  if test "x$test_cygdrive_prefix" = x; then
14008    # As a simple fix, exclude /usr/bin since it's not a real path.
14009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14011      # a path prefixed by /cygdrive for fixpath to work.
14012      new_path="$CYGWIN_ROOT_PATH$input_path"
14013    fi
14014  fi
14015
14016
14017  if test "x$path" != "x$new_path"; then
14018    CURDIR="$new_path"
14019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14020$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14021  fi
14022
14023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14024
14025  path="$CURDIR"
14026  has_colon=`$ECHO $path | $GREP ^.:`
14027  new_path="$path"
14028  if test "x$has_colon" = x; then
14029    # Not in mixed or Windows style, start by that.
14030    new_path=`cmd //c echo $path`
14031  fi
14032
14033
14034  input_path="$new_path"
14035  # Check if we need to convert this using DOS-style short mode. If the path
14036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14037  # take no chances and rewrite it.
14038  # Note: m4 eats our [], so we need to use [ and ] instead.
14039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14040  if test "x$has_forbidden_chars" != x; then
14041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14043  fi
14044
14045
14046  windows_path="$new_path"
14047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14048    unix_path=`$CYGPATH -u "$windows_path"`
14049    new_path="$unix_path"
14050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14052    new_path="$unix_path"
14053  fi
14054
14055  if test "x$path" != "x$new_path"; then
14056    CURDIR="$new_path"
14057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14058$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14059  fi
14060
14061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14063
14064    else
14065      # We're on a unix platform. Hooray! :)
14066      path="$CURDIR"
14067      has_space=`$ECHO "$path" | $GREP " "`
14068      if test "x$has_space" != x; then
14069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14070$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14072      fi
14073
14074      # Use eval to expand a potential ~
14075      eval path="$path"
14076      if test ! -f "$path" && test ! -d "$path"; then
14077        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14078      fi
14079
14080      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14081    fi
14082  fi
14083
14084
14085  # Only process if variable expands to non-empty
14086
14087  if test "x$TOPDIR" != x; then
14088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14089
14090  # Input might be given as Windows format, start by converting to
14091  # unix format.
14092  path="$TOPDIR"
14093  new_path=`$CYGPATH -u "$path"`
14094
14095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14098  # "foo.exe" is OK but "foo" is an error.
14099  #
14100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14101  # It is also a way to make sure we got the proper file name for the real test later on.
14102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14103  if test "x$test_shortpath" = x; then
14104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14105$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14106    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14107  fi
14108
14109  # Call helper function which possibly converts this using DOS-style short mode.
14110  # If so, the updated path is stored in $new_path.
14111
14112  input_path="$new_path"
14113  # Check if we need to convert this using DOS-style short mode. If the path
14114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14115  # take no chances and rewrite it.
14116  # Note: m4 eats our [], so we need to use [ and ] instead.
14117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14118  if test "x$has_forbidden_chars" != x; then
14119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14123      # Going to short mode and back again did indeed matter. Since short mode is
14124      # case insensitive, let's make it lowercase to improve readability.
14125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14126      # Now convert it back to Unix-style (cygpath)
14127      input_path=`$CYGPATH -u "$shortmode_path"`
14128      new_path="$input_path"
14129    fi
14130  fi
14131
14132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14133  if test "x$test_cygdrive_prefix" = x; then
14134    # As a simple fix, exclude /usr/bin since it's not a real path.
14135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14137      # a path prefixed by /cygdrive for fixpath to work.
14138      new_path="$CYGWIN_ROOT_PATH$input_path"
14139    fi
14140  fi
14141
14142
14143  if test "x$path" != "x$new_path"; then
14144    TOPDIR="$new_path"
14145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14146$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14147  fi
14148
14149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14150
14151  path="$TOPDIR"
14152  has_colon=`$ECHO $path | $GREP ^.:`
14153  new_path="$path"
14154  if test "x$has_colon" = x; then
14155    # Not in mixed or Windows style, start by that.
14156    new_path=`cmd //c echo $path`
14157  fi
14158
14159
14160  input_path="$new_path"
14161  # Check if we need to convert this using DOS-style short mode. If the path
14162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14163  # take no chances and rewrite it.
14164  # Note: m4 eats our [], so we need to use [ and ] instead.
14165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14166  if test "x$has_forbidden_chars" != x; then
14167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14169  fi
14170
14171
14172  windows_path="$new_path"
14173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14174    unix_path=`$CYGPATH -u "$windows_path"`
14175    new_path="$unix_path"
14176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14178    new_path="$unix_path"
14179  fi
14180
14181  if test "x$path" != "x$new_path"; then
14182    TOPDIR="$new_path"
14183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14184$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14185  fi
14186
14187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14189
14190    else
14191      # We're on a unix platform. Hooray! :)
14192      path="$TOPDIR"
14193      has_space=`$ECHO "$path" | $GREP " "`
14194      if test "x$has_space" != x; then
14195        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14196$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14197        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14198      fi
14199
14200      # Use eval to expand a potential ~
14201      eval path="$path"
14202      if test ! -f "$path" && test ! -d "$path"; then
14203        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14204      fi
14205
14206      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14207    fi
14208  fi
14209
14210  # SRC_ROOT is a traditional alias for TOPDIR.
14211  SRC_ROOT=$TOPDIR
14212
14213  # Calculate a canonical version of TOPDIR for string comparisons
14214  CANONICAL_TOPDIR=$TOPDIR
14215
14216  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14217    # Follow a chain of symbolic links. Use readlink
14218    # where it exists, else fall back to horribly
14219    # complicated shell code.
14220    if test "x$READLINK_TESTED" != yes; then
14221      # On MacOSX there is a readlink tool with a different
14222      # purpose than the GNU readlink tool. Check the found readlink.
14223      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14224      if test "x$ISGNU" = x; then
14225        # A readlink that we do not know how to use.
14226        # Are there other non-GNU readlinks out there?
14227        READLINK_TESTED=yes
14228        READLINK=
14229      fi
14230    fi
14231
14232    if test "x$READLINK" != x; then
14233      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14234    else
14235      # Save the current directory for restoring afterwards
14236      STARTDIR=$PWD
14237      COUNTER=0
14238      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14239      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14240      cd $sym_link_dir
14241      # Use -P flag to resolve symlinks in directories.
14242      cd `$THEPWDCMD -P`
14243      sym_link_dir=`$THEPWDCMD -P`
14244      # Resolve file symlinks
14245      while test $COUNTER -lt 20; do
14246        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14247        if test "x$ISLINK" == x; then
14248          # This is not a symbolic link! We are done!
14249          break
14250        fi
14251        # Again resolve directory symlinks since the target of the just found
14252        # link could be in a different directory
14253        cd `$DIRNAME $ISLINK`
14254        sym_link_dir=`$THEPWDCMD -P`
14255        sym_link_file=`$BASENAME $ISLINK`
14256        let COUNTER=COUNTER+1
14257      done
14258      cd $STARTDIR
14259      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14260    fi
14261  fi
14262
14263
14264
14265  # Locate the directory of this script.
14266  AUTOCONF_DIR=$TOPDIR/common/autoconf
14267
14268
14269# Check if it's a pure open build or if custom sources are to be used.
14270
14271  # Check whether --enable-openjdk-only was given.
14272if test "${enable_openjdk_only+set}" = set; then :
14273  enableval=$enable_openjdk_only;
14274else
14275  enable_openjdk_only="no"
14276fi
14277
14278
14279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14280$as_echo_n "checking for presence of closed sources... " >&6; }
14281  if test -d "$SRC_ROOT/jdk/src/closed"; then
14282    CLOSED_SOURCE_PRESENT=yes
14283  else
14284    CLOSED_SOURCE_PRESENT=no
14285  fi
14286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14287$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14288
14289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14290$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14291  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14293$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14294
14295  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14296    OPENJDK=true
14297    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14298      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14299$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14300    fi
14301  else
14302    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14303      OPENJDK=true
14304    else
14305      OPENJDK=false
14306    fi
14307  fi
14308
14309  if test "x$OPENJDK" = "xtrue"; then
14310    SET_OPENJDK="OPENJDK=true"
14311  fi
14312
14313
14314
14315  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14316  # the IncludeCustomExtension macro.
14317
14318
14319# Check whether --with-custom-make-dir was given.
14320if test "${with_custom_make_dir+set}" = set; then :
14321  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
14322$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14323fi
14324
14325
14326
14327
14328# These are needed to be able to create a configuration name (and thus the output directory)
14329
14330  ###############################################################################
14331  #
14332  # Check which variant of the JDK that we want to build.
14333  # Currently we have:
14334  #    normal:   standard edition
14335  # but the custom make system may add other variants
14336  #
14337  # Effectively the JDK variant gives a name to a specific set of
14338  # modules to compile into the JDK. In the future, these modules
14339  # might even be Jigsaw modules.
14340  #
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14342$as_echo_n "checking which variant of the JDK to build... " >&6; }
14343
14344# Check whether --with-jdk-variant was given.
14345if test "${with_jdk_variant+set}" = set; then :
14346  withval=$with_jdk_variant;
14347fi
14348
14349
14350  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14351    JDK_VARIANT="normal"
14352  else
14353    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14354  fi
14355
14356
14357
14358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14359$as_echo "$JDK_VARIANT" >&6; }
14360
14361
14362###############################################################################
14363#
14364# Check which interpreter of the JVM we want to build.
14365# Currently we have:
14366#    template: Template interpreter (the default)
14367#    cpp     : C++ interpreter
14368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14369$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14370
14371# Check whether --with-jvm-interpreter was given.
14372if test "${with_jvm_interpreter+set}" = set; then :
14373  withval=$with_jvm_interpreter;
14374fi
14375
14376
14377if test "x$with_jvm_interpreter" = x; then
14378     with_jvm_interpreter="template"
14379fi
14380
14381JVM_INTERPRETER="$with_jvm_interpreter"
14382
14383if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14384   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14385fi
14386
14387
14388
14389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14390$as_echo "$with_jvm_interpreter" >&6; }
14391
14392
14393
14394  ###############################################################################
14395  #
14396  # Check which variants of the JVM that we want to build.
14397  # Currently we have:
14398  #    server: normal interpreter and a tiered C1/C2 compiler
14399  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14400  #    minimal1: reduced form of client with optional VM services and features stripped out
14401  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14402  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14403  #    zero: no machine code interpreter, no compiler
14404  #    zeroshark: zero interpreter and shark/llvm compiler backend
14405#    core: interpreter only, no compiler (only works on some platforms)
14406  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14407$as_echo_n "checking which variants of the JVM to build... " >&6; }
14408
14409# Check whether --with-jvm-variants was given.
14410if test "${with_jvm_variants+set}" = set; then :
14411  withval=$with_jvm_variants;
14412fi
14413
14414
14415  if test "x$with_jvm_variants" = x; then
14416    with_jvm_variants="server"
14417  fi
14418
14419  JVM_VARIANTS=",$with_jvm_variants,"
14420  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,//'`
14421
14422  if test "x$TEST_VARIANTS" != "x,"; then
14423     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14424  fi
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14426$as_echo "$with_jvm_variants" >&6; }
14427
14428  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14429  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14430  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14431  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14432  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14433  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14434  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14435
14436  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14437    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14438      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14439    fi
14440  fi
14441  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14442    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14443      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14444    fi
14445  fi
14446  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14447    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14448      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14449    fi
14450  fi
14451
14452  # Replace the commas with AND for use in the build directory name.
14453  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14454  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/'`
14455  if test "x$COUNT_VARIANTS" != "x,1"; then
14456    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14457  else
14458    BUILDING_MULTIPLE_JVM_VARIANTS=no
14459  fi
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470  INCLUDE_SA=true
14471  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14472    INCLUDE_SA=false
14473  fi
14474  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14475    INCLUDE_SA=false
14476  fi
14477  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14478    INCLUDE_SA=false
14479  fi
14480  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14481    INCLUDE_SA=false
14482  fi
14483
14484
14485  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14486    MACOSX_UNIVERSAL="true"
14487  fi
14488
14489
14490
14491
14492  ###############################################################################
14493  #
14494  # Set the debug level
14495  #    release: no debug information, all optimizations, no asserts.
14496  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14497  #    fastdebug: debug information (-g), all optimizations, all asserts
14498  #    slowdebug: debug information (-g), no optimizations, all asserts
14499  #
14500  DEBUG_LEVEL="release"
14501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14502$as_echo_n "checking which debug level to use... " >&6; }
14503  # Check whether --enable-debug was given.
14504if test "${enable_debug+set}" = set; then :
14505  enableval=$enable_debug;
14506        ENABLE_DEBUG="${enableval}"
14507        DEBUG_LEVEL="fastdebug"
14508
14509else
14510  ENABLE_DEBUG="no"
14511fi
14512
14513
14514
14515# Check whether --with-debug-level was given.
14516if test "${with_debug_level+set}" = set; then :
14517  withval=$with_debug_level;
14518        DEBUG_LEVEL="${withval}"
14519        if test "x$ENABLE_DEBUG" = xyes; then
14520          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14521        fi
14522
14523fi
14524
14525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14526$as_echo "$DEBUG_LEVEL" >&6; }
14527
14528  if test "x$DEBUG_LEVEL" != xrelease && \
14529      test "x$DEBUG_LEVEL" != xoptimized && \
14530      test "x$DEBUG_LEVEL" != xfastdebug && \
14531      test "x$DEBUG_LEVEL" != xslowdebug; then
14532    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14533  fi
14534
14535
14536  ###############################################################################
14537  #
14538  # Setup legacy vars/targets and new vars to deal with different debug levels.
14539  #
14540
14541  case $DEBUG_LEVEL in
14542    release )
14543      VARIANT="OPT"
14544      FASTDEBUG="false"
14545      DEBUG_CLASSFILES="false"
14546      BUILD_VARIANT_RELEASE=""
14547      HOTSPOT_DEBUG_LEVEL="product"
14548      HOTSPOT_EXPORT="product"
14549      ;;
14550    fastdebug )
14551      VARIANT="DBG"
14552      FASTDEBUG="true"
14553      DEBUG_CLASSFILES="true"
14554      BUILD_VARIANT_RELEASE="-fastdebug"
14555      HOTSPOT_DEBUG_LEVEL="fastdebug"
14556      HOTSPOT_EXPORT="fastdebug"
14557      ;;
14558    slowdebug )
14559      VARIANT="DBG"
14560      FASTDEBUG="false"
14561      DEBUG_CLASSFILES="true"
14562      BUILD_VARIANT_RELEASE="-debug"
14563      HOTSPOT_DEBUG_LEVEL="debug"
14564      HOTSPOT_EXPORT="debug"
14565      ;;
14566    optimized )
14567      VARIANT="OPT"
14568      FASTDEBUG="false"
14569      DEBUG_CLASSFILES="false"
14570      BUILD_VARIANT_RELEASE="-optimized"
14571      HOTSPOT_DEBUG_LEVEL="optimized"
14572      HOTSPOT_EXPORT="optimized"
14573      ;;
14574  esac
14575
14576  # The debug level 'optimized' is a little special because it is currently only
14577  # applicable to the HotSpot build where it means to build a completely
14578  # optimized version of the VM without any debugging code (like for the
14579  # 'release' debug level which is called 'product' in the HotSpot build) but
14580  # with the exception that it can contain additional code which is otherwise
14581  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14582  # test new and/or experimental features which are not intended for customer
14583  # shipment. Because these new features need to be tested and benchmarked in
14584  # real world scenarios, we want to build the containing JDK at the 'release'
14585  # debug level.
14586  if test "x$DEBUG_LEVEL" = xoptimized; then
14587    DEBUG_LEVEL="release"
14588  fi
14589
14590  #####
14591  # Generate the legacy makefile targets for hotspot.
14592  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14593  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14594  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14595  # But until then ...
14596  HOTSPOT_TARGET=""
14597
14598  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14599    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14600  fi
14601
14602  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14603    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14604  fi
14605
14606  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14607    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14608  fi
14609
14610  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14611    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14612  fi
14613
14614  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14615    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14616  fi
14617
14618  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14619    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14620  fi
14621
14622  if test "x$JVM_VARIANT_CORE" = xtrue; then
14623    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14624  fi
14625
14626  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14627
14628  # On Macosx universal binaries are produced, but they only contain
14629  # 64 bit intel. This invalidates control of which jvms are built
14630  # from configure, but only server is valid anyway. Fix this
14631  # when hotspot makefiles are rewritten.
14632  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14633    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14634  fi
14635
14636  #####
14637
14638
14639
14640
14641
14642
14643
14644
14645# With basic setup done, call the custom early hook.
14646
14647
14648# Check if we have devkits, extra paths or sysroot set.
14649
14650
14651# Check whether --with-devkit was given.
14652if test "${with_devkit+set}" = set; then :
14653  withval=$with_devkit;
14654
14655  # Only process if variable expands to non-empty
14656
14657  if test "x$with_devkit" != x; then
14658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14659
14660  # Input might be given as Windows format, start by converting to
14661  # unix format.
14662  path="$with_devkit"
14663  new_path=`$CYGPATH -u "$path"`
14664
14665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14668  # "foo.exe" is OK but "foo" is an error.
14669  #
14670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14671  # It is also a way to make sure we got the proper file name for the real test later on.
14672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14673  if test "x$test_shortpath" = x; then
14674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14675$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14676    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14677  fi
14678
14679  # Call helper function which possibly converts this using DOS-style short mode.
14680  # If so, the updated path is stored in $new_path.
14681
14682  input_path="$new_path"
14683  # Check if we need to convert this using DOS-style short mode. If the path
14684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14685  # take no chances and rewrite it.
14686  # Note: m4 eats our [], so we need to use [ and ] instead.
14687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14688  if test "x$has_forbidden_chars" != x; then
14689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14693      # Going to short mode and back again did indeed matter. Since short mode is
14694      # case insensitive, let's make it lowercase to improve readability.
14695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14696      # Now convert it back to Unix-style (cygpath)
14697      input_path=`$CYGPATH -u "$shortmode_path"`
14698      new_path="$input_path"
14699    fi
14700  fi
14701
14702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14703  if test "x$test_cygdrive_prefix" = x; then
14704    # As a simple fix, exclude /usr/bin since it's not a real path.
14705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14707      # a path prefixed by /cygdrive for fixpath to work.
14708      new_path="$CYGWIN_ROOT_PATH$input_path"
14709    fi
14710  fi
14711
14712
14713  if test "x$path" != "x$new_path"; then
14714    with_devkit="$new_path"
14715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14716$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14717  fi
14718
14719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14720
14721  path="$with_devkit"
14722  has_colon=`$ECHO $path | $GREP ^.:`
14723  new_path="$path"
14724  if test "x$has_colon" = x; then
14725    # Not in mixed or Windows style, start by that.
14726    new_path=`cmd //c echo $path`
14727  fi
14728
14729
14730  input_path="$new_path"
14731  # Check if we need to convert this using DOS-style short mode. If the path
14732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14733  # take no chances and rewrite it.
14734  # Note: m4 eats our [], so we need to use [ and ] instead.
14735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14736  if test "x$has_forbidden_chars" != x; then
14737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14739  fi
14740
14741
14742  windows_path="$new_path"
14743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14744    unix_path=`$CYGPATH -u "$windows_path"`
14745    new_path="$unix_path"
14746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14748    new_path="$unix_path"
14749  fi
14750
14751  if test "x$path" != "x$new_path"; then
14752    with_devkit="$new_path"
14753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14754$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14755  fi
14756
14757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14759
14760    else
14761      # We're on a unix platform. Hooray! :)
14762      path="$with_devkit"
14763      has_space=`$ECHO "$path" | $GREP " "`
14764      if test "x$has_space" != x; then
14765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14766$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14768      fi
14769
14770      # Use eval to expand a potential ~
14771      eval path="$path"
14772      if test ! -f "$path" && test ! -d "$path"; then
14773        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14774      fi
14775
14776      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14777    fi
14778  fi
14779
14780        DEVKIT_ROOT="$with_devkit"
14781        # Check for a meta data info file in the root of the devkit
14782        if test -f "$DEVKIT_ROOT/devkit.info"; then
14783          . $DEVKIT_ROOT/devkit.info
14784          # This potentially sets the following:
14785          # A descriptive name of the devkit
14786
14787  if test "x$DEVKIT_NAME" = x; then
14788    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14789  fi
14790
14791          # Corresponds to --with-extra-path
14792
14793  if test "x$DEVKIT_EXTRA_PATH" = x; then
14794    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14795  fi
14796
14797          # Corresponds to --with-toolchain-path
14798
14799  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14800    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14801  fi
14802
14803          # Corresponds to --with-sysroot
14804
14805  if test "x$DEVKIT_SYSROOT" = x; then
14806    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14807  fi
14808
14809
14810          # Identifies the Visual Studio version in the devkit
14811
14812  if test "x$DEVKIT_VS_VERSION" = x; then
14813    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14814  fi
14815
14816          # The Visual Studio include environment variable
14817
14818  if test "x$DEVKIT_VS_INCLUDE" = x; then
14819    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14820  fi
14821
14822          # The Visual Studio lib environment variable
14823
14824  if test "x$DEVKIT_VS_LIB" = x; then
14825    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14826  fi
14827
14828          # Corresponds to --with-msvcr-dll
14829
14830  if test "x$DEVKIT_MSVCR_DLL" = x; then
14831    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14832  fi
14833
14834          # Corresponds to --with-msvcp-dll
14835
14836  if test "x$DEVKIT_MSVCP_DLL" = x; then
14837    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14838  fi
14839
14840        fi
14841
14842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14843$as_echo_n "checking for devkit... " >&6; }
14844        if test "x$DEVKIT_NAME" != x; then
14845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14846$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14847        else
14848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14849$as_echo "$DEVKIT_ROOT" >&6; }
14850        fi
14851
14852
14853  if test "x$DEVKIT_EXTRA_PATH" != x; then
14854    if test "x$EXTRA_PATH" = x; then
14855      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14856    else
14857      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14858    fi
14859  fi
14860
14861
14862        # Fallback default of just /bin if DEVKIT_PATH is not defined
14863        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14864          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14865        fi
14866
14867  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14868    if test "x$TOOLCHAIN_PATH" = x; then
14869      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14870    else
14871      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14872    fi
14873  fi
14874
14875
14876        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14877        # places for backwards compatiblity.
14878        if test "x$DEVKIT_SYSROOT" != x; then
14879          SYSROOT="$DEVKIT_SYSROOT"
14880        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14881          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14882        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14883          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14884        fi
14885
14886
14887fi
14888
14889
14890  # You can force the sysroot if the sysroot encoded into the compiler tools
14891  # is not correct.
14892
14893# Check whether --with-sys-root was given.
14894if test "${with_sys_root+set}" = set; then :
14895  withval=$with_sys_root; SYSROOT=$with_sys_root
14896
14897fi
14898
14899
14900
14901# Check whether --with-sysroot was given.
14902if test "${with_sysroot+set}" = set; then :
14903  withval=$with_sysroot; SYSROOT=$with_sysroot
14904
14905fi
14906
14907
14908
14909# Check whether --with-tools-dir was given.
14910if test "${with_tools_dir+set}" = set; then :
14911  withval=$with_tools_dir;
14912  if test "x$with_tools_dir" != x; then
14913    if test "x$TOOLCHAIN_PATH" = x; then
14914      TOOLCHAIN_PATH="$with_tools_dir"
14915    else
14916      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14917    fi
14918  fi
14919
14920
14921fi
14922
14923
14924
14925# Check whether --with-toolchain-path was given.
14926if test "${with_toolchain_path+set}" = set; then :
14927  withval=$with_toolchain_path;
14928  if test "x$with_toolchain_path" != x; then
14929    if test "x$TOOLCHAIN_PATH" = x; then
14930      TOOLCHAIN_PATH="$with_toolchain_path"
14931    else
14932      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14933    fi
14934  fi
14935
14936
14937fi
14938
14939
14940
14941# Check whether --with-extra-path was given.
14942if test "${with_extra_path+set}" = set; then :
14943  withval=$with_extra_path;
14944  if test "x$with_extra_path" != x; then
14945    if test "x$EXTRA_PATH" = x; then
14946      EXTRA_PATH="$with_extra_path"
14947    else
14948      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14949    fi
14950  fi
14951
14952
14953fi
14954
14955
14956  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14957    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
14958    # If not, detect if Xcode is installed by running xcodebuild -version
14959    # if no Xcode installed, xcodebuild exits with 1
14960    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14961    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14962      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14963      # fall back on the stub binary in /usr/bin/xcodebuild
14964      # Extract the first word of "xcodebuild", so it can be a program name with args.
14965set dummy xcodebuild; ac_word=$2
14966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14967$as_echo_n "checking for $ac_word... " >&6; }
14968if ${ac_cv_path_XCODEBUILD+:} false; then :
14969  $as_echo_n "(cached) " >&6
14970else
14971  case $XCODEBUILD in
14972  [\\/]* | ?:[\\/]*)
14973  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14974  ;;
14975  *)
14976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14977for as_dir in $TOOLCHAIN_PATH
14978do
14979  IFS=$as_save_IFS
14980  test -z "$as_dir" && as_dir=.
14981    for ac_exec_ext in '' $ac_executable_extensions; do
14982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14983    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
14984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14985    break 2
14986  fi
14987done
14988  done
14989IFS=$as_save_IFS
14990
14991  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
14992  ;;
14993esac
14994fi
14995XCODEBUILD=$ac_cv_path_XCODEBUILD
14996if test -n "$XCODEBUILD"; then
14997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
14998$as_echo "$XCODEBUILD" >&6; }
14999else
15000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15001$as_echo "no" >&6; }
15002fi
15003
15004
15005    else
15006      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15007      # when only the command line tools are installed there are no SDKs, so headers
15008      # are copied into the system frameworks
15009      XCODEBUILD=
15010
15011    fi
15012
15013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15014$as_echo_n "checking for sdk name... " >&6; }
15015
15016# Check whether --with-sdk-name was given.
15017if test "${with_sdk_name+set}" = set; then :
15018  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15019
15020fi
15021
15022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15023$as_echo "$SDKNAME" >&6; }
15024
15025    # if toolchain path is specified then don't rely on system headers, they may not compile
15026    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15027    test -z "$TOOLCHAIN_PATH" && \
15028      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15029
15030    if test -z "$SYSROOT"; then
15031      if test -n "$XCODEBUILD"; then
15032        # if we don't have system headers, use default SDK name (last resort)
15033        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15034          SDKNAME=${SDKNAME:-macosx}
15035        fi
15036
15037        if test -n "$SDKNAME"; then
15038          # Call xcodebuild to determine SYSROOT
15039          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15040        fi
15041      else
15042        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15043          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
15044        fi
15045      fi
15046    else
15047      # warn user if --with-sdk-name was also set
15048      if test -n "$with_sdk_name"; then
15049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15050$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15051      fi
15052    fi
15053
15054    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15055      # If no system framework headers, then SYSROOT must be set, or we won't build
15056      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
15057    fi
15058
15059    # Perform a basic sanity test
15060    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15061      if test -z "$SYSROOT"; then
15062        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
15063      else
15064        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15065      fi
15066    fi
15067
15068    # set SDKROOT too, Xcode tools will pick it up
15069    SDKROOT=$SYSROOT
15070
15071  fi
15072
15073  # Prepend the extra path to the global path
15074
15075  if test "x$EXTRA_PATH" != x; then
15076    if test "x$PATH" = x; then
15077      PATH="$EXTRA_PATH"
15078    else
15079      PATH="$EXTRA_PATH:$PATH"
15080    fi
15081  fi
15082
15083
15084  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15085    # Add extra search paths on solaris for utilities like ar and as etc...
15086    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15087  fi
15088
15089  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15090$as_echo_n "checking for sysroot... " >&6; }
15091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15092$as_echo "$SYSROOT" >&6; }
15093  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15094$as_echo_n "checking for toolchain path... " >&6; }
15095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15096$as_echo "$TOOLCHAIN_PATH" >&6; }
15097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15098$as_echo_n "checking for extra path... " >&6; }
15099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15100$as_echo "$EXTRA_PATH" >&6; }
15101
15102
15103# To properly create a configuration name, we need to have the OpenJDK target
15104# and options (variants and debug level) parsed.
15105
15106
15107
15108# Check whether --with-conf-name was given.
15109if test "${with_conf_name+set}" = set; then :
15110  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15111fi
15112
15113
15114  # Test from where we are running configure, in or outside of src root.
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15116$as_echo_n "checking where to store configuration... " >&6; }
15117  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15118      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15119      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15120    # We are running configure from the src root.
15121    # Create a default ./build/target-variant-debuglevel output root.
15122    if test "x${CONF_NAME}" = x; then
15123      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15124$as_echo "in default location" >&6; }
15125      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15126    else
15127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15128$as_echo "in build directory with custom name" >&6; }
15129    fi
15130    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15131    $MKDIR -p "$OUTPUT_ROOT"
15132    if test ! -d "$OUTPUT_ROOT"; then
15133      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15134    fi
15135  else
15136    # We are running configure from outside of the src dir.
15137    # Then use the current directory as output dir!
15138    # If configuration is situated in normal build directory, just use the build
15139    # directory name as configuration name, otherwise use the complete path.
15140    if test "x${CONF_NAME}" = x; then
15141      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15142    fi
15143    OUTPUT_ROOT="$CURDIR"
15144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15145$as_echo "in current directory" >&6; }
15146
15147    # WARNING: This might be a bad thing to do. You need to be sure you want to
15148    # have a configuration in this directory. Do some sanity checks!
15149
15150    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15151      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15152      # other files
15153      files_present=`$LS $OUTPUT_ROOT`
15154      # Configure has already touched config.log and confdefs.h in the current dir when this check
15155      # is performed.
15156      filtered_files=`$ECHO "$files_present" \
15157          | $SED -e 's/config.log//g' \
15158              -e 's/configure.log//g' \
15159              -e 's/confdefs.h//g' \
15160              -e 's/ //g' \
15161          | $TR -d '\n'`
15162      if test "x$filtered_files" != x; then
15163        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15164$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15165        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15166$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15167        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15168$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15169        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15170$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15171        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15172$as_echo "$as_me: seriously mess up just about everything." >&6;}
15173        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15174$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15175        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15176$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15177        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15178      fi
15179    fi
15180  fi
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15182$as_echo_n "checking what configuration name to use... " >&6; }
15183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15184$as_echo "$CONF_NAME" >&6; }
15185
15186
15187  # Only process if variable expands to non-empty
15188
15189  if test "x$OUTPUT_ROOT" != x; then
15190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15191
15192  # Input might be given as Windows format, start by converting to
15193  # unix format.
15194  path="$OUTPUT_ROOT"
15195  new_path=`$CYGPATH -u "$path"`
15196
15197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15200  # "foo.exe" is OK but "foo" is an error.
15201  #
15202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15203  # It is also a way to make sure we got the proper file name for the real test later on.
15204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15205  if test "x$test_shortpath" = x; then
15206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15207$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15208    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15209  fi
15210
15211  # Call helper function which possibly converts this using DOS-style short mode.
15212  # If so, the updated path is stored in $new_path.
15213
15214  input_path="$new_path"
15215  # Check if we need to convert this using DOS-style short mode. If the path
15216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15217  # take no chances and rewrite it.
15218  # Note: m4 eats our [], so we need to use [ and ] instead.
15219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15220  if test "x$has_forbidden_chars" != x; then
15221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15225      # Going to short mode and back again did indeed matter. Since short mode is
15226      # case insensitive, let's make it lowercase to improve readability.
15227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15228      # Now convert it back to Unix-style (cygpath)
15229      input_path=`$CYGPATH -u "$shortmode_path"`
15230      new_path="$input_path"
15231    fi
15232  fi
15233
15234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15235  if test "x$test_cygdrive_prefix" = x; then
15236    # As a simple fix, exclude /usr/bin since it's not a real path.
15237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15239      # a path prefixed by /cygdrive for fixpath to work.
15240      new_path="$CYGWIN_ROOT_PATH$input_path"
15241    fi
15242  fi
15243
15244
15245  if test "x$path" != "x$new_path"; then
15246    OUTPUT_ROOT="$new_path"
15247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15248$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15249  fi
15250
15251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15252
15253  path="$OUTPUT_ROOT"
15254  has_colon=`$ECHO $path | $GREP ^.:`
15255  new_path="$path"
15256  if test "x$has_colon" = x; then
15257    # Not in mixed or Windows style, start by that.
15258    new_path=`cmd //c echo $path`
15259  fi
15260
15261
15262  input_path="$new_path"
15263  # Check if we need to convert this using DOS-style short mode. If the path
15264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15265  # take no chances and rewrite it.
15266  # Note: m4 eats our [], so we need to use [ and ] instead.
15267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15268  if test "x$has_forbidden_chars" != x; then
15269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15271  fi
15272
15273
15274  windows_path="$new_path"
15275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15276    unix_path=`$CYGPATH -u "$windows_path"`
15277    new_path="$unix_path"
15278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15280    new_path="$unix_path"
15281  fi
15282
15283  if test "x$path" != "x$new_path"; then
15284    OUTPUT_ROOT="$new_path"
15285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15286$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15287  fi
15288
15289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15291
15292    else
15293      # We're on a unix platform. Hooray! :)
15294      path="$OUTPUT_ROOT"
15295      has_space=`$ECHO "$path" | $GREP " "`
15296      if test "x$has_space" != x; then
15297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15298$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15300      fi
15301
15302      # Use eval to expand a potential ~
15303      eval path="$path"
15304      if test ! -f "$path" && test ! -d "$path"; then
15305        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15306      fi
15307
15308      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15309    fi
15310  fi
15311
15312
15313  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15314  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15315
15316  SPEC=$OUTPUT_ROOT/spec.gmk
15317
15318  CONF_NAME=$CONF_NAME
15319
15320  OUTPUT_ROOT=$OUTPUT_ROOT
15321
15322
15323
15324  # The spec.gmk file contains all variables for the make system.
15325  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15326
15327  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15328  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15329
15330  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15331  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15332
15333  # The compare.sh is used to compare the build output to other builds.
15334  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15335
15336  # The generated Makefile knows where the spec.gmk is and where the source is.
15337  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15338  # which will look for generated configurations
15339  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15340
15341
15342
15343# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15344
15345  for ac_prog in apt-get yum port pkgutil pkgadd
15346do
15347  # Extract the first word of "$ac_prog", so it can be a program name with args.
15348set dummy $ac_prog; ac_word=$2
15349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15350$as_echo_n "checking for $ac_word... " >&6; }
15351if ${ac_cv_prog_PKGHANDLER+:} false; then :
15352  $as_echo_n "(cached) " >&6
15353else
15354  if test -n "$PKGHANDLER"; then
15355  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15356else
15357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15358for as_dir in $PATH
15359do
15360  IFS=$as_save_IFS
15361  test -z "$as_dir" && as_dir=.
15362    for ac_exec_ext in '' $ac_executable_extensions; do
15363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15364    ac_cv_prog_PKGHANDLER="$ac_prog"
15365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15366    break 2
15367  fi
15368done
15369  done
15370IFS=$as_save_IFS
15371
15372fi
15373fi
15374PKGHANDLER=$ac_cv_prog_PKGHANDLER
15375if test -n "$PKGHANDLER"; then
15376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15377$as_echo "$PKGHANDLER" >&6; }
15378else
15379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15380$as_echo "no" >&6; }
15381fi
15382
15383
15384  test -n "$PKGHANDLER" && break
15385done
15386
15387
15388
15389# Setup tools that requires more complex handling, or that is not needed by the configure script.
15390
15391
15392  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15393  if test "x$MAKE" != x; then
15394    # User has supplied a make, test it.
15395    if test ! -f "$MAKE"; then
15396      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15397    fi
15398
15399  MAKE_CANDIDATE=""$MAKE""
15400  DESCRIPTION="user supplied MAKE=$MAKE"
15401
15402  # On Cygwin, we require a newer version of make than on other platforms
15403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15404    MAKE_VERSION_EXPR="-e 4\."
15405    MAKE_REQUIRED_VERSION="4.0"
15406   else
15407    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15408    MAKE_REQUIRED_VERSION="3.81"
15409  fi
15410
15411  if test "x$MAKE_CANDIDATE" != x; then
15412    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15413$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15414    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15415    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15416    if test "x$IS_GNU_MAKE" = x; then
15417      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15418$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15419    else
15420      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15421      if test "x$IS_MODERN_MAKE" = x; then
15422        { $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
15423$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;}
15424      else
15425        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15426          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15427            MAKE_EXPECTED_ENV='cygwin'
15428          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15429            MAKE_EXPECTED_ENV='msys'
15430          else
15431            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15432          fi
15433          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15434          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15435        else
15436          # Not relevant for non-Windows
15437          IS_MAKE_CORRECT_ENV=true
15438        fi
15439        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15440          { $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
15441$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;}
15442        else
15443          FOUND_MAKE=$MAKE_CANDIDATE
15444
15445  # Only process if variable expands to non-empty
15446
15447  if test "x$FOUND_MAKE" != x; then
15448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15449
15450  # First separate the path from the arguments. This will split at the first
15451  # space.
15452  complete="$FOUND_MAKE"
15453  path="${complete%% *}"
15454  tmp="$complete EOL"
15455  arguments="${tmp#* }"
15456
15457  # Input might be given as Windows format, start by converting to
15458  # unix format.
15459  new_path=`$CYGPATH -u "$path"`
15460
15461  # Now try to locate executable using which
15462  new_path=`$WHICH "$new_path" 2> /dev/null`
15463  # bat and cmd files are not always considered executable in cygwin causing which
15464  # to not find them
15465  if test "x$new_path" = x \
15466      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15467      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15468    new_path=`$CYGPATH -u "$path"`
15469  fi
15470  if test "x$new_path" = x; then
15471    # Oops. Which didn't find the executable.
15472    # The splitting of arguments from the executable at a space might have been incorrect,
15473    # since paths with space are more likely in Windows. Give it another try with the whole
15474    # argument.
15475    path="$complete"
15476    arguments="EOL"
15477    new_path=`$CYGPATH -u "$path"`
15478    new_path=`$WHICH "$new_path" 2> /dev/null`
15479    # bat and cmd files are not always considered executable in cygwin causing which
15480    # to not find them
15481    if test "x$new_path" = x \
15482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15484      new_path=`$CYGPATH -u "$path"`
15485    fi
15486    if test "x$new_path" = x; then
15487      # It's still not found. Now this is an unrecoverable error.
15488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15490      has_space=`$ECHO "$complete" | $GREP " "`
15491      if test "x$has_space" != x; then
15492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15494      fi
15495      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15496    fi
15497  fi
15498
15499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15502  # "foo.exe" is OK but "foo" is an error.
15503  #
15504  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15505  # It is also a way to make sure we got the proper file name for the real test later on.
15506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15507  if test "x$test_shortpath" = x; then
15508    # Short path failed, file does not exist as specified.
15509    # Try adding .exe or .cmd
15510    if test -f "${new_path}.exe"; then
15511      input_to_shortpath="${new_path}.exe"
15512    elif test -f "${new_path}.cmd"; then
15513      input_to_shortpath="${new_path}.cmd"
15514    else
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15517      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15519      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15520    fi
15521  else
15522    input_to_shortpath="$new_path"
15523  fi
15524
15525  # Call helper function which possibly converts this using DOS-style short mode.
15526  # If so, the updated path is stored in $new_path.
15527  new_path="$input_to_shortpath"
15528
15529  input_path="$input_to_shortpath"
15530  # Check if we need to convert this using DOS-style short mode. If the path
15531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15532  # take no chances and rewrite it.
15533  # Note: m4 eats our [], so we need to use [ and ] instead.
15534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15535  if test "x$has_forbidden_chars" != x; then
15536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15540      # Going to short mode and back again did indeed matter. Since short mode is
15541      # case insensitive, let's make it lowercase to improve readability.
15542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15543      # Now convert it back to Unix-style (cygpath)
15544      input_path=`$CYGPATH -u "$shortmode_path"`
15545      new_path="$input_path"
15546    fi
15547  fi
15548
15549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15550  if test "x$test_cygdrive_prefix" = x; then
15551    # As a simple fix, exclude /usr/bin since it's not a real path.
15552    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15554      # a path prefixed by /cygdrive for fixpath to work.
15555      new_path="$CYGWIN_ROOT_PATH$input_path"
15556    fi
15557  fi
15558
15559  # remove trailing .exe if any
15560  new_path="${new_path/%.exe/}"
15561
15562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15563
15564  # First separate the path from the arguments. This will split at the first
15565  # space.
15566  complete="$FOUND_MAKE"
15567  path="${complete%% *}"
15568  tmp="$complete EOL"
15569  arguments="${tmp#* }"
15570
15571  # Input might be given as Windows format, start by converting to
15572  # unix format.
15573  new_path="$path"
15574
15575  windows_path="$new_path"
15576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15577    unix_path=`$CYGPATH -u "$windows_path"`
15578    new_path="$unix_path"
15579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15581    new_path="$unix_path"
15582  fi
15583
15584
15585  # Now try to locate executable using which
15586  new_path=`$WHICH "$new_path" 2> /dev/null`
15587
15588  if test "x$new_path" = x; then
15589    # Oops. Which didn't find the executable.
15590    # The splitting of arguments from the executable at a space might have been incorrect,
15591    # since paths with space are more likely in Windows. Give it another try with the whole
15592    # argument.
15593    path="$complete"
15594    arguments="EOL"
15595    new_path="$path"
15596
15597  windows_path="$new_path"
15598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15599    unix_path=`$CYGPATH -u "$windows_path"`
15600    new_path="$unix_path"
15601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15603    new_path="$unix_path"
15604  fi
15605
15606
15607    new_path=`$WHICH "$new_path" 2> /dev/null`
15608    # bat and cmd files are not always considered executable in MSYS causing which
15609    # to not find them
15610    if test "x$new_path" = x \
15611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15613      new_path="$path"
15614
15615  windows_path="$new_path"
15616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15617    unix_path=`$CYGPATH -u "$windows_path"`
15618    new_path="$unix_path"
15619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15621    new_path="$unix_path"
15622  fi
15623
15624    fi
15625
15626    if test "x$new_path" = x; then
15627      # It's still not found. Now this is an unrecoverable error.
15628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15630      has_space=`$ECHO "$complete" | $GREP " "`
15631      if test "x$has_space" != x; then
15632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15634      fi
15635      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15636    fi
15637  fi
15638
15639  # Now new_path has a complete unix path to the binary
15640  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15641    # Keep paths in /bin as-is, but remove trailing .exe if any
15642    new_path="${new_path/%.exe/}"
15643    # Do not save /bin paths to all_fixpath_prefixes!
15644  else
15645    # Not in mixed or Windows style, start by that.
15646    new_path=`cmd //c echo $new_path`
15647
15648  input_path="$new_path"
15649  # Check if we need to convert this using DOS-style short mode. If the path
15650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15651  # take no chances and rewrite it.
15652  # Note: m4 eats our [], so we need to use [ and ] instead.
15653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15654  if test "x$has_forbidden_chars" != x; then
15655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15657  fi
15658
15659    # Output is in $new_path
15660
15661  windows_path="$new_path"
15662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15663    unix_path=`$CYGPATH -u "$windows_path"`
15664    new_path="$unix_path"
15665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15667    new_path="$unix_path"
15668  fi
15669
15670    # remove trailing .exe if any
15671    new_path="${new_path/%.exe/}"
15672
15673    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15674    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15675  fi
15676
15677    else
15678      # We're on a unix platform. Hooray! :)
15679      # First separate the path from the arguments. This will split at the first
15680      # space.
15681      complete="$FOUND_MAKE"
15682      path="${complete%% *}"
15683      tmp="$complete EOL"
15684      arguments="${tmp#* }"
15685
15686      # Cannot rely on the command "which" here since it doesn't always work.
15687      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15688      if test -z "$is_absolute_path"; then
15689        # Path to executable is not absolute. Find it.
15690        IFS_save="$IFS"
15691        IFS=:
15692        for p in $PATH; do
15693          if test -f "$p/$path" && test -x "$p/$path"; then
15694            new_path="$p/$path"
15695            break
15696          fi
15697        done
15698        IFS="$IFS_save"
15699      else
15700        # This is an absolute path, we can use it without further modifications.
15701        new_path="$path"
15702      fi
15703
15704      if test "x$new_path" = x; then
15705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15706$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15707        has_space=`$ECHO "$complete" | $GREP " "`
15708        if test "x$has_space" != x; then
15709          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15710$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15711        fi
15712        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15713      fi
15714    fi
15715
15716    # Now join together the path and the arguments once again
15717    if test "x$arguments" != xEOL; then
15718      new_complete="$new_path ${arguments% *}"
15719    else
15720      new_complete="$new_path"
15721    fi
15722
15723    if test "x$complete" != "x$new_complete"; then
15724      FOUND_MAKE="$new_complete"
15725      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15726$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15727    fi
15728  fi
15729
15730        fi
15731      fi
15732    fi
15733  fi
15734
15735    if test "x$FOUND_MAKE" = x; then
15736      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15737    fi
15738  else
15739    # Try our hardest to locate a correct version of GNU make
15740    for ac_prog in gmake
15741do
15742  # Extract the first word of "$ac_prog", so it can be a program name with args.
15743set dummy $ac_prog; ac_word=$2
15744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15745$as_echo_n "checking for $ac_word... " >&6; }
15746if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15747  $as_echo_n "(cached) " >&6
15748else
15749  case $CHECK_GMAKE in
15750  [\\/]* | ?:[\\/]*)
15751  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15752  ;;
15753  *)
15754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15755for as_dir in $PATH
15756do
15757  IFS=$as_save_IFS
15758  test -z "$as_dir" && as_dir=.
15759    for ac_exec_ext in '' $ac_executable_extensions; do
15760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15761    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15763    break 2
15764  fi
15765done
15766  done
15767IFS=$as_save_IFS
15768
15769  ;;
15770esac
15771fi
15772CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15773if test -n "$CHECK_GMAKE"; then
15774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15775$as_echo "$CHECK_GMAKE" >&6; }
15776else
15777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15778$as_echo "no" >&6; }
15779fi
15780
15781
15782  test -n "$CHECK_GMAKE" && break
15783done
15784
15785
15786  MAKE_CANDIDATE=""$CHECK_GMAKE""
15787  DESCRIPTION="gmake in PATH"
15788
15789  # On Cygwin, we require a newer version of make than on other platforms
15790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15791    MAKE_VERSION_EXPR="-e 4\."
15792    MAKE_REQUIRED_VERSION="4.0"
15793   else
15794    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15795    MAKE_REQUIRED_VERSION="3.81"
15796  fi
15797
15798  if test "x$MAKE_CANDIDATE" != x; then
15799    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15800$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15801    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15802    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15803    if test "x$IS_GNU_MAKE" = x; then
15804      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15805$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15806    else
15807      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15808      if test "x$IS_MODERN_MAKE" = x; then
15809        { $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
15810$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;}
15811      else
15812        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15813          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15814            MAKE_EXPECTED_ENV='cygwin'
15815          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15816            MAKE_EXPECTED_ENV='msys'
15817          else
15818            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15819          fi
15820          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15821          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15822        else
15823          # Not relevant for non-Windows
15824          IS_MAKE_CORRECT_ENV=true
15825        fi
15826        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15827          { $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
15828$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;}
15829        else
15830          FOUND_MAKE=$MAKE_CANDIDATE
15831
15832  # Only process if variable expands to non-empty
15833
15834  if test "x$FOUND_MAKE" != x; then
15835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15836
15837  # First separate the path from the arguments. This will split at the first
15838  # space.
15839  complete="$FOUND_MAKE"
15840  path="${complete%% *}"
15841  tmp="$complete EOL"
15842  arguments="${tmp#* }"
15843
15844  # Input might be given as Windows format, start by converting to
15845  # unix format.
15846  new_path=`$CYGPATH -u "$path"`
15847
15848  # Now try to locate executable using which
15849  new_path=`$WHICH "$new_path" 2> /dev/null`
15850  # bat and cmd files are not always considered executable in cygwin causing which
15851  # to not find them
15852  if test "x$new_path" = x \
15853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15855    new_path=`$CYGPATH -u "$path"`
15856  fi
15857  if test "x$new_path" = x; then
15858    # Oops. Which didn't find the executable.
15859    # The splitting of arguments from the executable at a space might have been incorrect,
15860    # since paths with space are more likely in Windows. Give it another try with the whole
15861    # argument.
15862    path="$complete"
15863    arguments="EOL"
15864    new_path=`$CYGPATH -u "$path"`
15865    new_path=`$WHICH "$new_path" 2> /dev/null`
15866    # bat and cmd files are not always considered executable in cygwin causing which
15867    # to not find them
15868    if test "x$new_path" = x \
15869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15871      new_path=`$CYGPATH -u "$path"`
15872    fi
15873    if test "x$new_path" = x; then
15874      # It's still not found. Now this is an unrecoverable error.
15875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15876$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15877      has_space=`$ECHO "$complete" | $GREP " "`
15878      if test "x$has_space" != x; then
15879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15881      fi
15882      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15883    fi
15884  fi
15885
15886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15889  # "foo.exe" is OK but "foo" is an error.
15890  #
15891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15892  # It is also a way to make sure we got the proper file name for the real test later on.
15893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15894  if test "x$test_shortpath" = x; then
15895    # Short path failed, file does not exist as specified.
15896    # Try adding .exe or .cmd
15897    if test -f "${new_path}.exe"; then
15898      input_to_shortpath="${new_path}.exe"
15899    elif test -f "${new_path}.cmd"; then
15900      input_to_shortpath="${new_path}.cmd"
15901    else
15902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15903$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15906      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15907    fi
15908  else
15909    input_to_shortpath="$new_path"
15910  fi
15911
15912  # Call helper function which possibly converts this using DOS-style short mode.
15913  # If so, the updated path is stored in $new_path.
15914  new_path="$input_to_shortpath"
15915
15916  input_path="$input_to_shortpath"
15917  # Check if we need to convert this using DOS-style short mode. If the path
15918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15919  # take no chances and rewrite it.
15920  # Note: m4 eats our [], so we need to use [ and ] instead.
15921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15922  if test "x$has_forbidden_chars" != x; then
15923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15927      # Going to short mode and back again did indeed matter. Since short mode is
15928      # case insensitive, let's make it lowercase to improve readability.
15929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15930      # Now convert it back to Unix-style (cygpath)
15931      input_path=`$CYGPATH -u "$shortmode_path"`
15932      new_path="$input_path"
15933    fi
15934  fi
15935
15936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15937  if test "x$test_cygdrive_prefix" = x; then
15938    # As a simple fix, exclude /usr/bin since it's not a real path.
15939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15941      # a path prefixed by /cygdrive for fixpath to work.
15942      new_path="$CYGWIN_ROOT_PATH$input_path"
15943    fi
15944  fi
15945
15946  # remove trailing .exe if any
15947  new_path="${new_path/%.exe/}"
15948
15949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15950
15951  # First separate the path from the arguments. This will split at the first
15952  # space.
15953  complete="$FOUND_MAKE"
15954  path="${complete%% *}"
15955  tmp="$complete EOL"
15956  arguments="${tmp#* }"
15957
15958  # Input might be given as Windows format, start by converting to
15959  # unix format.
15960  new_path="$path"
15961
15962  windows_path="$new_path"
15963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15964    unix_path=`$CYGPATH -u "$windows_path"`
15965    new_path="$unix_path"
15966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15968    new_path="$unix_path"
15969  fi
15970
15971
15972  # Now try to locate executable using which
15973  new_path=`$WHICH "$new_path" 2> /dev/null`
15974
15975  if test "x$new_path" = x; then
15976    # Oops. Which didn't find the executable.
15977    # The splitting of arguments from the executable at a space might have been incorrect,
15978    # since paths with space are more likely in Windows. Give it another try with the whole
15979    # argument.
15980    path="$complete"
15981    arguments="EOL"
15982    new_path="$path"
15983
15984  windows_path="$new_path"
15985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15986    unix_path=`$CYGPATH -u "$windows_path"`
15987    new_path="$unix_path"
15988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15990    new_path="$unix_path"
15991  fi
15992
15993
15994    new_path=`$WHICH "$new_path" 2> /dev/null`
15995    # bat and cmd files are not always considered executable in MSYS causing which
15996    # to not find them
15997    if test "x$new_path" = x \
15998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16000      new_path="$path"
16001
16002  windows_path="$new_path"
16003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16004    unix_path=`$CYGPATH -u "$windows_path"`
16005    new_path="$unix_path"
16006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16008    new_path="$unix_path"
16009  fi
16010
16011    fi
16012
16013    if test "x$new_path" = x; then
16014      # It's still not found. Now this is an unrecoverable error.
16015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16016$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16017      has_space=`$ECHO "$complete" | $GREP " "`
16018      if test "x$has_space" != x; then
16019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16021      fi
16022      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16023    fi
16024  fi
16025
16026  # Now new_path has a complete unix path to the binary
16027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16028    # Keep paths in /bin as-is, but remove trailing .exe if any
16029    new_path="${new_path/%.exe/}"
16030    # Do not save /bin paths to all_fixpath_prefixes!
16031  else
16032    # Not in mixed or Windows style, start by that.
16033    new_path=`cmd //c echo $new_path`
16034
16035  input_path="$new_path"
16036  # Check if we need to convert this using DOS-style short mode. If the path
16037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16038  # take no chances and rewrite it.
16039  # Note: m4 eats our [], so we need to use [ and ] instead.
16040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16041  if test "x$has_forbidden_chars" != x; then
16042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16044  fi
16045
16046    # Output is in $new_path
16047
16048  windows_path="$new_path"
16049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16050    unix_path=`$CYGPATH -u "$windows_path"`
16051    new_path="$unix_path"
16052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16054    new_path="$unix_path"
16055  fi
16056
16057    # remove trailing .exe if any
16058    new_path="${new_path/%.exe/}"
16059
16060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16062  fi
16063
16064    else
16065      # We're on a unix platform. Hooray! :)
16066      # First separate the path from the arguments. This will split at the first
16067      # space.
16068      complete="$FOUND_MAKE"
16069      path="${complete%% *}"
16070      tmp="$complete EOL"
16071      arguments="${tmp#* }"
16072
16073      # Cannot rely on the command "which" here since it doesn't always work.
16074      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16075      if test -z "$is_absolute_path"; then
16076        # Path to executable is not absolute. Find it.
16077        IFS_save="$IFS"
16078        IFS=:
16079        for p in $PATH; do
16080          if test -f "$p/$path" && test -x "$p/$path"; then
16081            new_path="$p/$path"
16082            break
16083          fi
16084        done
16085        IFS="$IFS_save"
16086      else
16087        # This is an absolute path, we can use it without further modifications.
16088        new_path="$path"
16089      fi
16090
16091      if test "x$new_path" = x; then
16092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16093$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16094        has_space=`$ECHO "$complete" | $GREP " "`
16095        if test "x$has_space" != x; then
16096          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16098        fi
16099        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16100      fi
16101    fi
16102
16103    # Now join together the path and the arguments once again
16104    if test "x$arguments" != xEOL; then
16105      new_complete="$new_path ${arguments% *}"
16106    else
16107      new_complete="$new_path"
16108    fi
16109
16110    if test "x$complete" != "x$new_complete"; then
16111      FOUND_MAKE="$new_complete"
16112      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16113$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16114    fi
16115  fi
16116
16117        fi
16118      fi
16119    fi
16120  fi
16121
16122
16123    if test "x$FOUND_MAKE" = x; then
16124      for ac_prog in make
16125do
16126  # Extract the first word of "$ac_prog", so it can be a program name with args.
16127set dummy $ac_prog; ac_word=$2
16128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16129$as_echo_n "checking for $ac_word... " >&6; }
16130if ${ac_cv_path_CHECK_MAKE+:} false; then :
16131  $as_echo_n "(cached) " >&6
16132else
16133  case $CHECK_MAKE in
16134  [\\/]* | ?:[\\/]*)
16135  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16136  ;;
16137  *)
16138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16139for as_dir in $PATH
16140do
16141  IFS=$as_save_IFS
16142  test -z "$as_dir" && as_dir=.
16143    for ac_exec_ext in '' $ac_executable_extensions; do
16144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16145    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16147    break 2
16148  fi
16149done
16150  done
16151IFS=$as_save_IFS
16152
16153  ;;
16154esac
16155fi
16156CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16157if test -n "$CHECK_MAKE"; then
16158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16159$as_echo "$CHECK_MAKE" >&6; }
16160else
16161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16162$as_echo "no" >&6; }
16163fi
16164
16165
16166  test -n "$CHECK_MAKE" && break
16167done
16168
16169
16170  MAKE_CANDIDATE=""$CHECK_MAKE""
16171  DESCRIPTION="make in PATH"
16172
16173  # On Cygwin, we require a newer version of make than on other platforms
16174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16175    MAKE_VERSION_EXPR="-e 4\."
16176    MAKE_REQUIRED_VERSION="4.0"
16177   else
16178    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16179    MAKE_REQUIRED_VERSION="3.81"
16180  fi
16181
16182  if test "x$MAKE_CANDIDATE" != x; then
16183    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16184$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16185    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16186    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16187    if test "x$IS_GNU_MAKE" = x; then
16188      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16189$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16190    else
16191      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16192      if test "x$IS_MODERN_MAKE" = x; then
16193        { $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
16194$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;}
16195      else
16196        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16197          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16198            MAKE_EXPECTED_ENV='cygwin'
16199          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16200            MAKE_EXPECTED_ENV='msys'
16201          else
16202            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16203          fi
16204          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16205          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16206        else
16207          # Not relevant for non-Windows
16208          IS_MAKE_CORRECT_ENV=true
16209        fi
16210        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16211          { $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
16212$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;}
16213        else
16214          FOUND_MAKE=$MAKE_CANDIDATE
16215
16216  # Only process if variable expands to non-empty
16217
16218  if test "x$FOUND_MAKE" != x; then
16219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16220
16221  # First separate the path from the arguments. This will split at the first
16222  # space.
16223  complete="$FOUND_MAKE"
16224  path="${complete%% *}"
16225  tmp="$complete EOL"
16226  arguments="${tmp#* }"
16227
16228  # Input might be given as Windows format, start by converting to
16229  # unix format.
16230  new_path=`$CYGPATH -u "$path"`
16231
16232  # Now try to locate executable using which
16233  new_path=`$WHICH "$new_path" 2> /dev/null`
16234  # bat and cmd files are not always considered executable in cygwin causing which
16235  # to not find them
16236  if test "x$new_path" = x \
16237      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16238      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16239    new_path=`$CYGPATH -u "$path"`
16240  fi
16241  if test "x$new_path" = x; then
16242    # Oops. Which didn't find the executable.
16243    # The splitting of arguments from the executable at a space might have been incorrect,
16244    # since paths with space are more likely in Windows. Give it another try with the whole
16245    # argument.
16246    path="$complete"
16247    arguments="EOL"
16248    new_path=`$CYGPATH -u "$path"`
16249    new_path=`$WHICH "$new_path" 2> /dev/null`
16250    # bat and cmd files are not always considered executable in cygwin causing which
16251    # to not find them
16252    if test "x$new_path" = x \
16253        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16254        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16255      new_path=`$CYGPATH -u "$path"`
16256    fi
16257    if test "x$new_path" = x; then
16258      # It's still not found. Now this is an unrecoverable error.
16259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16260$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16261      has_space=`$ECHO "$complete" | $GREP " "`
16262      if test "x$has_space" != x; then
16263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16265      fi
16266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16267    fi
16268  fi
16269
16270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16273  # "foo.exe" is OK but "foo" is an error.
16274  #
16275  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16276  # It is also a way to make sure we got the proper file name for the real test later on.
16277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16278  if test "x$test_shortpath" = x; then
16279    # Short path failed, file does not exist as specified.
16280    # Try adding .exe or .cmd
16281    if test -f "${new_path}.exe"; then
16282      input_to_shortpath="${new_path}.exe"
16283    elif test -f "${new_path}.cmd"; then
16284      input_to_shortpath="${new_path}.cmd"
16285    else
16286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16290      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16291    fi
16292  else
16293    input_to_shortpath="$new_path"
16294  fi
16295
16296  # Call helper function which possibly converts this using DOS-style short mode.
16297  # If so, the updated path is stored in $new_path.
16298  new_path="$input_to_shortpath"
16299
16300  input_path="$input_to_shortpath"
16301  # Check if we need to convert this using DOS-style short mode. If the path
16302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16303  # take no chances and rewrite it.
16304  # Note: m4 eats our [], so we need to use [ and ] instead.
16305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16306  if test "x$has_forbidden_chars" != x; then
16307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16311      # Going to short mode and back again did indeed matter. Since short mode is
16312      # case insensitive, let's make it lowercase to improve readability.
16313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16314      # Now convert it back to Unix-style (cygpath)
16315      input_path=`$CYGPATH -u "$shortmode_path"`
16316      new_path="$input_path"
16317    fi
16318  fi
16319
16320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16321  if test "x$test_cygdrive_prefix" = x; then
16322    # As a simple fix, exclude /usr/bin since it's not a real path.
16323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16325      # a path prefixed by /cygdrive for fixpath to work.
16326      new_path="$CYGWIN_ROOT_PATH$input_path"
16327    fi
16328  fi
16329
16330  # remove trailing .exe if any
16331  new_path="${new_path/%.exe/}"
16332
16333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16334
16335  # First separate the path from the arguments. This will split at the first
16336  # space.
16337  complete="$FOUND_MAKE"
16338  path="${complete%% *}"
16339  tmp="$complete EOL"
16340  arguments="${tmp#* }"
16341
16342  # Input might be given as Windows format, start by converting to
16343  # unix format.
16344  new_path="$path"
16345
16346  windows_path="$new_path"
16347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16348    unix_path=`$CYGPATH -u "$windows_path"`
16349    new_path="$unix_path"
16350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16352    new_path="$unix_path"
16353  fi
16354
16355
16356  # Now try to locate executable using which
16357  new_path=`$WHICH "$new_path" 2> /dev/null`
16358
16359  if test "x$new_path" = x; then
16360    # Oops. Which didn't find the executable.
16361    # The splitting of arguments from the executable at a space might have been incorrect,
16362    # since paths with space are more likely in Windows. Give it another try with the whole
16363    # argument.
16364    path="$complete"
16365    arguments="EOL"
16366    new_path="$path"
16367
16368  windows_path="$new_path"
16369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16370    unix_path=`$CYGPATH -u "$windows_path"`
16371    new_path="$unix_path"
16372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16374    new_path="$unix_path"
16375  fi
16376
16377
16378    new_path=`$WHICH "$new_path" 2> /dev/null`
16379    # bat and cmd files are not always considered executable in MSYS causing which
16380    # to not find them
16381    if test "x$new_path" = x \
16382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16384      new_path="$path"
16385
16386  windows_path="$new_path"
16387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16388    unix_path=`$CYGPATH -u "$windows_path"`
16389    new_path="$unix_path"
16390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16392    new_path="$unix_path"
16393  fi
16394
16395    fi
16396
16397    if test "x$new_path" = x; then
16398      # It's still not found. Now this is an unrecoverable error.
16399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16400$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16401      has_space=`$ECHO "$complete" | $GREP " "`
16402      if test "x$has_space" != x; then
16403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16405      fi
16406      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16407    fi
16408  fi
16409
16410  # Now new_path has a complete unix path to the binary
16411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16412    # Keep paths in /bin as-is, but remove trailing .exe if any
16413    new_path="${new_path/%.exe/}"
16414    # Do not save /bin paths to all_fixpath_prefixes!
16415  else
16416    # Not in mixed or Windows style, start by that.
16417    new_path=`cmd //c echo $new_path`
16418
16419  input_path="$new_path"
16420  # Check if we need to convert this using DOS-style short mode. If the path
16421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16422  # take no chances and rewrite it.
16423  # Note: m4 eats our [], so we need to use [ and ] instead.
16424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16425  if test "x$has_forbidden_chars" != x; then
16426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16428  fi
16429
16430    # Output is in $new_path
16431
16432  windows_path="$new_path"
16433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16434    unix_path=`$CYGPATH -u "$windows_path"`
16435    new_path="$unix_path"
16436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16438    new_path="$unix_path"
16439  fi
16440
16441    # remove trailing .exe if any
16442    new_path="${new_path/%.exe/}"
16443
16444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16446  fi
16447
16448    else
16449      # We're on a unix platform. Hooray! :)
16450      # First separate the path from the arguments. This will split at the first
16451      # space.
16452      complete="$FOUND_MAKE"
16453      path="${complete%% *}"
16454      tmp="$complete EOL"
16455      arguments="${tmp#* }"
16456
16457      # Cannot rely on the command "which" here since it doesn't always work.
16458      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16459      if test -z "$is_absolute_path"; then
16460        # Path to executable is not absolute. Find it.
16461        IFS_save="$IFS"
16462        IFS=:
16463        for p in $PATH; do
16464          if test -f "$p/$path" && test -x "$p/$path"; then
16465            new_path="$p/$path"
16466            break
16467          fi
16468        done
16469        IFS="$IFS_save"
16470      else
16471        # This is an absolute path, we can use it without further modifications.
16472        new_path="$path"
16473      fi
16474
16475      if test "x$new_path" = x; then
16476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16477$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16478        has_space=`$ECHO "$complete" | $GREP " "`
16479        if test "x$has_space" != x; then
16480          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16481$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16482        fi
16483        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16484      fi
16485    fi
16486
16487    # Now join together the path and the arguments once again
16488    if test "x$arguments" != xEOL; then
16489      new_complete="$new_path ${arguments% *}"
16490    else
16491      new_complete="$new_path"
16492    fi
16493
16494    if test "x$complete" != "x$new_complete"; then
16495      FOUND_MAKE="$new_complete"
16496      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16497$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16498    fi
16499  fi
16500
16501        fi
16502      fi
16503    fi
16504  fi
16505
16506    fi
16507
16508    if test "x$FOUND_MAKE" = x; then
16509      if test "x$TOOLCHAIN_PATH" != x; then
16510        # We have a toolchain path, check that as well before giving up.
16511        OLD_PATH=$PATH
16512        PATH=$TOOLCHAIN_PATH:$PATH
16513        for ac_prog in gmake
16514do
16515  # Extract the first word of "$ac_prog", so it can be a program name with args.
16516set dummy $ac_prog; ac_word=$2
16517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16518$as_echo_n "checking for $ac_word... " >&6; }
16519if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16520  $as_echo_n "(cached) " >&6
16521else
16522  case $CHECK_TOOLSDIR_GMAKE in
16523  [\\/]* | ?:[\\/]*)
16524  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16525  ;;
16526  *)
16527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16528for as_dir in $PATH
16529do
16530  IFS=$as_save_IFS
16531  test -z "$as_dir" && as_dir=.
16532    for ac_exec_ext in '' $ac_executable_extensions; do
16533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16534    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16536    break 2
16537  fi
16538done
16539  done
16540IFS=$as_save_IFS
16541
16542  ;;
16543esac
16544fi
16545CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16546if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16548$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16549else
16550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16551$as_echo "no" >&6; }
16552fi
16553
16554
16555  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16556done
16557
16558
16559  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16560  DESCRIPTION="gmake in tools-dir"
16561
16562  # On Cygwin, we require a newer version of make than on other platforms
16563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16564    MAKE_VERSION_EXPR="-e 4\."
16565    MAKE_REQUIRED_VERSION="4.0"
16566   else
16567    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16568    MAKE_REQUIRED_VERSION="3.81"
16569  fi
16570
16571  if test "x$MAKE_CANDIDATE" != x; then
16572    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16573$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16574    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16575    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16576    if test "x$IS_GNU_MAKE" = x; then
16577      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16578$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16579    else
16580      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16581      if test "x$IS_MODERN_MAKE" = x; then
16582        { $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
16583$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;}
16584      else
16585        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16586          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16587            MAKE_EXPECTED_ENV='cygwin'
16588          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16589            MAKE_EXPECTED_ENV='msys'
16590          else
16591            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16592          fi
16593          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16594          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16595        else
16596          # Not relevant for non-Windows
16597          IS_MAKE_CORRECT_ENV=true
16598        fi
16599        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16600          { $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
16601$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;}
16602        else
16603          FOUND_MAKE=$MAKE_CANDIDATE
16604
16605  # Only process if variable expands to non-empty
16606
16607  if test "x$FOUND_MAKE" != x; then
16608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16609
16610  # First separate the path from the arguments. This will split at the first
16611  # space.
16612  complete="$FOUND_MAKE"
16613  path="${complete%% *}"
16614  tmp="$complete EOL"
16615  arguments="${tmp#* }"
16616
16617  # Input might be given as Windows format, start by converting to
16618  # unix format.
16619  new_path=`$CYGPATH -u "$path"`
16620
16621  # Now try to locate executable using which
16622  new_path=`$WHICH "$new_path" 2> /dev/null`
16623  # bat and cmd files are not always considered executable in cygwin causing which
16624  # to not find them
16625  if test "x$new_path" = x \
16626      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16627      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16628    new_path=`$CYGPATH -u "$path"`
16629  fi
16630  if test "x$new_path" = x; then
16631    # Oops. Which didn't find the executable.
16632    # The splitting of arguments from the executable at a space might have been incorrect,
16633    # since paths with space are more likely in Windows. Give it another try with the whole
16634    # argument.
16635    path="$complete"
16636    arguments="EOL"
16637    new_path=`$CYGPATH -u "$path"`
16638    new_path=`$WHICH "$new_path" 2> /dev/null`
16639    # bat and cmd files are not always considered executable in cygwin causing which
16640    # to not find them
16641    if test "x$new_path" = x \
16642        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16643        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16644      new_path=`$CYGPATH -u "$path"`
16645    fi
16646    if test "x$new_path" = x; then
16647      # It's still not found. Now this is an unrecoverable error.
16648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16649$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16650      has_space=`$ECHO "$complete" | $GREP " "`
16651      if test "x$has_space" != x; then
16652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16654      fi
16655      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16656    fi
16657  fi
16658
16659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16662  # "foo.exe" is OK but "foo" is an error.
16663  #
16664  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16665  # It is also a way to make sure we got the proper file name for the real test later on.
16666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16667  if test "x$test_shortpath" = x; then
16668    # Short path failed, file does not exist as specified.
16669    # Try adding .exe or .cmd
16670    if test -f "${new_path}.exe"; then
16671      input_to_shortpath="${new_path}.exe"
16672    elif test -f "${new_path}.cmd"; then
16673      input_to_shortpath="${new_path}.cmd"
16674    else
16675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16676$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16677      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16678$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16680    fi
16681  else
16682    input_to_shortpath="$new_path"
16683  fi
16684
16685  # Call helper function which possibly converts this using DOS-style short mode.
16686  # If so, the updated path is stored in $new_path.
16687  new_path="$input_to_shortpath"
16688
16689  input_path="$input_to_shortpath"
16690  # Check if we need to convert this using DOS-style short mode. If the path
16691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16692  # take no chances and rewrite it.
16693  # Note: m4 eats our [], so we need to use [ and ] instead.
16694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16695  if test "x$has_forbidden_chars" != x; then
16696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16700      # Going to short mode and back again did indeed matter. Since short mode is
16701      # case insensitive, let's make it lowercase to improve readability.
16702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16703      # Now convert it back to Unix-style (cygpath)
16704      input_path=`$CYGPATH -u "$shortmode_path"`
16705      new_path="$input_path"
16706    fi
16707  fi
16708
16709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16710  if test "x$test_cygdrive_prefix" = x; then
16711    # As a simple fix, exclude /usr/bin since it's not a real path.
16712    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16714      # a path prefixed by /cygdrive for fixpath to work.
16715      new_path="$CYGWIN_ROOT_PATH$input_path"
16716    fi
16717  fi
16718
16719  # remove trailing .exe if any
16720  new_path="${new_path/%.exe/}"
16721
16722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16723
16724  # First separate the path from the arguments. This will split at the first
16725  # space.
16726  complete="$FOUND_MAKE"
16727  path="${complete%% *}"
16728  tmp="$complete EOL"
16729  arguments="${tmp#* }"
16730
16731  # Input might be given as Windows format, start by converting to
16732  # unix format.
16733  new_path="$path"
16734
16735  windows_path="$new_path"
16736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16737    unix_path=`$CYGPATH -u "$windows_path"`
16738    new_path="$unix_path"
16739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16741    new_path="$unix_path"
16742  fi
16743
16744
16745  # Now try to locate executable using which
16746  new_path=`$WHICH "$new_path" 2> /dev/null`
16747
16748  if test "x$new_path" = x; then
16749    # Oops. Which didn't find the executable.
16750    # The splitting of arguments from the executable at a space might have been incorrect,
16751    # since paths with space are more likely in Windows. Give it another try with the whole
16752    # argument.
16753    path="$complete"
16754    arguments="EOL"
16755    new_path="$path"
16756
16757  windows_path="$new_path"
16758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16759    unix_path=`$CYGPATH -u "$windows_path"`
16760    new_path="$unix_path"
16761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16763    new_path="$unix_path"
16764  fi
16765
16766
16767    new_path=`$WHICH "$new_path" 2> /dev/null`
16768    # bat and cmd files are not always considered executable in MSYS causing which
16769    # to not find them
16770    if test "x$new_path" = x \
16771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16773      new_path="$path"
16774
16775  windows_path="$new_path"
16776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16777    unix_path=`$CYGPATH -u "$windows_path"`
16778    new_path="$unix_path"
16779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16781    new_path="$unix_path"
16782  fi
16783
16784    fi
16785
16786    if test "x$new_path" = x; then
16787      # It's still not found. Now this is an unrecoverable error.
16788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16789$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16790      has_space=`$ECHO "$complete" | $GREP " "`
16791      if test "x$has_space" != x; then
16792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16794      fi
16795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16796    fi
16797  fi
16798
16799  # Now new_path has a complete unix path to the binary
16800  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16801    # Keep paths in /bin as-is, but remove trailing .exe if any
16802    new_path="${new_path/%.exe/}"
16803    # Do not save /bin paths to all_fixpath_prefixes!
16804  else
16805    # Not in mixed or Windows style, start by that.
16806    new_path=`cmd //c echo $new_path`
16807
16808  input_path="$new_path"
16809  # Check if we need to convert this using DOS-style short mode. If the path
16810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16811  # take no chances and rewrite it.
16812  # Note: m4 eats our [], so we need to use [ and ] instead.
16813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16814  if test "x$has_forbidden_chars" != x; then
16815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16817  fi
16818
16819    # Output is in $new_path
16820
16821  windows_path="$new_path"
16822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823    unix_path=`$CYGPATH -u "$windows_path"`
16824    new_path="$unix_path"
16825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16827    new_path="$unix_path"
16828  fi
16829
16830    # remove trailing .exe if any
16831    new_path="${new_path/%.exe/}"
16832
16833    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16834    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16835  fi
16836
16837    else
16838      # We're on a unix platform. Hooray! :)
16839      # First separate the path from the arguments. This will split at the first
16840      # space.
16841      complete="$FOUND_MAKE"
16842      path="${complete%% *}"
16843      tmp="$complete EOL"
16844      arguments="${tmp#* }"
16845
16846      # Cannot rely on the command "which" here since it doesn't always work.
16847      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16848      if test -z "$is_absolute_path"; then
16849        # Path to executable is not absolute. Find it.
16850        IFS_save="$IFS"
16851        IFS=:
16852        for p in $PATH; do
16853          if test -f "$p/$path" && test -x "$p/$path"; then
16854            new_path="$p/$path"
16855            break
16856          fi
16857        done
16858        IFS="$IFS_save"
16859      else
16860        # This is an absolute path, we can use it without further modifications.
16861        new_path="$path"
16862      fi
16863
16864      if test "x$new_path" = x; then
16865        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16867        has_space=`$ECHO "$complete" | $GREP " "`
16868        if test "x$has_space" != x; then
16869          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16870$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16871        fi
16872        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16873      fi
16874    fi
16875
16876    # Now join together the path and the arguments once again
16877    if test "x$arguments" != xEOL; then
16878      new_complete="$new_path ${arguments% *}"
16879    else
16880      new_complete="$new_path"
16881    fi
16882
16883    if test "x$complete" != "x$new_complete"; then
16884      FOUND_MAKE="$new_complete"
16885      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16886$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16887    fi
16888  fi
16889
16890        fi
16891      fi
16892    fi
16893  fi
16894
16895        if test "x$FOUND_MAKE" = x; then
16896          for ac_prog in make
16897do
16898  # Extract the first word of "$ac_prog", so it can be a program name with args.
16899set dummy $ac_prog; ac_word=$2
16900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16901$as_echo_n "checking for $ac_word... " >&6; }
16902if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16903  $as_echo_n "(cached) " >&6
16904else
16905  case $CHECK_TOOLSDIR_MAKE in
16906  [\\/]* | ?:[\\/]*)
16907  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16908  ;;
16909  *)
16910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16911for as_dir in $PATH
16912do
16913  IFS=$as_save_IFS
16914  test -z "$as_dir" && as_dir=.
16915    for ac_exec_ext in '' $ac_executable_extensions; do
16916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16917    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16919    break 2
16920  fi
16921done
16922  done
16923IFS=$as_save_IFS
16924
16925  ;;
16926esac
16927fi
16928CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16929if test -n "$CHECK_TOOLSDIR_MAKE"; then
16930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16931$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16932else
16933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16934$as_echo "no" >&6; }
16935fi
16936
16937
16938  test -n "$CHECK_TOOLSDIR_MAKE" && break
16939done
16940
16941
16942  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16943  DESCRIPTION="make in tools-dir"
16944
16945  # On Cygwin, we require a newer version of make than on other platforms
16946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16947    MAKE_VERSION_EXPR="-e 4\."
16948    MAKE_REQUIRED_VERSION="4.0"
16949   else
16950    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16951    MAKE_REQUIRED_VERSION="3.81"
16952  fi
16953
16954  if test "x$MAKE_CANDIDATE" != x; then
16955    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16956$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16957    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16958    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16959    if test "x$IS_GNU_MAKE" = x; then
16960      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16961$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16962    else
16963      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16964      if test "x$IS_MODERN_MAKE" = x; then
16965        { $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
16966$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;}
16967      else
16968        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16969          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16970            MAKE_EXPECTED_ENV='cygwin'
16971          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16972            MAKE_EXPECTED_ENV='msys'
16973          else
16974            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16975          fi
16976          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16977          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16978        else
16979          # Not relevant for non-Windows
16980          IS_MAKE_CORRECT_ENV=true
16981        fi
16982        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16983          { $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
16984$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;}
16985        else
16986          FOUND_MAKE=$MAKE_CANDIDATE
16987
16988  # Only process if variable expands to non-empty
16989
16990  if test "x$FOUND_MAKE" != x; then
16991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16992
16993  # First separate the path from the arguments. This will split at the first
16994  # space.
16995  complete="$FOUND_MAKE"
16996  path="${complete%% *}"
16997  tmp="$complete EOL"
16998  arguments="${tmp#* }"
16999
17000  # Input might be given as Windows format, start by converting to
17001  # unix format.
17002  new_path=`$CYGPATH -u "$path"`
17003
17004  # Now try to locate executable using which
17005  new_path=`$WHICH "$new_path" 2> /dev/null`
17006  # bat and cmd files are not always considered executable in cygwin causing which
17007  # to not find them
17008  if test "x$new_path" = x \
17009      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17010      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17011    new_path=`$CYGPATH -u "$path"`
17012  fi
17013  if test "x$new_path" = x; then
17014    # Oops. Which didn't find the executable.
17015    # The splitting of arguments from the executable at a space might have been incorrect,
17016    # since paths with space are more likely in Windows. Give it another try with the whole
17017    # argument.
17018    path="$complete"
17019    arguments="EOL"
17020    new_path=`$CYGPATH -u "$path"`
17021    new_path=`$WHICH "$new_path" 2> /dev/null`
17022    # bat and cmd files are not always considered executable in cygwin causing which
17023    # to not find them
17024    if test "x$new_path" = x \
17025        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17026        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17027      new_path=`$CYGPATH -u "$path"`
17028    fi
17029    if test "x$new_path" = x; then
17030      # It's still not found. Now this is an unrecoverable error.
17031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17033      has_space=`$ECHO "$complete" | $GREP " "`
17034      if test "x$has_space" != x; then
17035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17037      fi
17038      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17039    fi
17040  fi
17041
17042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17045  # "foo.exe" is OK but "foo" is an error.
17046  #
17047  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17048  # It is also a way to make sure we got the proper file name for the real test later on.
17049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17050  if test "x$test_shortpath" = x; then
17051    # Short path failed, file does not exist as specified.
17052    # Try adding .exe or .cmd
17053    if test -f "${new_path}.exe"; then
17054      input_to_shortpath="${new_path}.exe"
17055    elif test -f "${new_path}.cmd"; then
17056      input_to_shortpath="${new_path}.cmd"
17057    else
17058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17060      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17061$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17062      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17063    fi
17064  else
17065    input_to_shortpath="$new_path"
17066  fi
17067
17068  # Call helper function which possibly converts this using DOS-style short mode.
17069  # If so, the updated path is stored in $new_path.
17070  new_path="$input_to_shortpath"
17071
17072  input_path="$input_to_shortpath"
17073  # Check if we need to convert this using DOS-style short mode. If the path
17074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17075  # take no chances and rewrite it.
17076  # Note: m4 eats our [], so we need to use [ and ] instead.
17077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17078  if test "x$has_forbidden_chars" != x; then
17079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17083      # Going to short mode and back again did indeed matter. Since short mode is
17084      # case insensitive, let's make it lowercase to improve readability.
17085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17086      # Now convert it back to Unix-style (cygpath)
17087      input_path=`$CYGPATH -u "$shortmode_path"`
17088      new_path="$input_path"
17089    fi
17090  fi
17091
17092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17093  if test "x$test_cygdrive_prefix" = x; then
17094    # As a simple fix, exclude /usr/bin since it's not a real path.
17095    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17097      # a path prefixed by /cygdrive for fixpath to work.
17098      new_path="$CYGWIN_ROOT_PATH$input_path"
17099    fi
17100  fi
17101
17102  # remove trailing .exe if any
17103  new_path="${new_path/%.exe/}"
17104
17105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17106
17107  # First separate the path from the arguments. This will split at the first
17108  # space.
17109  complete="$FOUND_MAKE"
17110  path="${complete%% *}"
17111  tmp="$complete EOL"
17112  arguments="${tmp#* }"
17113
17114  # Input might be given as Windows format, start by converting to
17115  # unix format.
17116  new_path="$path"
17117
17118  windows_path="$new_path"
17119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17120    unix_path=`$CYGPATH -u "$windows_path"`
17121    new_path="$unix_path"
17122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17124    new_path="$unix_path"
17125  fi
17126
17127
17128  # Now try to locate executable using which
17129  new_path=`$WHICH "$new_path" 2> /dev/null`
17130
17131  if test "x$new_path" = x; then
17132    # Oops. Which didn't find the executable.
17133    # The splitting of arguments from the executable at a space might have been incorrect,
17134    # since paths with space are more likely in Windows. Give it another try with the whole
17135    # argument.
17136    path="$complete"
17137    arguments="EOL"
17138    new_path="$path"
17139
17140  windows_path="$new_path"
17141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17142    unix_path=`$CYGPATH -u "$windows_path"`
17143    new_path="$unix_path"
17144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17146    new_path="$unix_path"
17147  fi
17148
17149
17150    new_path=`$WHICH "$new_path" 2> /dev/null`
17151    # bat and cmd files are not always considered executable in MSYS causing which
17152    # to not find them
17153    if test "x$new_path" = x \
17154        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17155        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17156      new_path="$path"
17157
17158  windows_path="$new_path"
17159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17160    unix_path=`$CYGPATH -u "$windows_path"`
17161    new_path="$unix_path"
17162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17164    new_path="$unix_path"
17165  fi
17166
17167    fi
17168
17169    if test "x$new_path" = x; then
17170      # It's still not found. Now this is an unrecoverable error.
17171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17172$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17173      has_space=`$ECHO "$complete" | $GREP " "`
17174      if test "x$has_space" != x; then
17175        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17176$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17177      fi
17178      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17179    fi
17180  fi
17181
17182  # Now new_path has a complete unix path to the binary
17183  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17184    # Keep paths in /bin as-is, but remove trailing .exe if any
17185    new_path="${new_path/%.exe/}"
17186    # Do not save /bin paths to all_fixpath_prefixes!
17187  else
17188    # Not in mixed or Windows style, start by that.
17189    new_path=`cmd //c echo $new_path`
17190
17191  input_path="$new_path"
17192  # Check if we need to convert this using DOS-style short mode. If the path
17193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17194  # take no chances and rewrite it.
17195  # Note: m4 eats our [], so we need to use [ and ] instead.
17196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17197  if test "x$has_forbidden_chars" != x; then
17198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17200  fi
17201
17202    # Output is in $new_path
17203
17204  windows_path="$new_path"
17205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17206    unix_path=`$CYGPATH -u "$windows_path"`
17207    new_path="$unix_path"
17208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17210    new_path="$unix_path"
17211  fi
17212
17213    # remove trailing .exe if any
17214    new_path="${new_path/%.exe/}"
17215
17216    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17217    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17218  fi
17219
17220    else
17221      # We're on a unix platform. Hooray! :)
17222      # First separate the path from the arguments. This will split at the first
17223      # space.
17224      complete="$FOUND_MAKE"
17225      path="${complete%% *}"
17226      tmp="$complete EOL"
17227      arguments="${tmp#* }"
17228
17229      # Cannot rely on the command "which" here since it doesn't always work.
17230      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17231      if test -z "$is_absolute_path"; then
17232        # Path to executable is not absolute. Find it.
17233        IFS_save="$IFS"
17234        IFS=:
17235        for p in $PATH; do
17236          if test -f "$p/$path" && test -x "$p/$path"; then
17237            new_path="$p/$path"
17238            break
17239          fi
17240        done
17241        IFS="$IFS_save"
17242      else
17243        # This is an absolute path, we can use it without further modifications.
17244        new_path="$path"
17245      fi
17246
17247      if test "x$new_path" = x; then
17248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17250        has_space=`$ECHO "$complete" | $GREP " "`
17251        if test "x$has_space" != x; then
17252          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17253$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17254        fi
17255        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17256      fi
17257    fi
17258
17259    # Now join together the path and the arguments once again
17260    if test "x$arguments" != xEOL; then
17261      new_complete="$new_path ${arguments% *}"
17262    else
17263      new_complete="$new_path"
17264    fi
17265
17266    if test "x$complete" != "x$new_complete"; then
17267      FOUND_MAKE="$new_complete"
17268      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17269$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17270    fi
17271  fi
17272
17273        fi
17274      fi
17275    fi
17276  fi
17277
17278        fi
17279        PATH=$OLD_PATH
17280      fi
17281    fi
17282
17283    if test "x$FOUND_MAKE" = x; then
17284      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
17285    fi
17286  fi
17287
17288  MAKE=$FOUND_MAKE
17289
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17291$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17292
17293
17294  # Check if make supports the output sync option and if so, setup using it.
17295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17296$as_echo_n "checking if make --output-sync is supported... " >&6; }
17297  if $MAKE --version -O > /dev/null 2>&1; then
17298    OUTPUT_SYNC_SUPPORTED=true
17299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17300$as_echo "yes" >&6; }
17301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17302$as_echo_n "checking for output-sync value... " >&6; }
17303
17304# Check whether --with-output-sync was given.
17305if test "${with_output_sync+set}" = set; then :
17306  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17307fi
17308
17309    if test "x$OUTPUT_SYNC" = "x"; then
17310      OUTPUT_SYNC=none
17311    fi
17312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17313$as_echo "$OUTPUT_SYNC" >&6; }
17314    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17315      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17316    fi
17317  else
17318    OUTPUT_SYNC_SUPPORTED=false
17319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17320$as_echo "no" >&6; }
17321  fi
17322
17323
17324
17325
17326
17327
17328  # Test if find supports -delete
17329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17330$as_echo_n "checking if find supports -delete... " >&6; }
17331  FIND_DELETE="-delete"
17332
17333  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17334
17335  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17336
17337  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17338  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17339    # No, it does not.
17340    rm $DELETEDIR/TestIfFindSupportsDelete
17341    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17342      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17343      FIND_DELETE="-print | xargs rm"
17344    else
17345      FIND_DELETE="-exec rm \{\} \+"
17346    fi
17347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348$as_echo "no" >&6; }
17349  else
17350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17351$as_echo "yes" >&6; }
17352  fi
17353  rmdir $DELETEDIR
17354
17355
17356
17357  # These tools might not be installed by default,
17358  # need hint on how to install them.
17359
17360
17361
17362  # Publish this variable in the help.
17363
17364
17365  if test "x$UNZIP" = x; then
17366    # The variable is not set by user, try to locate tool using the code snippet
17367    for ac_prog in unzip
17368do
17369  # Extract the first word of "$ac_prog", so it can be a program name with args.
17370set dummy $ac_prog; ac_word=$2
17371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17372$as_echo_n "checking for $ac_word... " >&6; }
17373if ${ac_cv_path_UNZIP+:} false; then :
17374  $as_echo_n "(cached) " >&6
17375else
17376  case $UNZIP in
17377  [\\/]* | ?:[\\/]*)
17378  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17379  ;;
17380  *)
17381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17382for as_dir in $PATH
17383do
17384  IFS=$as_save_IFS
17385  test -z "$as_dir" && as_dir=.
17386    for ac_exec_ext in '' $ac_executable_extensions; do
17387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17388    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17390    break 2
17391  fi
17392done
17393  done
17394IFS=$as_save_IFS
17395
17396  ;;
17397esac
17398fi
17399UNZIP=$ac_cv_path_UNZIP
17400if test -n "$UNZIP"; then
17401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17402$as_echo "$UNZIP" >&6; }
17403else
17404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17405$as_echo "no" >&6; }
17406fi
17407
17408
17409  test -n "$UNZIP" && break
17410done
17411
17412  else
17413    # The variable is set, but is it from the command line or the environment?
17414
17415    # Try to remove the string !UNZIP! from our list.
17416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17418      # If it failed, the variable was not from the command line. Ignore it,
17419      # but warn the user (except for BASH, which is always set by the calling BASH).
17420      if test "xUNZIP" != xBASH; then
17421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17422$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17423      fi
17424      # Try to locate tool using the code snippet
17425      for ac_prog in unzip
17426do
17427  # Extract the first word of "$ac_prog", so it can be a program name with args.
17428set dummy $ac_prog; ac_word=$2
17429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17430$as_echo_n "checking for $ac_word... " >&6; }
17431if ${ac_cv_path_UNZIP+:} false; then :
17432  $as_echo_n "(cached) " >&6
17433else
17434  case $UNZIP in
17435  [\\/]* | ?:[\\/]*)
17436  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17437  ;;
17438  *)
17439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17440for as_dir in $PATH
17441do
17442  IFS=$as_save_IFS
17443  test -z "$as_dir" && as_dir=.
17444    for ac_exec_ext in '' $ac_executable_extensions; do
17445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17446    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17448    break 2
17449  fi
17450done
17451  done
17452IFS=$as_save_IFS
17453
17454  ;;
17455esac
17456fi
17457UNZIP=$ac_cv_path_UNZIP
17458if test -n "$UNZIP"; then
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17460$as_echo "$UNZIP" >&6; }
17461else
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17463$as_echo "no" >&6; }
17464fi
17465
17466
17467  test -n "$UNZIP" && break
17468done
17469
17470    else
17471      # If it succeeded, then it was overridden by the user. We will use it
17472      # for the tool.
17473
17474      # First remove it from the list of overridden variables, so we can test
17475      # for unknown variables in the end.
17476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17477
17478      # Check if the provided tool contains a complete path.
17479      tool_specified="$UNZIP"
17480      tool_basename="${tool_specified##*/}"
17481      if test "x$tool_basename" = "x$tool_specified"; then
17482        # A command without a complete path is provided, search $PATH.
17483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17484$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17485        # Extract the first word of "$tool_basename", so it can be a program name with args.
17486set dummy $tool_basename; ac_word=$2
17487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17488$as_echo_n "checking for $ac_word... " >&6; }
17489if ${ac_cv_path_UNZIP+:} false; then :
17490  $as_echo_n "(cached) " >&6
17491else
17492  case $UNZIP in
17493  [\\/]* | ?:[\\/]*)
17494  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17495  ;;
17496  *)
17497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17498for as_dir in $PATH
17499do
17500  IFS=$as_save_IFS
17501  test -z "$as_dir" && as_dir=.
17502    for ac_exec_ext in '' $ac_executable_extensions; do
17503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17504    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17506    break 2
17507  fi
17508done
17509  done
17510IFS=$as_save_IFS
17511
17512  ;;
17513esac
17514fi
17515UNZIP=$ac_cv_path_UNZIP
17516if test -n "$UNZIP"; then
17517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17518$as_echo "$UNZIP" >&6; }
17519else
17520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521$as_echo "no" >&6; }
17522fi
17523
17524
17525        if test "x$UNZIP" = x; then
17526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17527        fi
17528      else
17529        # Otherwise we believe it is a complete path. Use it as it is.
17530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17531$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17533$as_echo_n "checking for UNZIP... " >&6; }
17534        if test ! -x "$tool_specified"; then
17535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17536$as_echo "not found" >&6; }
17537          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17538        fi
17539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17540$as_echo "$tool_specified" >&6; }
17541      fi
17542    fi
17543  fi
17544
17545
17546
17547  if test "x$UNZIP" = x; then
17548    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17549  fi
17550
17551
17552
17553
17554
17555  # Publish this variable in the help.
17556
17557
17558  if test "x$ZIP" = x; then
17559    # The variable is not set by user, try to locate tool using the code snippet
17560    for ac_prog in zip
17561do
17562  # Extract the first word of "$ac_prog", so it can be a program name with args.
17563set dummy $ac_prog; ac_word=$2
17564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17565$as_echo_n "checking for $ac_word... " >&6; }
17566if ${ac_cv_path_ZIP+:} false; then :
17567  $as_echo_n "(cached) " >&6
17568else
17569  case $ZIP in
17570  [\\/]* | ?:[\\/]*)
17571  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17572  ;;
17573  *)
17574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17575for as_dir in $PATH
17576do
17577  IFS=$as_save_IFS
17578  test -z "$as_dir" && as_dir=.
17579    for ac_exec_ext in '' $ac_executable_extensions; do
17580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17581    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17583    break 2
17584  fi
17585done
17586  done
17587IFS=$as_save_IFS
17588
17589  ;;
17590esac
17591fi
17592ZIP=$ac_cv_path_ZIP
17593if test -n "$ZIP"; then
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17595$as_echo "$ZIP" >&6; }
17596else
17597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17598$as_echo "no" >&6; }
17599fi
17600
17601
17602  test -n "$ZIP" && break
17603done
17604
17605  else
17606    # The variable is set, but is it from the command line or the environment?
17607
17608    # Try to remove the string !ZIP! from our list.
17609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17611      # If it failed, the variable was not from the command line. Ignore it,
17612      # but warn the user (except for BASH, which is always set by the calling BASH).
17613      if test "xZIP" != xBASH; then
17614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17615$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17616      fi
17617      # Try to locate tool using the code snippet
17618      for ac_prog in zip
17619do
17620  # Extract the first word of "$ac_prog", so it can be a program name with args.
17621set dummy $ac_prog; ac_word=$2
17622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17623$as_echo_n "checking for $ac_word... " >&6; }
17624if ${ac_cv_path_ZIP+:} false; then :
17625  $as_echo_n "(cached) " >&6
17626else
17627  case $ZIP in
17628  [\\/]* | ?:[\\/]*)
17629  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17630  ;;
17631  *)
17632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17633for as_dir in $PATH
17634do
17635  IFS=$as_save_IFS
17636  test -z "$as_dir" && as_dir=.
17637    for ac_exec_ext in '' $ac_executable_extensions; do
17638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17639    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17641    break 2
17642  fi
17643done
17644  done
17645IFS=$as_save_IFS
17646
17647  ;;
17648esac
17649fi
17650ZIP=$ac_cv_path_ZIP
17651if test -n "$ZIP"; then
17652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17653$as_echo "$ZIP" >&6; }
17654else
17655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17656$as_echo "no" >&6; }
17657fi
17658
17659
17660  test -n "$ZIP" && break
17661done
17662
17663    else
17664      # If it succeeded, then it was overridden by the user. We will use it
17665      # for the tool.
17666
17667      # First remove it from the list of overridden variables, so we can test
17668      # for unknown variables in the end.
17669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17670
17671      # Check if the provided tool contains a complete path.
17672      tool_specified="$ZIP"
17673      tool_basename="${tool_specified##*/}"
17674      if test "x$tool_basename" = "x$tool_specified"; then
17675        # A command without a complete path is provided, search $PATH.
17676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17677$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17678        # Extract the first word of "$tool_basename", so it can be a program name with args.
17679set dummy $tool_basename; ac_word=$2
17680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17681$as_echo_n "checking for $ac_word... " >&6; }
17682if ${ac_cv_path_ZIP+:} false; then :
17683  $as_echo_n "(cached) " >&6
17684else
17685  case $ZIP in
17686  [\\/]* | ?:[\\/]*)
17687  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17688  ;;
17689  *)
17690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17691for as_dir in $PATH
17692do
17693  IFS=$as_save_IFS
17694  test -z "$as_dir" && as_dir=.
17695    for ac_exec_ext in '' $ac_executable_extensions; do
17696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17697    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17699    break 2
17700  fi
17701done
17702  done
17703IFS=$as_save_IFS
17704
17705  ;;
17706esac
17707fi
17708ZIP=$ac_cv_path_ZIP
17709if test -n "$ZIP"; then
17710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17711$as_echo "$ZIP" >&6; }
17712else
17713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17714$as_echo "no" >&6; }
17715fi
17716
17717
17718        if test "x$ZIP" = x; then
17719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17720        fi
17721      else
17722        # Otherwise we believe it is a complete path. Use it as it is.
17723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17724$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17726$as_echo_n "checking for ZIP... " >&6; }
17727        if test ! -x "$tool_specified"; then
17728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17729$as_echo "not found" >&6; }
17730          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17731        fi
17732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17733$as_echo "$tool_specified" >&6; }
17734      fi
17735    fi
17736  fi
17737
17738
17739
17740  if test "x$ZIP" = x; then
17741    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17742  fi
17743
17744
17745
17746  # Non-required basic tools
17747
17748
17749
17750  # Publish this variable in the help.
17751
17752
17753  if test "x$LDD" = x; then
17754    # The variable is not set by user, try to locate tool using the code snippet
17755    for ac_prog in ldd
17756do
17757  # Extract the first word of "$ac_prog", so it can be a program name with args.
17758set dummy $ac_prog; ac_word=$2
17759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17760$as_echo_n "checking for $ac_word... " >&6; }
17761if ${ac_cv_path_LDD+:} false; then :
17762  $as_echo_n "(cached) " >&6
17763else
17764  case $LDD in
17765  [\\/]* | ?:[\\/]*)
17766  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17767  ;;
17768  *)
17769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17770for as_dir in $PATH
17771do
17772  IFS=$as_save_IFS
17773  test -z "$as_dir" && as_dir=.
17774    for ac_exec_ext in '' $ac_executable_extensions; do
17775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17776    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17778    break 2
17779  fi
17780done
17781  done
17782IFS=$as_save_IFS
17783
17784  ;;
17785esac
17786fi
17787LDD=$ac_cv_path_LDD
17788if test -n "$LDD"; then
17789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17790$as_echo "$LDD" >&6; }
17791else
17792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17793$as_echo "no" >&6; }
17794fi
17795
17796
17797  test -n "$LDD" && break
17798done
17799
17800  else
17801    # The variable is set, but is it from the command line or the environment?
17802
17803    # Try to remove the string !LDD! from our list.
17804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17806      # If it failed, the variable was not from the command line. Ignore it,
17807      # but warn the user (except for BASH, which is always set by the calling BASH).
17808      if test "xLDD" != xBASH; then
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17810$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17811      fi
17812      # Try to locate tool using the code snippet
17813      for ac_prog in ldd
17814do
17815  # Extract the first word of "$ac_prog", so it can be a program name with args.
17816set dummy $ac_prog; ac_word=$2
17817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17818$as_echo_n "checking for $ac_word... " >&6; }
17819if ${ac_cv_path_LDD+:} false; then :
17820  $as_echo_n "(cached) " >&6
17821else
17822  case $LDD in
17823  [\\/]* | ?:[\\/]*)
17824  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17825  ;;
17826  *)
17827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17828for as_dir in $PATH
17829do
17830  IFS=$as_save_IFS
17831  test -z "$as_dir" && as_dir=.
17832    for ac_exec_ext in '' $ac_executable_extensions; do
17833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17834    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17836    break 2
17837  fi
17838done
17839  done
17840IFS=$as_save_IFS
17841
17842  ;;
17843esac
17844fi
17845LDD=$ac_cv_path_LDD
17846if test -n "$LDD"; then
17847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17848$as_echo "$LDD" >&6; }
17849else
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17851$as_echo "no" >&6; }
17852fi
17853
17854
17855  test -n "$LDD" && break
17856done
17857
17858    else
17859      # If it succeeded, then it was overridden by the user. We will use it
17860      # for the tool.
17861
17862      # First remove it from the list of overridden variables, so we can test
17863      # for unknown variables in the end.
17864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17865
17866      # Check if the provided tool contains a complete path.
17867      tool_specified="$LDD"
17868      tool_basename="${tool_specified##*/}"
17869      if test "x$tool_basename" = "x$tool_specified"; then
17870        # A command without a complete path is provided, search $PATH.
17871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17872$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17873        # Extract the first word of "$tool_basename", so it can be a program name with args.
17874set dummy $tool_basename; ac_word=$2
17875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17876$as_echo_n "checking for $ac_word... " >&6; }
17877if ${ac_cv_path_LDD+:} false; then :
17878  $as_echo_n "(cached) " >&6
17879else
17880  case $LDD in
17881  [\\/]* | ?:[\\/]*)
17882  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17883  ;;
17884  *)
17885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17886for as_dir in $PATH
17887do
17888  IFS=$as_save_IFS
17889  test -z "$as_dir" && as_dir=.
17890    for ac_exec_ext in '' $ac_executable_extensions; do
17891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17892    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17894    break 2
17895  fi
17896done
17897  done
17898IFS=$as_save_IFS
17899
17900  ;;
17901esac
17902fi
17903LDD=$ac_cv_path_LDD
17904if test -n "$LDD"; then
17905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17906$as_echo "$LDD" >&6; }
17907else
17908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17909$as_echo "no" >&6; }
17910fi
17911
17912
17913        if test "x$LDD" = x; then
17914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17915        fi
17916      else
17917        # Otherwise we believe it is a complete path. Use it as it is.
17918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17919$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17921$as_echo_n "checking for LDD... " >&6; }
17922        if test ! -x "$tool_specified"; then
17923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17924$as_echo "not found" >&6; }
17925          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17926        fi
17927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17928$as_echo "$tool_specified" >&6; }
17929      fi
17930    fi
17931  fi
17932
17933
17934  if test "x$LDD" = "x"; then
17935    # List shared lib dependencies is used for
17936    # debug output and checking for forbidden dependencies.
17937    # We can build without it.
17938    LDD="true"
17939  fi
17940
17941
17942  # Publish this variable in the help.
17943
17944
17945  if test "x$OTOOL" = x; then
17946    # The variable is not set by user, try to locate tool using the code snippet
17947    for ac_prog in otool
17948do
17949  # Extract the first word of "$ac_prog", so it can be a program name with args.
17950set dummy $ac_prog; ac_word=$2
17951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17952$as_echo_n "checking for $ac_word... " >&6; }
17953if ${ac_cv_path_OTOOL+:} false; then :
17954  $as_echo_n "(cached) " >&6
17955else
17956  case $OTOOL in
17957  [\\/]* | ?:[\\/]*)
17958  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17959  ;;
17960  *)
17961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17962for as_dir in $PATH
17963do
17964  IFS=$as_save_IFS
17965  test -z "$as_dir" && as_dir=.
17966    for ac_exec_ext in '' $ac_executable_extensions; do
17967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17968    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17970    break 2
17971  fi
17972done
17973  done
17974IFS=$as_save_IFS
17975
17976  ;;
17977esac
17978fi
17979OTOOL=$ac_cv_path_OTOOL
17980if test -n "$OTOOL"; then
17981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17982$as_echo "$OTOOL" >&6; }
17983else
17984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17985$as_echo "no" >&6; }
17986fi
17987
17988
17989  test -n "$OTOOL" && break
17990done
17991
17992  else
17993    # The variable is set, but is it from the command line or the environment?
17994
17995    # Try to remove the string !OTOOL! from our list.
17996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17998      # If it failed, the variable was not from the command line. Ignore it,
17999      # but warn the user (except for BASH, which is always set by the calling BASH).
18000      if test "xOTOOL" != xBASH; then
18001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18002$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18003      fi
18004      # Try to locate tool using the code snippet
18005      for ac_prog in otool
18006do
18007  # Extract the first word of "$ac_prog", so it can be a program name with args.
18008set dummy $ac_prog; ac_word=$2
18009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18010$as_echo_n "checking for $ac_word... " >&6; }
18011if ${ac_cv_path_OTOOL+:} false; then :
18012  $as_echo_n "(cached) " >&6
18013else
18014  case $OTOOL in
18015  [\\/]* | ?:[\\/]*)
18016  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18017  ;;
18018  *)
18019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18020for as_dir in $PATH
18021do
18022  IFS=$as_save_IFS
18023  test -z "$as_dir" && as_dir=.
18024    for ac_exec_ext in '' $ac_executable_extensions; do
18025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18026    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18028    break 2
18029  fi
18030done
18031  done
18032IFS=$as_save_IFS
18033
18034  ;;
18035esac
18036fi
18037OTOOL=$ac_cv_path_OTOOL
18038if test -n "$OTOOL"; then
18039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18040$as_echo "$OTOOL" >&6; }
18041else
18042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18043$as_echo "no" >&6; }
18044fi
18045
18046
18047  test -n "$OTOOL" && break
18048done
18049
18050    else
18051      # If it succeeded, then it was overridden by the user. We will use it
18052      # for the tool.
18053
18054      # First remove it from the list of overridden variables, so we can test
18055      # for unknown variables in the end.
18056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18057
18058      # Check if the provided tool contains a complete path.
18059      tool_specified="$OTOOL"
18060      tool_basename="${tool_specified##*/}"
18061      if test "x$tool_basename" = "x$tool_specified"; then
18062        # A command without a complete path is provided, search $PATH.
18063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18064$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18065        # Extract the first word of "$tool_basename", so it can be a program name with args.
18066set dummy $tool_basename; ac_word=$2
18067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18068$as_echo_n "checking for $ac_word... " >&6; }
18069if ${ac_cv_path_OTOOL+:} false; then :
18070  $as_echo_n "(cached) " >&6
18071else
18072  case $OTOOL in
18073  [\\/]* | ?:[\\/]*)
18074  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18075  ;;
18076  *)
18077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18078for as_dir in $PATH
18079do
18080  IFS=$as_save_IFS
18081  test -z "$as_dir" && as_dir=.
18082    for ac_exec_ext in '' $ac_executable_extensions; do
18083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18084    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18086    break 2
18087  fi
18088done
18089  done
18090IFS=$as_save_IFS
18091
18092  ;;
18093esac
18094fi
18095OTOOL=$ac_cv_path_OTOOL
18096if test -n "$OTOOL"; then
18097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18098$as_echo "$OTOOL" >&6; }
18099else
18100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18101$as_echo "no" >&6; }
18102fi
18103
18104
18105        if test "x$OTOOL" = x; then
18106          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18107        fi
18108      else
18109        # Otherwise we believe it is a complete path. Use it as it is.
18110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18111$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18113$as_echo_n "checking for OTOOL... " >&6; }
18114        if test ! -x "$tool_specified"; then
18115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18116$as_echo "not found" >&6; }
18117          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18118        fi
18119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18120$as_echo "$tool_specified" >&6; }
18121      fi
18122    fi
18123  fi
18124
18125
18126  if test "x$OTOOL" = "x"; then
18127    OTOOL="true"
18128  fi
18129
18130
18131  # Publish this variable in the help.
18132
18133
18134  if test "x$READELF" = x; then
18135    # The variable is not set by user, try to locate tool using the code snippet
18136    for ac_prog in greadelf readelf
18137do
18138  # Extract the first word of "$ac_prog", so it can be a program name with args.
18139set dummy $ac_prog; ac_word=$2
18140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18141$as_echo_n "checking for $ac_word... " >&6; }
18142if ${ac_cv_path_READELF+:} false; then :
18143  $as_echo_n "(cached) " >&6
18144else
18145  case $READELF in
18146  [\\/]* | ?:[\\/]*)
18147  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18148  ;;
18149  *)
18150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18151for as_dir in $PATH
18152do
18153  IFS=$as_save_IFS
18154  test -z "$as_dir" && as_dir=.
18155    for ac_exec_ext in '' $ac_executable_extensions; do
18156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18157    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18159    break 2
18160  fi
18161done
18162  done
18163IFS=$as_save_IFS
18164
18165  ;;
18166esac
18167fi
18168READELF=$ac_cv_path_READELF
18169if test -n "$READELF"; then
18170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18171$as_echo "$READELF" >&6; }
18172else
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18174$as_echo "no" >&6; }
18175fi
18176
18177
18178  test -n "$READELF" && break
18179done
18180
18181  else
18182    # The variable is set, but is it from the command line or the environment?
18183
18184    # Try to remove the string !READELF! from our list.
18185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18187      # If it failed, the variable was not from the command line. Ignore it,
18188      # but warn the user (except for BASH, which is always set by the calling BASH).
18189      if test "xREADELF" != xBASH; then
18190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18191$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18192      fi
18193      # Try to locate tool using the code snippet
18194      for ac_prog in greadelf readelf
18195do
18196  # Extract the first word of "$ac_prog", so it can be a program name with args.
18197set dummy $ac_prog; ac_word=$2
18198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18199$as_echo_n "checking for $ac_word... " >&6; }
18200if ${ac_cv_path_READELF+:} false; then :
18201  $as_echo_n "(cached) " >&6
18202else
18203  case $READELF in
18204  [\\/]* | ?:[\\/]*)
18205  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18206  ;;
18207  *)
18208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18209for as_dir in $PATH
18210do
18211  IFS=$as_save_IFS
18212  test -z "$as_dir" && as_dir=.
18213    for ac_exec_ext in '' $ac_executable_extensions; do
18214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18215    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18217    break 2
18218  fi
18219done
18220  done
18221IFS=$as_save_IFS
18222
18223  ;;
18224esac
18225fi
18226READELF=$ac_cv_path_READELF
18227if test -n "$READELF"; then
18228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18229$as_echo "$READELF" >&6; }
18230else
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18232$as_echo "no" >&6; }
18233fi
18234
18235
18236  test -n "$READELF" && break
18237done
18238
18239    else
18240      # If it succeeded, then it was overridden by the user. We will use it
18241      # for the tool.
18242
18243      # First remove it from the list of overridden variables, so we can test
18244      # for unknown variables in the end.
18245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18246
18247      # Check if the provided tool contains a complete path.
18248      tool_specified="$READELF"
18249      tool_basename="${tool_specified##*/}"
18250      if test "x$tool_basename" = "x$tool_specified"; then
18251        # A command without a complete path is provided, search $PATH.
18252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18253$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18254        # Extract the first word of "$tool_basename", so it can be a program name with args.
18255set dummy $tool_basename; ac_word=$2
18256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18257$as_echo_n "checking for $ac_word... " >&6; }
18258if ${ac_cv_path_READELF+:} false; then :
18259  $as_echo_n "(cached) " >&6
18260else
18261  case $READELF in
18262  [\\/]* | ?:[\\/]*)
18263  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18264  ;;
18265  *)
18266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18267for as_dir in $PATH
18268do
18269  IFS=$as_save_IFS
18270  test -z "$as_dir" && as_dir=.
18271    for ac_exec_ext in '' $ac_executable_extensions; do
18272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18273    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18275    break 2
18276  fi
18277done
18278  done
18279IFS=$as_save_IFS
18280
18281  ;;
18282esac
18283fi
18284READELF=$ac_cv_path_READELF
18285if test -n "$READELF"; then
18286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18287$as_echo "$READELF" >&6; }
18288else
18289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18290$as_echo "no" >&6; }
18291fi
18292
18293
18294        if test "x$READELF" = x; then
18295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18296        fi
18297      else
18298        # Otherwise we believe it is a complete path. Use it as it is.
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18300$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18302$as_echo_n "checking for READELF... " >&6; }
18303        if test ! -x "$tool_specified"; then
18304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18305$as_echo "not found" >&6; }
18306          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18307        fi
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18309$as_echo "$tool_specified" >&6; }
18310      fi
18311    fi
18312  fi
18313
18314
18315
18316
18317  # Publish this variable in the help.
18318
18319
18320  if test "x$HG" = x; then
18321    # The variable is not set by user, try to locate tool using the code snippet
18322    for ac_prog in hg
18323do
18324  # Extract the first word of "$ac_prog", so it can be a program name with args.
18325set dummy $ac_prog; ac_word=$2
18326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18327$as_echo_n "checking for $ac_word... " >&6; }
18328if ${ac_cv_path_HG+:} false; then :
18329  $as_echo_n "(cached) " >&6
18330else
18331  case $HG in
18332  [\\/]* | ?:[\\/]*)
18333  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18334  ;;
18335  *)
18336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337for as_dir in $PATH
18338do
18339  IFS=$as_save_IFS
18340  test -z "$as_dir" && as_dir=.
18341    for ac_exec_ext in '' $ac_executable_extensions; do
18342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18343    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345    break 2
18346  fi
18347done
18348  done
18349IFS=$as_save_IFS
18350
18351  ;;
18352esac
18353fi
18354HG=$ac_cv_path_HG
18355if test -n "$HG"; then
18356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18357$as_echo "$HG" >&6; }
18358else
18359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360$as_echo "no" >&6; }
18361fi
18362
18363
18364  test -n "$HG" && break
18365done
18366
18367  else
18368    # The variable is set, but is it from the command line or the environment?
18369
18370    # Try to remove the string !HG! from our list.
18371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18373      # If it failed, the variable was not from the command line. Ignore it,
18374      # but warn the user (except for BASH, which is always set by the calling BASH).
18375      if test "xHG" != xBASH; then
18376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18377$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18378      fi
18379      # Try to locate tool using the code snippet
18380      for ac_prog in hg
18381do
18382  # Extract the first word of "$ac_prog", so it can be a program name with args.
18383set dummy $ac_prog; ac_word=$2
18384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18385$as_echo_n "checking for $ac_word... " >&6; }
18386if ${ac_cv_path_HG+:} false; then :
18387  $as_echo_n "(cached) " >&6
18388else
18389  case $HG in
18390  [\\/]* | ?:[\\/]*)
18391  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18392  ;;
18393  *)
18394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18395for as_dir in $PATH
18396do
18397  IFS=$as_save_IFS
18398  test -z "$as_dir" && as_dir=.
18399    for ac_exec_ext in '' $ac_executable_extensions; do
18400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18401    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18403    break 2
18404  fi
18405done
18406  done
18407IFS=$as_save_IFS
18408
18409  ;;
18410esac
18411fi
18412HG=$ac_cv_path_HG
18413if test -n "$HG"; then
18414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18415$as_echo "$HG" >&6; }
18416else
18417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18418$as_echo "no" >&6; }
18419fi
18420
18421
18422  test -n "$HG" && break
18423done
18424
18425    else
18426      # If it succeeded, then it was overridden by the user. We will use it
18427      # for the tool.
18428
18429      # First remove it from the list of overridden variables, so we can test
18430      # for unknown variables in the end.
18431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18432
18433      # Check if the provided tool contains a complete path.
18434      tool_specified="$HG"
18435      tool_basename="${tool_specified##*/}"
18436      if test "x$tool_basename" = "x$tool_specified"; then
18437        # A command without a complete path is provided, search $PATH.
18438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18439$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18440        # Extract the first word of "$tool_basename", so it can be a program name with args.
18441set dummy $tool_basename; ac_word=$2
18442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18443$as_echo_n "checking for $ac_word... " >&6; }
18444if ${ac_cv_path_HG+:} false; then :
18445  $as_echo_n "(cached) " >&6
18446else
18447  case $HG in
18448  [\\/]* | ?:[\\/]*)
18449  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18450  ;;
18451  *)
18452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18453for as_dir in $PATH
18454do
18455  IFS=$as_save_IFS
18456  test -z "$as_dir" && as_dir=.
18457    for ac_exec_ext in '' $ac_executable_extensions; do
18458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18459    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18461    break 2
18462  fi
18463done
18464  done
18465IFS=$as_save_IFS
18466
18467  ;;
18468esac
18469fi
18470HG=$ac_cv_path_HG
18471if test -n "$HG"; then
18472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18473$as_echo "$HG" >&6; }
18474else
18475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18476$as_echo "no" >&6; }
18477fi
18478
18479
18480        if test "x$HG" = x; then
18481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18482        fi
18483      else
18484        # Otherwise we believe it is a complete path. Use it as it is.
18485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18486$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18488$as_echo_n "checking for HG... " >&6; }
18489        if test ! -x "$tool_specified"; then
18490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18491$as_echo "not found" >&6; }
18492          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18493        fi
18494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18495$as_echo "$tool_specified" >&6; }
18496      fi
18497    fi
18498  fi
18499
18500
18501
18502
18503  # Publish this variable in the help.
18504
18505
18506  if test "x$STAT" = x; then
18507    # The variable is not set by user, try to locate tool using the code snippet
18508    for ac_prog in stat
18509do
18510  # Extract the first word of "$ac_prog", so it can be a program name with args.
18511set dummy $ac_prog; ac_word=$2
18512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18513$as_echo_n "checking for $ac_word... " >&6; }
18514if ${ac_cv_path_STAT+:} false; then :
18515  $as_echo_n "(cached) " >&6
18516else
18517  case $STAT in
18518  [\\/]* | ?:[\\/]*)
18519  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18520  ;;
18521  *)
18522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18523for as_dir in $PATH
18524do
18525  IFS=$as_save_IFS
18526  test -z "$as_dir" && as_dir=.
18527    for ac_exec_ext in '' $ac_executable_extensions; do
18528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18529    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18531    break 2
18532  fi
18533done
18534  done
18535IFS=$as_save_IFS
18536
18537  ;;
18538esac
18539fi
18540STAT=$ac_cv_path_STAT
18541if test -n "$STAT"; then
18542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18543$as_echo "$STAT" >&6; }
18544else
18545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18546$as_echo "no" >&6; }
18547fi
18548
18549
18550  test -n "$STAT" && break
18551done
18552
18553  else
18554    # The variable is set, but is it from the command line or the environment?
18555
18556    # Try to remove the string !STAT! from our list.
18557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18559      # If it failed, the variable was not from the command line. Ignore it,
18560      # but warn the user (except for BASH, which is always set by the calling BASH).
18561      if test "xSTAT" != xBASH; then
18562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18563$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18564      fi
18565      # Try to locate tool using the code snippet
18566      for ac_prog in stat
18567do
18568  # Extract the first word of "$ac_prog", so it can be a program name with args.
18569set dummy $ac_prog; ac_word=$2
18570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18571$as_echo_n "checking for $ac_word... " >&6; }
18572if ${ac_cv_path_STAT+:} false; then :
18573  $as_echo_n "(cached) " >&6
18574else
18575  case $STAT in
18576  [\\/]* | ?:[\\/]*)
18577  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18578  ;;
18579  *)
18580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18581for as_dir in $PATH
18582do
18583  IFS=$as_save_IFS
18584  test -z "$as_dir" && as_dir=.
18585    for ac_exec_ext in '' $ac_executable_extensions; do
18586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18587    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18589    break 2
18590  fi
18591done
18592  done
18593IFS=$as_save_IFS
18594
18595  ;;
18596esac
18597fi
18598STAT=$ac_cv_path_STAT
18599if test -n "$STAT"; then
18600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18601$as_echo "$STAT" >&6; }
18602else
18603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18604$as_echo "no" >&6; }
18605fi
18606
18607
18608  test -n "$STAT" && break
18609done
18610
18611    else
18612      # If it succeeded, then it was overridden by the user. We will use it
18613      # for the tool.
18614
18615      # First remove it from the list of overridden variables, so we can test
18616      # for unknown variables in the end.
18617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18618
18619      # Check if the provided tool contains a complete path.
18620      tool_specified="$STAT"
18621      tool_basename="${tool_specified##*/}"
18622      if test "x$tool_basename" = "x$tool_specified"; then
18623        # A command without a complete path is provided, search $PATH.
18624        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18625$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18626        # Extract the first word of "$tool_basename", so it can be a program name with args.
18627set dummy $tool_basename; ac_word=$2
18628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18629$as_echo_n "checking for $ac_word... " >&6; }
18630if ${ac_cv_path_STAT+:} false; then :
18631  $as_echo_n "(cached) " >&6
18632else
18633  case $STAT in
18634  [\\/]* | ?:[\\/]*)
18635  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18636  ;;
18637  *)
18638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639for as_dir in $PATH
18640do
18641  IFS=$as_save_IFS
18642  test -z "$as_dir" && as_dir=.
18643    for ac_exec_ext in '' $ac_executable_extensions; do
18644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18645    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18647    break 2
18648  fi
18649done
18650  done
18651IFS=$as_save_IFS
18652
18653  ;;
18654esac
18655fi
18656STAT=$ac_cv_path_STAT
18657if test -n "$STAT"; then
18658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18659$as_echo "$STAT" >&6; }
18660else
18661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18662$as_echo "no" >&6; }
18663fi
18664
18665
18666        if test "x$STAT" = x; then
18667          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18668        fi
18669      else
18670        # Otherwise we believe it is a complete path. Use it as it is.
18671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18672$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18674$as_echo_n "checking for STAT... " >&6; }
18675        if test ! -x "$tool_specified"; then
18676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18677$as_echo "not found" >&6; }
18678          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18679        fi
18680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18681$as_echo "$tool_specified" >&6; }
18682      fi
18683    fi
18684  fi
18685
18686
18687
18688
18689  # Publish this variable in the help.
18690
18691
18692  if test "x$TIME" = x; then
18693    # The variable is not set by user, try to locate tool using the code snippet
18694    for ac_prog in time
18695do
18696  # Extract the first word of "$ac_prog", so it can be a program name with args.
18697set dummy $ac_prog; ac_word=$2
18698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18699$as_echo_n "checking for $ac_word... " >&6; }
18700if ${ac_cv_path_TIME+:} false; then :
18701  $as_echo_n "(cached) " >&6
18702else
18703  case $TIME in
18704  [\\/]* | ?:[\\/]*)
18705  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18706  ;;
18707  *)
18708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18709for as_dir in $PATH
18710do
18711  IFS=$as_save_IFS
18712  test -z "$as_dir" && as_dir=.
18713    for ac_exec_ext in '' $ac_executable_extensions; do
18714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18715    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18717    break 2
18718  fi
18719done
18720  done
18721IFS=$as_save_IFS
18722
18723  ;;
18724esac
18725fi
18726TIME=$ac_cv_path_TIME
18727if test -n "$TIME"; then
18728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18729$as_echo "$TIME" >&6; }
18730else
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732$as_echo "no" >&6; }
18733fi
18734
18735
18736  test -n "$TIME" && break
18737done
18738
18739  else
18740    # The variable is set, but is it from the command line or the environment?
18741
18742    # Try to remove the string !TIME! from our list.
18743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18745      # If it failed, the variable was not from the command line. Ignore it,
18746      # but warn the user (except for BASH, which is always set by the calling BASH).
18747      if test "xTIME" != xBASH; then
18748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18749$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18750      fi
18751      # Try to locate tool using the code snippet
18752      for ac_prog in time
18753do
18754  # Extract the first word of "$ac_prog", so it can be a program name with args.
18755set dummy $ac_prog; ac_word=$2
18756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18757$as_echo_n "checking for $ac_word... " >&6; }
18758if ${ac_cv_path_TIME+:} false; then :
18759  $as_echo_n "(cached) " >&6
18760else
18761  case $TIME in
18762  [\\/]* | ?:[\\/]*)
18763  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18764  ;;
18765  *)
18766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18767for as_dir in $PATH
18768do
18769  IFS=$as_save_IFS
18770  test -z "$as_dir" && as_dir=.
18771    for ac_exec_ext in '' $ac_executable_extensions; do
18772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18773    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18775    break 2
18776  fi
18777done
18778  done
18779IFS=$as_save_IFS
18780
18781  ;;
18782esac
18783fi
18784TIME=$ac_cv_path_TIME
18785if test -n "$TIME"; then
18786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18787$as_echo "$TIME" >&6; }
18788else
18789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18790$as_echo "no" >&6; }
18791fi
18792
18793
18794  test -n "$TIME" && break
18795done
18796
18797    else
18798      # If it succeeded, then it was overridden by the user. We will use it
18799      # for the tool.
18800
18801      # First remove it from the list of overridden variables, so we can test
18802      # for unknown variables in the end.
18803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18804
18805      # Check if the provided tool contains a complete path.
18806      tool_specified="$TIME"
18807      tool_basename="${tool_specified##*/}"
18808      if test "x$tool_basename" = "x$tool_specified"; then
18809        # A command without a complete path is provided, search $PATH.
18810        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18811$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18812        # Extract the first word of "$tool_basename", so it can be a program name with args.
18813set dummy $tool_basename; ac_word=$2
18814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18815$as_echo_n "checking for $ac_word... " >&6; }
18816if ${ac_cv_path_TIME+:} false; then :
18817  $as_echo_n "(cached) " >&6
18818else
18819  case $TIME in
18820  [\\/]* | ?:[\\/]*)
18821  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18822  ;;
18823  *)
18824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18825for as_dir in $PATH
18826do
18827  IFS=$as_save_IFS
18828  test -z "$as_dir" && as_dir=.
18829    for ac_exec_ext in '' $ac_executable_extensions; do
18830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18831    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18833    break 2
18834  fi
18835done
18836  done
18837IFS=$as_save_IFS
18838
18839  ;;
18840esac
18841fi
18842TIME=$ac_cv_path_TIME
18843if test -n "$TIME"; then
18844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18845$as_echo "$TIME" >&6; }
18846else
18847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18848$as_echo "no" >&6; }
18849fi
18850
18851
18852        if test "x$TIME" = x; then
18853          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18854        fi
18855      else
18856        # Otherwise we believe it is a complete path. Use it as it is.
18857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18858$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18859        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18860$as_echo_n "checking for TIME... " >&6; }
18861        if test ! -x "$tool_specified"; then
18862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18863$as_echo "not found" >&6; }
18864          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18865        fi
18866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18867$as_echo "$tool_specified" >&6; }
18868      fi
18869    fi
18870  fi
18871
18872
18873  # Check if it's GNU time
18874  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18875  if test "x$IS_GNU_TIME" != x; then
18876    IS_GNU_TIME=yes
18877  else
18878    IS_GNU_TIME=no
18879  fi
18880
18881
18882  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18883
18884
18885
18886  # Publish this variable in the help.
18887
18888
18889  if test "x$DSYMUTIL" = x; then
18890    # The variable is not set by user, try to locate tool using the code snippet
18891    for ac_prog in dsymutil
18892do
18893  # Extract the first word of "$ac_prog", so it can be a program name with args.
18894set dummy $ac_prog; ac_word=$2
18895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18896$as_echo_n "checking for $ac_word... " >&6; }
18897if ${ac_cv_path_DSYMUTIL+:} false; then :
18898  $as_echo_n "(cached) " >&6
18899else
18900  case $DSYMUTIL in
18901  [\\/]* | ?:[\\/]*)
18902  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18903  ;;
18904  *)
18905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18906for as_dir in $PATH
18907do
18908  IFS=$as_save_IFS
18909  test -z "$as_dir" && as_dir=.
18910    for ac_exec_ext in '' $ac_executable_extensions; do
18911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18912    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18914    break 2
18915  fi
18916done
18917  done
18918IFS=$as_save_IFS
18919
18920  ;;
18921esac
18922fi
18923DSYMUTIL=$ac_cv_path_DSYMUTIL
18924if test -n "$DSYMUTIL"; then
18925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18926$as_echo "$DSYMUTIL" >&6; }
18927else
18928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18929$as_echo "no" >&6; }
18930fi
18931
18932
18933  test -n "$DSYMUTIL" && break
18934done
18935
18936  else
18937    # The variable is set, but is it from the command line or the environment?
18938
18939    # Try to remove the string !DSYMUTIL! from our list.
18940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18942      # If it failed, the variable was not from the command line. Ignore it,
18943      # but warn the user (except for BASH, which is always set by the calling BASH).
18944      if test "xDSYMUTIL" != xBASH; then
18945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18946$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18947      fi
18948      # Try to locate tool using the code snippet
18949      for ac_prog in dsymutil
18950do
18951  # Extract the first word of "$ac_prog", so it can be a program name with args.
18952set dummy $ac_prog; ac_word=$2
18953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18954$as_echo_n "checking for $ac_word... " >&6; }
18955if ${ac_cv_path_DSYMUTIL+:} false; then :
18956  $as_echo_n "(cached) " >&6
18957else
18958  case $DSYMUTIL in
18959  [\\/]* | ?:[\\/]*)
18960  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18961  ;;
18962  *)
18963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18964for as_dir in $PATH
18965do
18966  IFS=$as_save_IFS
18967  test -z "$as_dir" && as_dir=.
18968    for ac_exec_ext in '' $ac_executable_extensions; do
18969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18970    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18972    break 2
18973  fi
18974done
18975  done
18976IFS=$as_save_IFS
18977
18978  ;;
18979esac
18980fi
18981DSYMUTIL=$ac_cv_path_DSYMUTIL
18982if test -n "$DSYMUTIL"; then
18983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18984$as_echo "$DSYMUTIL" >&6; }
18985else
18986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18987$as_echo "no" >&6; }
18988fi
18989
18990
18991  test -n "$DSYMUTIL" && break
18992done
18993
18994    else
18995      # If it succeeded, then it was overridden by the user. We will use it
18996      # for the tool.
18997
18998      # First remove it from the list of overridden variables, so we can test
18999      # for unknown variables in the end.
19000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19001
19002      # Check if the provided tool contains a complete path.
19003      tool_specified="$DSYMUTIL"
19004      tool_basename="${tool_specified##*/}"
19005      if test "x$tool_basename" = "x$tool_specified"; then
19006        # A command without a complete path is provided, search $PATH.
19007        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19008$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19009        # Extract the first word of "$tool_basename", so it can be a program name with args.
19010set dummy $tool_basename; ac_word=$2
19011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19012$as_echo_n "checking for $ac_word... " >&6; }
19013if ${ac_cv_path_DSYMUTIL+:} false; then :
19014  $as_echo_n "(cached) " >&6
19015else
19016  case $DSYMUTIL in
19017  [\\/]* | ?:[\\/]*)
19018  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19019  ;;
19020  *)
19021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19022for as_dir in $PATH
19023do
19024  IFS=$as_save_IFS
19025  test -z "$as_dir" && as_dir=.
19026    for ac_exec_ext in '' $ac_executable_extensions; do
19027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19028    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19030    break 2
19031  fi
19032done
19033  done
19034IFS=$as_save_IFS
19035
19036  ;;
19037esac
19038fi
19039DSYMUTIL=$ac_cv_path_DSYMUTIL
19040if test -n "$DSYMUTIL"; then
19041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19042$as_echo "$DSYMUTIL" >&6; }
19043else
19044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19045$as_echo "no" >&6; }
19046fi
19047
19048
19049        if test "x$DSYMUTIL" = x; then
19050          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19051        fi
19052      else
19053        # Otherwise we believe it is a complete path. Use it as it is.
19054        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19055$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19057$as_echo_n "checking for DSYMUTIL... " >&6; }
19058        if test ! -x "$tool_specified"; then
19059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19060$as_echo "not found" >&6; }
19061          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19062        fi
19063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19064$as_echo "$tool_specified" >&6; }
19065      fi
19066    fi
19067  fi
19068
19069
19070
19071  if test "x$DSYMUTIL" = x; then
19072    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19073  fi
19074
19075
19076
19077
19078
19079  # Publish this variable in the help.
19080
19081
19082  if test "x$XATTR" = x; then
19083    # The variable is not set by user, try to locate tool using the code snippet
19084    for ac_prog in xattr
19085do
19086  # Extract the first word of "$ac_prog", so it can be a program name with args.
19087set dummy $ac_prog; ac_word=$2
19088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19089$as_echo_n "checking for $ac_word... " >&6; }
19090if ${ac_cv_path_XATTR+:} false; then :
19091  $as_echo_n "(cached) " >&6
19092else
19093  case $XATTR in
19094  [\\/]* | ?:[\\/]*)
19095  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19096  ;;
19097  *)
19098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19099for as_dir in $PATH
19100do
19101  IFS=$as_save_IFS
19102  test -z "$as_dir" && as_dir=.
19103    for ac_exec_ext in '' $ac_executable_extensions; do
19104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19105    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19107    break 2
19108  fi
19109done
19110  done
19111IFS=$as_save_IFS
19112
19113  ;;
19114esac
19115fi
19116XATTR=$ac_cv_path_XATTR
19117if test -n "$XATTR"; then
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19119$as_echo "$XATTR" >&6; }
19120else
19121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19122$as_echo "no" >&6; }
19123fi
19124
19125
19126  test -n "$XATTR" && break
19127done
19128
19129  else
19130    # The variable is set, but is it from the command line or the environment?
19131
19132    # Try to remove the string !XATTR! from our list.
19133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19135      # If it failed, the variable was not from the command line. Ignore it,
19136      # but warn the user (except for BASH, which is always set by the calling BASH).
19137      if test "xXATTR" != xBASH; then
19138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19139$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19140      fi
19141      # Try to locate tool using the code snippet
19142      for ac_prog in xattr
19143do
19144  # Extract the first word of "$ac_prog", so it can be a program name with args.
19145set dummy $ac_prog; ac_word=$2
19146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19147$as_echo_n "checking for $ac_word... " >&6; }
19148if ${ac_cv_path_XATTR+:} false; then :
19149  $as_echo_n "(cached) " >&6
19150else
19151  case $XATTR in
19152  [\\/]* | ?:[\\/]*)
19153  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19154  ;;
19155  *)
19156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19157for as_dir in $PATH
19158do
19159  IFS=$as_save_IFS
19160  test -z "$as_dir" && as_dir=.
19161    for ac_exec_ext in '' $ac_executable_extensions; do
19162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19163    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19165    break 2
19166  fi
19167done
19168  done
19169IFS=$as_save_IFS
19170
19171  ;;
19172esac
19173fi
19174XATTR=$ac_cv_path_XATTR
19175if test -n "$XATTR"; then
19176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19177$as_echo "$XATTR" >&6; }
19178else
19179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19180$as_echo "no" >&6; }
19181fi
19182
19183
19184  test -n "$XATTR" && break
19185done
19186
19187    else
19188      # If it succeeded, then it was overridden by the user. We will use it
19189      # for the tool.
19190
19191      # First remove it from the list of overridden variables, so we can test
19192      # for unknown variables in the end.
19193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19194
19195      # Check if the provided tool contains a complete path.
19196      tool_specified="$XATTR"
19197      tool_basename="${tool_specified##*/}"
19198      if test "x$tool_basename" = "x$tool_specified"; then
19199        # A command without a complete path is provided, search $PATH.
19200        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19201$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19202        # Extract the first word of "$tool_basename", so it can be a program name with args.
19203set dummy $tool_basename; ac_word=$2
19204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19205$as_echo_n "checking for $ac_word... " >&6; }
19206if ${ac_cv_path_XATTR+:} false; then :
19207  $as_echo_n "(cached) " >&6
19208else
19209  case $XATTR in
19210  [\\/]* | ?:[\\/]*)
19211  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19212  ;;
19213  *)
19214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19215for as_dir in $PATH
19216do
19217  IFS=$as_save_IFS
19218  test -z "$as_dir" && as_dir=.
19219    for ac_exec_ext in '' $ac_executable_extensions; do
19220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19221    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19223    break 2
19224  fi
19225done
19226  done
19227IFS=$as_save_IFS
19228
19229  ;;
19230esac
19231fi
19232XATTR=$ac_cv_path_XATTR
19233if test -n "$XATTR"; then
19234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19235$as_echo "$XATTR" >&6; }
19236else
19237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19238$as_echo "no" >&6; }
19239fi
19240
19241
19242        if test "x$XATTR" = x; then
19243          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19244        fi
19245      else
19246        # Otherwise we believe it is a complete path. Use it as it is.
19247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19248$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19250$as_echo_n "checking for XATTR... " >&6; }
19251        if test ! -x "$tool_specified"; then
19252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19253$as_echo "not found" >&6; }
19254          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19255        fi
19256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19257$as_echo "$tool_specified" >&6; }
19258      fi
19259    fi
19260  fi
19261
19262
19263
19264  if test "x$XATTR" = x; then
19265    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19266  fi
19267
19268
19269
19270
19271  # Publish this variable in the help.
19272
19273
19274  if test "x$CODESIGN" = x; then
19275    # The variable is not set by user, try to locate tool using the code snippet
19276    for ac_prog in codesign
19277do
19278  # Extract the first word of "$ac_prog", so it can be a program name with args.
19279set dummy $ac_prog; ac_word=$2
19280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19281$as_echo_n "checking for $ac_word... " >&6; }
19282if ${ac_cv_path_CODESIGN+:} false; then :
19283  $as_echo_n "(cached) " >&6
19284else
19285  case $CODESIGN in
19286  [\\/]* | ?:[\\/]*)
19287  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19288  ;;
19289  *)
19290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19291for as_dir in $PATH
19292do
19293  IFS=$as_save_IFS
19294  test -z "$as_dir" && as_dir=.
19295    for ac_exec_ext in '' $ac_executable_extensions; do
19296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19297    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19299    break 2
19300  fi
19301done
19302  done
19303IFS=$as_save_IFS
19304
19305  ;;
19306esac
19307fi
19308CODESIGN=$ac_cv_path_CODESIGN
19309if test -n "$CODESIGN"; then
19310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19311$as_echo "$CODESIGN" >&6; }
19312else
19313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19314$as_echo "no" >&6; }
19315fi
19316
19317
19318  test -n "$CODESIGN" && break
19319done
19320
19321  else
19322    # The variable is set, but is it from the command line or the environment?
19323
19324    # Try to remove the string !CODESIGN! from our list.
19325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19327      # If it failed, the variable was not from the command line. Ignore it,
19328      # but warn the user (except for BASH, which is always set by the calling BASH).
19329      if test "xCODESIGN" != xBASH; then
19330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19331$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19332      fi
19333      # Try to locate tool using the code snippet
19334      for ac_prog in codesign
19335do
19336  # Extract the first word of "$ac_prog", so it can be a program name with args.
19337set dummy $ac_prog; ac_word=$2
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19339$as_echo_n "checking for $ac_word... " >&6; }
19340if ${ac_cv_path_CODESIGN+:} false; then :
19341  $as_echo_n "(cached) " >&6
19342else
19343  case $CODESIGN in
19344  [\\/]* | ?:[\\/]*)
19345  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19346  ;;
19347  *)
19348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19349for as_dir in $PATH
19350do
19351  IFS=$as_save_IFS
19352  test -z "$as_dir" && as_dir=.
19353    for ac_exec_ext in '' $ac_executable_extensions; do
19354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19355    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19357    break 2
19358  fi
19359done
19360  done
19361IFS=$as_save_IFS
19362
19363  ;;
19364esac
19365fi
19366CODESIGN=$ac_cv_path_CODESIGN
19367if test -n "$CODESIGN"; then
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19369$as_echo "$CODESIGN" >&6; }
19370else
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19372$as_echo "no" >&6; }
19373fi
19374
19375
19376  test -n "$CODESIGN" && break
19377done
19378
19379    else
19380      # If it succeeded, then it was overridden by the user. We will use it
19381      # for the tool.
19382
19383      # First remove it from the list of overridden variables, so we can test
19384      # for unknown variables in the end.
19385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19386
19387      # Check if the provided tool contains a complete path.
19388      tool_specified="$CODESIGN"
19389      tool_basename="${tool_specified##*/}"
19390      if test "x$tool_basename" = "x$tool_specified"; then
19391        # A command without a complete path is provided, search $PATH.
19392        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19393$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19394        # Extract the first word of "$tool_basename", so it can be a program name with args.
19395set dummy $tool_basename; ac_word=$2
19396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19397$as_echo_n "checking for $ac_word... " >&6; }
19398if ${ac_cv_path_CODESIGN+:} false; then :
19399  $as_echo_n "(cached) " >&6
19400else
19401  case $CODESIGN in
19402  [\\/]* | ?:[\\/]*)
19403  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19404  ;;
19405  *)
19406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19407for as_dir in $PATH
19408do
19409  IFS=$as_save_IFS
19410  test -z "$as_dir" && as_dir=.
19411    for ac_exec_ext in '' $ac_executable_extensions; do
19412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19413    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19415    break 2
19416  fi
19417done
19418  done
19419IFS=$as_save_IFS
19420
19421  ;;
19422esac
19423fi
19424CODESIGN=$ac_cv_path_CODESIGN
19425if test -n "$CODESIGN"; then
19426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19427$as_echo "$CODESIGN" >&6; }
19428else
19429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19430$as_echo "no" >&6; }
19431fi
19432
19433
19434        if test "x$CODESIGN" = x; then
19435          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19436        fi
19437      else
19438        # Otherwise we believe it is a complete path. Use it as it is.
19439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19440$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19441        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19442$as_echo_n "checking for CODESIGN... " >&6; }
19443        if test ! -x "$tool_specified"; then
19444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19445$as_echo "not found" >&6; }
19446          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19447        fi
19448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19449$as_echo "$tool_specified" >&6; }
19450      fi
19451    fi
19452  fi
19453
19454
19455    if test "x$CODESIGN" != "x"; then
19456      # Verify that the openjdk_codesign certificate is present
19457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19458$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19459      rm -f codesign-testfile
19460      touch codesign-testfile
19461      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19462      rm -f codesign-testfile
19463      if test "x$CODESIGN" = x; then
19464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19465$as_echo "no" >&6; }
19466      else
19467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19468$as_echo "yes" >&6; }
19469      fi
19470    fi
19471
19472
19473
19474  # Publish this variable in the help.
19475
19476
19477  if test "x$SETFILE" = x; then
19478    # The variable is not set by user, try to locate tool using the code snippet
19479    for ac_prog in SetFile
19480do
19481  # Extract the first word of "$ac_prog", so it can be a program name with args.
19482set dummy $ac_prog; ac_word=$2
19483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19484$as_echo_n "checking for $ac_word... " >&6; }
19485if ${ac_cv_path_SETFILE+:} false; then :
19486  $as_echo_n "(cached) " >&6
19487else
19488  case $SETFILE in
19489  [\\/]* | ?:[\\/]*)
19490  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19491  ;;
19492  *)
19493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19494for as_dir in $PATH
19495do
19496  IFS=$as_save_IFS
19497  test -z "$as_dir" && as_dir=.
19498    for ac_exec_ext in '' $ac_executable_extensions; do
19499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19500    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19502    break 2
19503  fi
19504done
19505  done
19506IFS=$as_save_IFS
19507
19508  ;;
19509esac
19510fi
19511SETFILE=$ac_cv_path_SETFILE
19512if test -n "$SETFILE"; then
19513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19514$as_echo "$SETFILE" >&6; }
19515else
19516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19517$as_echo "no" >&6; }
19518fi
19519
19520
19521  test -n "$SETFILE" && break
19522done
19523
19524  else
19525    # The variable is set, but is it from the command line or the environment?
19526
19527    # Try to remove the string !SETFILE! from our list.
19528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19530      # If it failed, the variable was not from the command line. Ignore it,
19531      # but warn the user (except for BASH, which is always set by the calling BASH).
19532      if test "xSETFILE" != xBASH; then
19533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19534$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19535      fi
19536      # Try to locate tool using the code snippet
19537      for ac_prog in SetFile
19538do
19539  # Extract the first word of "$ac_prog", so it can be a program name with args.
19540set dummy $ac_prog; ac_word=$2
19541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19542$as_echo_n "checking for $ac_word... " >&6; }
19543if ${ac_cv_path_SETFILE+:} false; then :
19544  $as_echo_n "(cached) " >&6
19545else
19546  case $SETFILE in
19547  [\\/]* | ?:[\\/]*)
19548  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19549  ;;
19550  *)
19551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19552for as_dir in $PATH
19553do
19554  IFS=$as_save_IFS
19555  test -z "$as_dir" && as_dir=.
19556    for ac_exec_ext in '' $ac_executable_extensions; do
19557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19558    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19560    break 2
19561  fi
19562done
19563  done
19564IFS=$as_save_IFS
19565
19566  ;;
19567esac
19568fi
19569SETFILE=$ac_cv_path_SETFILE
19570if test -n "$SETFILE"; then
19571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19572$as_echo "$SETFILE" >&6; }
19573else
19574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19575$as_echo "no" >&6; }
19576fi
19577
19578
19579  test -n "$SETFILE" && break
19580done
19581
19582    else
19583      # If it succeeded, then it was overridden by the user. We will use it
19584      # for the tool.
19585
19586      # First remove it from the list of overridden variables, so we can test
19587      # for unknown variables in the end.
19588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19589
19590      # Check if the provided tool contains a complete path.
19591      tool_specified="$SETFILE"
19592      tool_basename="${tool_specified##*/}"
19593      if test "x$tool_basename" = "x$tool_specified"; then
19594        # A command without a complete path is provided, search $PATH.
19595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19596$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19597        # Extract the first word of "$tool_basename", so it can be a program name with args.
19598set dummy $tool_basename; ac_word=$2
19599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19600$as_echo_n "checking for $ac_word... " >&6; }
19601if ${ac_cv_path_SETFILE+:} false; then :
19602  $as_echo_n "(cached) " >&6
19603else
19604  case $SETFILE in
19605  [\\/]* | ?:[\\/]*)
19606  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19607  ;;
19608  *)
19609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19610for as_dir in $PATH
19611do
19612  IFS=$as_save_IFS
19613  test -z "$as_dir" && as_dir=.
19614    for ac_exec_ext in '' $ac_executable_extensions; do
19615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19616    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19618    break 2
19619  fi
19620done
19621  done
19622IFS=$as_save_IFS
19623
19624  ;;
19625esac
19626fi
19627SETFILE=$ac_cv_path_SETFILE
19628if test -n "$SETFILE"; then
19629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19630$as_echo "$SETFILE" >&6; }
19631else
19632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19633$as_echo "no" >&6; }
19634fi
19635
19636
19637        if test "x$SETFILE" = x; then
19638          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19639        fi
19640      else
19641        # Otherwise we believe it is a complete path. Use it as it is.
19642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19643$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19644        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19645$as_echo_n "checking for SETFILE... " >&6; }
19646        if test ! -x "$tool_specified"; then
19647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19648$as_echo "not found" >&6; }
19649          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19650        fi
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19652$as_echo "$tool_specified" >&6; }
19653      fi
19654    fi
19655  fi
19656
19657
19658
19659  if test "x$SETFILE" = x; then
19660    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19661  fi
19662
19663
19664  fi
19665
19666
19667  # Test if bash supports pipefail.
19668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19669$as_echo_n "checking if bash supports pipefail... " >&6; }
19670  if ${BASH} -c 'set -o pipefail'; then
19671    BASH_ARGS="$BASH_ARGS -o pipefail"
19672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19673$as_echo "yes" >&6; }
19674  else
19675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19676$as_echo "no" >&6; }
19677  fi
19678
19679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19680$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19681  if ${BASH} -e -c 'true'; then
19682    BASH_ARGS="$BASH_ARGS -e"
19683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19684$as_echo "yes" >&6; }
19685  else
19686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19687$as_echo "no" >&6; }
19688  fi
19689
19690
19691
19692
19693# Check if pkg-config is available.
19694
19695
19696if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19697	if test -n "$ac_tool_prefix"; then
19698  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19699set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19701$as_echo_n "checking for $ac_word... " >&6; }
19702if ${ac_cv_path_PKG_CONFIG+:} false; then :
19703  $as_echo_n "(cached) " >&6
19704else
19705  case $PKG_CONFIG in
19706  [\\/]* | ?:[\\/]*)
19707  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19708  ;;
19709  *)
19710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19711for as_dir in $PATH
19712do
19713  IFS=$as_save_IFS
19714  test -z "$as_dir" && as_dir=.
19715    for ac_exec_ext in '' $ac_executable_extensions; do
19716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19717    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19719    break 2
19720  fi
19721done
19722  done
19723IFS=$as_save_IFS
19724
19725  ;;
19726esac
19727fi
19728PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19729if test -n "$PKG_CONFIG"; then
19730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19731$as_echo "$PKG_CONFIG" >&6; }
19732else
19733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19734$as_echo "no" >&6; }
19735fi
19736
19737
19738fi
19739if test -z "$ac_cv_path_PKG_CONFIG"; then
19740  ac_pt_PKG_CONFIG=$PKG_CONFIG
19741  # Extract the first word of "pkg-config", so it can be a program name with args.
19742set dummy pkg-config; ac_word=$2
19743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19744$as_echo_n "checking for $ac_word... " >&6; }
19745if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19746  $as_echo_n "(cached) " >&6
19747else
19748  case $ac_pt_PKG_CONFIG in
19749  [\\/]* | ?:[\\/]*)
19750  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19751  ;;
19752  *)
19753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19754for as_dir in $PATH
19755do
19756  IFS=$as_save_IFS
19757  test -z "$as_dir" && as_dir=.
19758    for ac_exec_ext in '' $ac_executable_extensions; do
19759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19760    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19762    break 2
19763  fi
19764done
19765  done
19766IFS=$as_save_IFS
19767
19768  ;;
19769esac
19770fi
19771ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19772if test -n "$ac_pt_PKG_CONFIG"; then
19773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19774$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19775else
19776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19777$as_echo "no" >&6; }
19778fi
19779
19780  if test "x$ac_pt_PKG_CONFIG" = x; then
19781    PKG_CONFIG=""
19782  else
19783    case $cross_compiling:$ac_tool_warned in
19784yes:)
19785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19787ac_tool_warned=yes ;;
19788esac
19789    PKG_CONFIG=$ac_pt_PKG_CONFIG
19790  fi
19791else
19792  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19793fi
19794
19795fi
19796if test -n "$PKG_CONFIG"; then
19797	_pkg_min_version=0.9.0
19798	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19799$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19800	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19801		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19802$as_echo "yes" >&6; }
19803	else
19804		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19805$as_echo "no" >&6; }
19806		PKG_CONFIG=""
19807	fi
19808
19809fi
19810
19811# After basic tools have been setup, we can check build os specific details.
19812
19813  ###############################################################################
19814
19815  # Note that this is the build platform OS version!
19816
19817  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19818  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19819  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19820  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19821
19822
19823
19824
19825
19826# Setup builddeps, for automatic downloading of tools we need.
19827# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19828# boot-jdk setup, but we need to have basic tools setup first.
19829
19830
19831# Check whether --with-builddeps-conf was given.
19832if test "${with_builddeps_conf+set}" = set; then :
19833  withval=$with_builddeps_conf;
19834fi
19835
19836
19837
19838# Check whether --with-builddeps-server was given.
19839if test "${with_builddeps_server+set}" = set; then :
19840  withval=$with_builddeps_server;
19841fi
19842
19843
19844
19845# Check whether --with-builddeps-dir was given.
19846if test "${with_builddeps_dir+set}" = set; then :
19847  withval=$with_builddeps_dir;
19848else
19849  with_builddeps_dir=/localhome/builddeps
19850fi
19851
19852
19853
19854# Check whether --with-builddeps-group was given.
19855if test "${with_builddeps_group+set}" = set; then :
19856  withval=$with_builddeps_group;
19857fi
19858
19859
19860
19861
19862  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19863    if test "x$with_builddeps_conf" != x; then
19864      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19865$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19866      builddepsfile=$with_builddeps_conf
19867      if test -s $builddepsfile; then
19868        . $builddepsfile
19869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19870$as_echo "loaded!" >&6; }
19871      else
19872        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19873      fi
19874    else
19875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19876$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19877      builddepsfile=`mktemp`
19878      touch $builddepsfile
19879      # Put all found confs into a single file.
19880      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19881      # Source the file to acquire the variables
19882      if test -s $builddepsfile; then
19883        . $builddepsfile
19884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19885$as_echo "found at least one!" >&6; }
19886      else
19887        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19888      fi
19889    fi
19890    # Create build and target names that use _ instead of "-" and ".".
19891    # This is necessary to use them in variable names.
19892    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19893    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19894    # Extract rewrite information for build and target
19895    eval rewritten_build=\${REWRITE_${build_var}}
19896    if test "x$rewritten_build" = x; then
19897      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19898      echo Build stays the same $rewritten_build
19899    else
19900      echo Rewriting build for builddeps into $rewritten_build
19901    fi
19902    eval rewritten_target=\${REWRITE_${target_var}}
19903    if test "x$rewritten_target" = x; then
19904      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19905      echo Target stays the same $rewritten_target
19906    else
19907      echo Rewriting target for builddeps into $rewritten_target
19908    fi
19909    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19910    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19911  fi
19912  for ac_prog in 7z unzip
19913do
19914  # Extract the first word of "$ac_prog", so it can be a program name with args.
19915set dummy $ac_prog; ac_word=$2
19916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19917$as_echo_n "checking for $ac_word... " >&6; }
19918if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19919  $as_echo_n "(cached) " >&6
19920else
19921  if test -n "$BDEPS_UNZIP"; then
19922  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19923else
19924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19925for as_dir in $PATH
19926do
19927  IFS=$as_save_IFS
19928  test -z "$as_dir" && as_dir=.
19929    for ac_exec_ext in '' $ac_executable_extensions; do
19930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19931    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19933    break 2
19934  fi
19935done
19936  done
19937IFS=$as_save_IFS
19938
19939fi
19940fi
19941BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19942if test -n "$BDEPS_UNZIP"; then
19943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19944$as_echo "$BDEPS_UNZIP" >&6; }
19945else
19946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19947$as_echo "no" >&6; }
19948fi
19949
19950
19951  test -n "$BDEPS_UNZIP" && break
19952done
19953
19954  if test "x$BDEPS_UNZIP" = x7z; then
19955    BDEPS_UNZIP="7z x"
19956  fi
19957
19958  for ac_prog in wget lftp ftp
19959do
19960  # Extract the first word of "$ac_prog", so it can be a program name with args.
19961set dummy $ac_prog; ac_word=$2
19962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19963$as_echo_n "checking for $ac_word... " >&6; }
19964if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19965  $as_echo_n "(cached) " >&6
19966else
19967  if test -n "$BDEPS_FTP"; then
19968  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19969else
19970as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19971for as_dir in $PATH
19972do
19973  IFS=$as_save_IFS
19974  test -z "$as_dir" && as_dir=.
19975    for ac_exec_ext in '' $ac_executable_extensions; do
19976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19977    ac_cv_prog_BDEPS_FTP="$ac_prog"
19978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19979    break 2
19980  fi
19981done
19982  done
19983IFS=$as_save_IFS
19984
19985fi
19986fi
19987BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19988if test -n "$BDEPS_FTP"; then
19989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19990$as_echo "$BDEPS_FTP" >&6; }
19991else
19992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19993$as_echo "no" >&6; }
19994fi
19995
19996
19997  test -n "$BDEPS_FTP" && break
19998done
19999
20000
20001
20002###############################################################################
20003#
20004# Determine OpenJDK variants, options and version numbers.
20005#
20006###############################################################################
20007
20008# We need build & target for this.
20009
20010
20011  ###############################################################################
20012  #
20013  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20014  # We always build headless support.
20015  #
20016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20017$as_echo_n "checking headful support... " >&6; }
20018  # Check whether --enable-headful was given.
20019if test "${enable_headful+set}" = set; then :
20020  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20021else
20022  SUPPORT_HEADFUL=yes
20023fi
20024
20025
20026  SUPPORT_HEADLESS=yes
20027  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20028
20029  if test "x$SUPPORT_HEADFUL" = xyes; then
20030    # We are building both headful and headless.
20031    headful_msg="include support for both headful and headless"
20032  fi
20033
20034  if test "x$SUPPORT_HEADFUL" = xno; then
20035    # Thus we are building headless only.
20036    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20037    headful_msg="headless only"
20038  fi
20039
20040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20041$as_echo "$headful_msg" >&6; }
20042
20043
20044
20045
20046
20047  # Control wether Hotspot runs Queens test after build.
20048  # Check whether --enable-hotspot-test-in-build was given.
20049if test "${enable_hotspot_test_in_build+set}" = set; then :
20050  enableval=$enable_hotspot_test_in_build;
20051else
20052  enable_hotspot_test_in_build=no
20053fi
20054
20055  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20056    TEST_IN_BUILD=true
20057  else
20058    TEST_IN_BUILD=false
20059  fi
20060
20061
20062  ###############################################################################
20063  #
20064  # Choose cacerts source file
20065  #
20066
20067# Check whether --with-cacerts-file was given.
20068if test "${with_cacerts_file+set}" = set; then :
20069  withval=$with_cacerts_file;
20070fi
20071
20072  if test "x$with_cacerts_file" != x; then
20073    CACERTS_FILE=$with_cacerts_file
20074  fi
20075
20076
20077  ###############################################################################
20078  #
20079  # Enable or disable unlimited crypto
20080  #
20081  # Check whether --enable-unlimited-crypto was given.
20082if test "${enable_unlimited_crypto+set}" = set; then :
20083  enableval=$enable_unlimited_crypto;
20084else
20085  enable_unlimited_crypto=no
20086fi
20087
20088  if test "x$enable_unlimited_crypto" = "xyes"; then
20089    UNLIMITED_CRYPTO=true
20090  else
20091    UNLIMITED_CRYPTO=false
20092  fi
20093
20094
20095  ###############################################################################
20096  #
20097  # Enable or disable the elliptic curve crypto implementation
20098  #
20099
20100
20101  ###############################################################################
20102  #
20103  # --enable-rmiconnector-iiop
20104  #
20105  # Check whether --enable-rmiconnector-iiop was given.
20106if test "${enable_rmiconnector_iiop+set}" = set; then :
20107  enableval=$enable_rmiconnector_iiop;
20108fi
20109
20110  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20111    RMICONNECTOR_IIOP=true
20112  else
20113    RMICONNECTOR_IIOP=false
20114  fi
20115
20116
20117  ###############################################################################
20118  #
20119  # Compress jars
20120  #
20121  COMPRESS_JARS=false
20122
20123
20124
20125
20126  # Source the version numbers
20127  . $AUTOCONF_DIR/version-numbers
20128
20129  # Get the settings from parameters
20130
20131# Check whether --with-milestone was given.
20132if test "${with_milestone+set}" = set; then :
20133  withval=$with_milestone;
20134fi
20135
20136  if test "x$with_milestone" = xyes; then
20137    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20138  elif test "x$with_milestone" != x; then
20139    MILESTONE="$with_milestone"
20140  fi
20141  if test "x$MILESTONE" = x; then
20142    MILESTONE=internal
20143  fi
20144
20145
20146# Check whether --with-update-version was given.
20147if test "${with_update_version+set}" = set; then :
20148  withval=$with_update_version;
20149fi
20150
20151  if test "x$with_update_version" = xyes; then
20152    as_fn_error $? "Update version must have a value" "$LINENO" 5
20153  elif test "x$with_update_version" != x; then
20154    JDK_UPDATE_VERSION="$with_update_version"
20155    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20156    # to a bug in expr (which reduces it to just X). To work around this, we
20157    # always add a 0 to one digit update versions.
20158    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20159      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20160    fi
20161  fi
20162
20163
20164# Check whether --with-user-release-suffix was given.
20165if test "${with_user_release_suffix+set}" = set; then :
20166  withval=$with_user_release_suffix;
20167fi
20168
20169  if test "x$with_user_release_suffix" = xyes; then
20170    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20171  elif test "x$with_user_release_suffix" != x; then
20172    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20173  fi
20174
20175
20176# Check whether --with-build-number was given.
20177if test "${with_build_number+set}" = set; then :
20178  withval=$with_build_number;
20179fi
20180
20181  if test "x$with_build_number" = xyes; then
20182    as_fn_error $? "Build number must have a value" "$LINENO" 5
20183  elif test "x$with_build_number" != x; then
20184    JDK_BUILD_NUMBER="$with_build_number"
20185  fi
20186  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20187  if test "x$JDK_BUILD_NUMBER" = x; then
20188    JDK_BUILD_NUMBER=b00
20189    if test "x$USER_RELEASE_SUFFIX" = x; then
20190      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20191      # Avoid [:alnum:] since it depends on the locale.
20192      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20193      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20194    fi
20195  fi
20196
20197  # Now set the JDK version, milestone, build number etc.
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214# Check whether --with-copyright-year was given.
20215if test "${with_copyright_year+set}" = set; then :
20216  withval=$with_copyright_year;
20217fi
20218
20219  if test "x$with_copyright_year" = xyes; then
20220    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20221  elif test "x$with_copyright_year" != x; then
20222    COPYRIGHT_YEAR="$with_copyright_year"
20223  else
20224    COPYRIGHT_YEAR=`date +'%Y'`
20225  fi
20226
20227
20228  if test "x$JDK_UPDATE_VERSION" != x; then
20229    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20230  else
20231    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20232  fi
20233
20234
20235  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20236
20237
20238
20239###############################################################################
20240#
20241# Setup BootJDK, used to bootstrap the build.
20242#
20243###############################################################################
20244
20245
20246  BOOT_JDK_FOUND=no
20247
20248# Check whether --with-boot-jdk was given.
20249if test "${with_boot_jdk+set}" = set; then :
20250  withval=$with_boot_jdk;
20251fi
20252
20253
20254  # We look for the Boot JDK through various means, going from more certain to
20255  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20256  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20257  # must check if this is indeed valid; otherwise we'll continue looking.
20258
20259  # Test: Is bootjdk explicitely set by command line arguments?
20260
20261  if test "x$BOOT_JDK_FOUND" = xno; then
20262    # Now execute the test
20263
20264  if test "x$with_boot_jdk" != x; then
20265    BOOT_JDK=$with_boot_jdk
20266    BOOT_JDK_FOUND=maybe
20267    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20268$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20269  fi
20270
20271
20272    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20273    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20274      # Do we have a bin/java?
20275      if test ! -x "$BOOT_JDK/bin/java"; then
20276        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20278        BOOT_JDK_FOUND=no
20279      else
20280        # Do we have a bin/javac?
20281        if test ! -x "$BOOT_JDK/bin/javac"; then
20282          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20284          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20285$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20286          BOOT_JDK_FOUND=no
20287        else
20288          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20289          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20290
20291          # Extra M4 quote needed to protect [] in grep expression.
20292          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20293          if test "x$FOUND_CORRECT_VERSION" = x; then
20294            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20296            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20297$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20298            BOOT_JDK_FOUND=no
20299          else
20300            # We're done! :-)
20301            BOOT_JDK_FOUND=yes
20302
20303  # Only process if variable expands to non-empty
20304
20305  if test "x$BOOT_JDK" != x; then
20306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20307
20308  # Input might be given as Windows format, start by converting to
20309  # unix format.
20310  path="$BOOT_JDK"
20311  new_path=`$CYGPATH -u "$path"`
20312
20313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20316  # "foo.exe" is OK but "foo" is an error.
20317  #
20318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20319  # It is also a way to make sure we got the proper file name for the real test later on.
20320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20321  if test "x$test_shortpath" = x; then
20322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20324    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20325  fi
20326
20327  # Call helper function which possibly converts this using DOS-style short mode.
20328  # If so, the updated path is stored in $new_path.
20329
20330  input_path="$new_path"
20331  # Check if we need to convert this using DOS-style short mode. If the path
20332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20333  # take no chances and rewrite it.
20334  # Note: m4 eats our [], so we need to use [ and ] instead.
20335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20336  if test "x$has_forbidden_chars" != x; then
20337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20341      # Going to short mode and back again did indeed matter. Since short mode is
20342      # case insensitive, let's make it lowercase to improve readability.
20343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20344      # Now convert it back to Unix-style (cygpath)
20345      input_path=`$CYGPATH -u "$shortmode_path"`
20346      new_path="$input_path"
20347    fi
20348  fi
20349
20350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20351  if test "x$test_cygdrive_prefix" = x; then
20352    # As a simple fix, exclude /usr/bin since it's not a real path.
20353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20355      # a path prefixed by /cygdrive for fixpath to work.
20356      new_path="$CYGWIN_ROOT_PATH$input_path"
20357    fi
20358  fi
20359
20360
20361  if test "x$path" != "x$new_path"; then
20362    BOOT_JDK="$new_path"
20363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20365  fi
20366
20367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20368
20369  path="$BOOT_JDK"
20370  has_colon=`$ECHO $path | $GREP ^.:`
20371  new_path="$path"
20372  if test "x$has_colon" = x; then
20373    # Not in mixed or Windows style, start by that.
20374    new_path=`cmd //c echo $path`
20375  fi
20376
20377
20378  input_path="$new_path"
20379  # Check if we need to convert this using DOS-style short mode. If the path
20380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20381  # take no chances and rewrite it.
20382  # Note: m4 eats our [], so we need to use [ and ] instead.
20383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20384  if test "x$has_forbidden_chars" != x; then
20385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20387  fi
20388
20389
20390  windows_path="$new_path"
20391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20392    unix_path=`$CYGPATH -u "$windows_path"`
20393    new_path="$unix_path"
20394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20396    new_path="$unix_path"
20397  fi
20398
20399  if test "x$path" != "x$new_path"; then
20400    BOOT_JDK="$new_path"
20401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20402$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20403  fi
20404
20405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20407
20408    else
20409      # We're on a unix platform. Hooray! :)
20410      path="$BOOT_JDK"
20411      has_space=`$ECHO "$path" | $GREP " "`
20412      if test "x$has_space" != x; then
20413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20415        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20416      fi
20417
20418      # Use eval to expand a potential ~
20419      eval path="$path"
20420      if test ! -f "$path" && test ! -d "$path"; then
20421        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20422      fi
20423
20424      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20425    fi
20426  fi
20427
20428            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20429$as_echo_n "checking for Boot JDK... " >&6; }
20430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20431$as_echo "$BOOT_JDK" >&6; }
20432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20433$as_echo_n "checking Boot JDK version... " >&6; }
20434            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20436$as_echo "$BOOT_JDK_VERSION" >&6; }
20437          fi # end check jdk version
20438        fi # end check javac
20439      fi # end check java
20440    fi # end check boot jdk found
20441  fi
20442
20443  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20444    # Having specified an argument which is incorrect will produce an instant failure;
20445    # we should not go on looking
20446    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20447  fi
20448
20449  # Test: Is bootjdk available from builddeps?
20450
20451  if test "x$BOOT_JDK_FOUND" = xno; then
20452    # Now execute the test
20453
20454
20455
20456  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20457    # Source the builddeps file again, to make sure it uses the latest variables!
20458    . $builddepsfile
20459    # Look for a target and build machine specific resource!
20460    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20461    if test "x$resource" = x; then
20462      # Ok, lets instead look for a target specific resource
20463      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20464    fi
20465    if test "x$resource" = x; then
20466      # Ok, lets instead look for a build specific resource
20467      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20468    fi
20469    if test "x$resource" = x; then
20470      # Ok, lets instead look for a generic resource
20471      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20472      resource=${builddep_bootjdk}
20473    fi
20474    if test "x$resource" != x; then
20475      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20476$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20477      # If the resource in the builddeps.conf file is an existing directory,
20478      # for example /java/linux/cups
20479      if test -d ${resource}; then
20480        depdir=${resource}
20481      else
20482
20483  # bootjdk is for example mymodule
20484  # $resource is for example libs/general/libmymod_1_2_3.zip
20485  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20486  # $with_builddeps_dir is for example /localhome/builddeps
20487  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20488  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20489  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20490  filename=`basename $resource`
20491  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20492  filebase=${filename%%.*}
20493  extension=${filename#*.}
20494  installdir=$with_builddeps_dir/$filebase
20495  if test ! -f $installdir/$filename.unpacked; then
20496    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20497$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20498    if test ! -d $installdir; then
20499      mkdir -p $installdir
20500    fi
20501    if test ! -d $installdir; then
20502      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20503    fi
20504    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20505    touch $tmpfile
20506    if test ! -f $tmpfile; then
20507      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20508    fi
20509
20510  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20511  # $tmpfile is the local file name for the downloaded file.
20512  VALID_TOOL=no
20513  if test "x$BDEPS_FTP" = xwget; then
20514    VALID_TOOL=yes
20515    wget -O $tmpfile $with_builddeps_server/$resource
20516  fi
20517  if test "x$BDEPS_FTP" = xlftp; then
20518    VALID_TOOL=yes
20519    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20520  fi
20521  if test "x$BDEPS_FTP" = xftp; then
20522    VALID_TOOL=yes
20523    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20524    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20525    FTPUSERPWD=${FTPSERVER%%@*}
20526    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20527      FTPUSER=${userpwd%%:*}
20528      FTPPWD=${userpwd#*@}
20529      FTPSERVER=${FTPSERVER#*@}
20530    else
20531      FTPUSER=ftp
20532      FTPPWD=ftp
20533    fi
20534    # the "pass" command does not work on some
20535    # ftp clients (read ftp.exe) but if it works,
20536    # passive mode is better!
20537    ( \
20538        echo "user $FTPUSER $FTPPWD"        ; \
20539        echo "pass"                         ; \
20540        echo "bin"                          ; \
20541        echo "get $FTPPATH $tmpfile"              ; \
20542    ) | ftp -in $FTPSERVER
20543  fi
20544  if test "x$VALID_TOOL" != xyes; then
20545    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20546  fi
20547
20548    mv $tmpfile $installdir/$filename
20549    if test ! -s $installdir/$filename; then
20550      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20551    fi
20552    case "$extension" in
20553      zip)  echo "Unzipping $installdir/$filename..."
20554        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20555        ;;
20556      tar.gz) echo "Untaring $installdir/$filename..."
20557        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20558        ;;
20559      tgz) echo "Untaring $installdir/$filename..."
20560        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20561        ;;
20562      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20563        ;;
20564    esac
20565  fi
20566  if test -f $installdir/$filename.unpacked; then
20567    depdir=$installdir
20568  fi
20569
20570      fi
20571      # Source the builddeps file again, because in the previous command, the depdir
20572      # was updated to point at the current build dependency install directory.
20573      . $builddepsfile
20574      # Now extract variables from the builddeps.conf files.
20575      theroot=${builddep_bootjdk_ROOT}
20576      thecflags=${builddep_bootjdk_CFLAGS}
20577      thelibs=${builddep_bootjdk_LIBS}
20578      if test "x$depdir" = x; then
20579        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20580      fi
20581      BOOT_JDK=$depdir
20582      if test "x$theroot" != x; then
20583        BOOT_JDK="$theroot"
20584      fi
20585      if test "x$thecflags" != x; then
20586        BOOT_JDK_CFLAGS="$thecflags"
20587      fi
20588      if test "x$thelibs" != x; then
20589        BOOT_JDK_LIBS="$thelibs"
20590      fi
20591      BOOT_JDK_FOUND=maybe
20592      else BOOT_JDK_FOUND=no
20593
20594    fi
20595    else BOOT_JDK_FOUND=no
20596
20597  fi
20598
20599
20600
20601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20603      # Do we have a bin/java?
20604      if test ! -x "$BOOT_JDK/bin/java"; then
20605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20607        BOOT_JDK_FOUND=no
20608      else
20609        # Do we have a bin/javac?
20610        if test ! -x "$BOOT_JDK/bin/javac"; then
20611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20615          BOOT_JDK_FOUND=no
20616        else
20617          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20618          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20619
20620          # Extra M4 quote needed to protect [] in grep expression.
20621          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20622          if test "x$FOUND_CORRECT_VERSION" = x; then
20623            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20625            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20626$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20627            BOOT_JDK_FOUND=no
20628          else
20629            # We're done! :-)
20630            BOOT_JDK_FOUND=yes
20631
20632  # Only process if variable expands to non-empty
20633
20634  if test "x$BOOT_JDK" != x; then
20635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20636
20637  # Input might be given as Windows format, start by converting to
20638  # unix format.
20639  path="$BOOT_JDK"
20640  new_path=`$CYGPATH -u "$path"`
20641
20642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20645  # "foo.exe" is OK but "foo" is an error.
20646  #
20647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20648  # It is also a way to make sure we got the proper file name for the real test later on.
20649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20650  if test "x$test_shortpath" = x; then
20651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20654  fi
20655
20656  # Call helper function which possibly converts this using DOS-style short mode.
20657  # If so, the updated path is stored in $new_path.
20658
20659  input_path="$new_path"
20660  # Check if we need to convert this using DOS-style short mode. If the path
20661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20662  # take no chances and rewrite it.
20663  # Note: m4 eats our [], so we need to use [ and ] instead.
20664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20665  if test "x$has_forbidden_chars" != x; then
20666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20670      # Going to short mode and back again did indeed matter. Since short mode is
20671      # case insensitive, let's make it lowercase to improve readability.
20672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20673      # Now convert it back to Unix-style (cygpath)
20674      input_path=`$CYGPATH -u "$shortmode_path"`
20675      new_path="$input_path"
20676    fi
20677  fi
20678
20679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20680  if test "x$test_cygdrive_prefix" = x; then
20681    # As a simple fix, exclude /usr/bin since it's not a real path.
20682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20684      # a path prefixed by /cygdrive for fixpath to work.
20685      new_path="$CYGWIN_ROOT_PATH$input_path"
20686    fi
20687  fi
20688
20689
20690  if test "x$path" != "x$new_path"; then
20691    BOOT_JDK="$new_path"
20692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20694  fi
20695
20696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20697
20698  path="$BOOT_JDK"
20699  has_colon=`$ECHO $path | $GREP ^.:`
20700  new_path="$path"
20701  if test "x$has_colon" = x; then
20702    # Not in mixed or Windows style, start by that.
20703    new_path=`cmd //c echo $path`
20704  fi
20705
20706
20707  input_path="$new_path"
20708  # Check if we need to convert this using DOS-style short mode. If the path
20709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20710  # take no chances and rewrite it.
20711  # Note: m4 eats our [], so we need to use [ and ] instead.
20712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20713  if test "x$has_forbidden_chars" != x; then
20714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20716  fi
20717
20718
20719  windows_path="$new_path"
20720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20721    unix_path=`$CYGPATH -u "$windows_path"`
20722    new_path="$unix_path"
20723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20725    new_path="$unix_path"
20726  fi
20727
20728  if test "x$path" != "x$new_path"; then
20729    BOOT_JDK="$new_path"
20730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20732  fi
20733
20734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20736
20737    else
20738      # We're on a unix platform. Hooray! :)
20739      path="$BOOT_JDK"
20740      has_space=`$ECHO "$path" | $GREP " "`
20741      if test "x$has_space" != x; then
20742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20745      fi
20746
20747      # Use eval to expand a potential ~
20748      eval path="$path"
20749      if test ! -f "$path" && test ! -d "$path"; then
20750        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20751      fi
20752
20753      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20754    fi
20755  fi
20756
20757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20758$as_echo_n "checking for Boot JDK... " >&6; }
20759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20760$as_echo "$BOOT_JDK" >&6; }
20761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20762$as_echo_n "checking Boot JDK version... " >&6; }
20763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20765$as_echo "$BOOT_JDK_VERSION" >&6; }
20766          fi # end check jdk version
20767        fi # end check javac
20768      fi # end check java
20769    fi # end check boot jdk found
20770  fi
20771
20772
20773  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20774
20775  if test "x$BOOT_JDK_FOUND" = xno; then
20776    # Now execute the test
20777
20778  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20779    # First check at user selected default
20780
20781  if test "x$BOOT_JDK_FOUND" = xno; then
20782    # Now execute the test
20783
20784  if test -x /usr/libexec/java_home; then
20785    BOOT_JDK=`/usr/libexec/java_home `
20786    BOOT_JDK_FOUND=maybe
20787    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20788$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20789  fi
20790
20791
20792    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20793    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20794      # Do we have a bin/java?
20795      if test ! -x "$BOOT_JDK/bin/java"; then
20796        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20798        BOOT_JDK_FOUND=no
20799      else
20800        # Do we have a bin/javac?
20801        if test ! -x "$BOOT_JDK/bin/javac"; then
20802          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20804          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20805$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20806          BOOT_JDK_FOUND=no
20807        else
20808          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20809          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20810
20811          # Extra M4 quote needed to protect [] in grep expression.
20812          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20813          if test "x$FOUND_CORRECT_VERSION" = x; then
20814            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20816            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20817$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20818            BOOT_JDK_FOUND=no
20819          else
20820            # We're done! :-)
20821            BOOT_JDK_FOUND=yes
20822
20823  # Only process if variable expands to non-empty
20824
20825  if test "x$BOOT_JDK" != x; then
20826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20827
20828  # Input might be given as Windows format, start by converting to
20829  # unix format.
20830  path="$BOOT_JDK"
20831  new_path=`$CYGPATH -u "$path"`
20832
20833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20836  # "foo.exe" is OK but "foo" is an error.
20837  #
20838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20839  # It is also a way to make sure we got the proper file name for the real test later on.
20840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20841  if test "x$test_shortpath" = x; then
20842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20843$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20844    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20845  fi
20846
20847  # Call helper function which possibly converts this using DOS-style short mode.
20848  # If so, the updated path is stored in $new_path.
20849
20850  input_path="$new_path"
20851  # Check if we need to convert this using DOS-style short mode. If the path
20852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20853  # take no chances and rewrite it.
20854  # Note: m4 eats our [], so we need to use [ and ] instead.
20855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20856  if test "x$has_forbidden_chars" != x; then
20857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20861      # Going to short mode and back again did indeed matter. Since short mode is
20862      # case insensitive, let's make it lowercase to improve readability.
20863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20864      # Now convert it back to Unix-style (cygpath)
20865      input_path=`$CYGPATH -u "$shortmode_path"`
20866      new_path="$input_path"
20867    fi
20868  fi
20869
20870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20871  if test "x$test_cygdrive_prefix" = x; then
20872    # As a simple fix, exclude /usr/bin since it's not a real path.
20873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20875      # a path prefixed by /cygdrive for fixpath to work.
20876      new_path="$CYGWIN_ROOT_PATH$input_path"
20877    fi
20878  fi
20879
20880
20881  if test "x$path" != "x$new_path"; then
20882    BOOT_JDK="$new_path"
20883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20885  fi
20886
20887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20888
20889  path="$BOOT_JDK"
20890  has_colon=`$ECHO $path | $GREP ^.:`
20891  new_path="$path"
20892  if test "x$has_colon" = x; then
20893    # Not in mixed or Windows style, start by that.
20894    new_path=`cmd //c echo $path`
20895  fi
20896
20897
20898  input_path="$new_path"
20899  # Check if we need to convert this using DOS-style short mode. If the path
20900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20901  # take no chances and rewrite it.
20902  # Note: m4 eats our [], so we need to use [ and ] instead.
20903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20904  if test "x$has_forbidden_chars" != x; then
20905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20907  fi
20908
20909
20910  windows_path="$new_path"
20911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20912    unix_path=`$CYGPATH -u "$windows_path"`
20913    new_path="$unix_path"
20914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20916    new_path="$unix_path"
20917  fi
20918
20919  if test "x$path" != "x$new_path"; then
20920    BOOT_JDK="$new_path"
20921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20922$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20923  fi
20924
20925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20927
20928    else
20929      # We're on a unix platform. Hooray! :)
20930      path="$BOOT_JDK"
20931      has_space=`$ECHO "$path" | $GREP " "`
20932      if test "x$has_space" != x; then
20933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20934$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20936      fi
20937
20938      # Use eval to expand a potential ~
20939      eval path="$path"
20940      if test ! -f "$path" && test ! -d "$path"; then
20941        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20942      fi
20943
20944      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20945    fi
20946  fi
20947
20948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20949$as_echo_n "checking for Boot JDK... " >&6; }
20950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20951$as_echo "$BOOT_JDK" >&6; }
20952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20953$as_echo_n "checking Boot JDK version... " >&6; }
20954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20956$as_echo "$BOOT_JDK_VERSION" >&6; }
20957          fi # end check jdk version
20958        fi # end check javac
20959      fi # end check java
20960    fi # end check boot jdk found
20961  fi
20962
20963    # If that did not work out (e.g. too old), try explicit versions instead
20964
20965  if test "x$BOOT_JDK_FOUND" = xno; then
20966    # Now execute the test
20967
20968  if test -x /usr/libexec/java_home; then
20969    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20970    BOOT_JDK_FOUND=maybe
20971    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20972$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20973  fi
20974
20975
20976    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20977    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20978      # Do we have a bin/java?
20979      if test ! -x "$BOOT_JDK/bin/java"; then
20980        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20981$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20982        BOOT_JDK_FOUND=no
20983      else
20984        # Do we have a bin/javac?
20985        if test ! -x "$BOOT_JDK/bin/javac"; then
20986          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20988          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20989$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20990          BOOT_JDK_FOUND=no
20991        else
20992          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20993          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20994
20995          # Extra M4 quote needed to protect [] in grep expression.
20996          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20997          if test "x$FOUND_CORRECT_VERSION" = x; then
20998            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20999$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21000            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21001$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21002            BOOT_JDK_FOUND=no
21003          else
21004            # We're done! :-)
21005            BOOT_JDK_FOUND=yes
21006
21007  # Only process if variable expands to non-empty
21008
21009  if test "x$BOOT_JDK" != x; then
21010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21011
21012  # Input might be given as Windows format, start by converting to
21013  # unix format.
21014  path="$BOOT_JDK"
21015  new_path=`$CYGPATH -u "$path"`
21016
21017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21020  # "foo.exe" is OK but "foo" is an error.
21021  #
21022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21023  # It is also a way to make sure we got the proper file name for the real test later on.
21024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21025  if test "x$test_shortpath" = x; then
21026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21027$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21028    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21029  fi
21030
21031  # Call helper function which possibly converts this using DOS-style short mode.
21032  # If so, the updated path is stored in $new_path.
21033
21034  input_path="$new_path"
21035  # Check if we need to convert this using DOS-style short mode. If the path
21036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21037  # take no chances and rewrite it.
21038  # Note: m4 eats our [], so we need to use [ and ] instead.
21039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21040  if test "x$has_forbidden_chars" != x; then
21041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21045      # Going to short mode and back again did indeed matter. Since short mode is
21046      # case insensitive, let's make it lowercase to improve readability.
21047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21048      # Now convert it back to Unix-style (cygpath)
21049      input_path=`$CYGPATH -u "$shortmode_path"`
21050      new_path="$input_path"
21051    fi
21052  fi
21053
21054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21055  if test "x$test_cygdrive_prefix" = x; then
21056    # As a simple fix, exclude /usr/bin since it's not a real path.
21057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21059      # a path prefixed by /cygdrive for fixpath to work.
21060      new_path="$CYGWIN_ROOT_PATH$input_path"
21061    fi
21062  fi
21063
21064
21065  if test "x$path" != "x$new_path"; then
21066    BOOT_JDK="$new_path"
21067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21069  fi
21070
21071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21072
21073  path="$BOOT_JDK"
21074  has_colon=`$ECHO $path | $GREP ^.:`
21075  new_path="$path"
21076  if test "x$has_colon" = x; then
21077    # Not in mixed or Windows style, start by that.
21078    new_path=`cmd //c echo $path`
21079  fi
21080
21081
21082  input_path="$new_path"
21083  # Check if we need to convert this using DOS-style short mode. If the path
21084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21085  # take no chances and rewrite it.
21086  # Note: m4 eats our [], so we need to use [ and ] instead.
21087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21088  if test "x$has_forbidden_chars" != x; then
21089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21091  fi
21092
21093
21094  windows_path="$new_path"
21095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21096    unix_path=`$CYGPATH -u "$windows_path"`
21097    new_path="$unix_path"
21098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21100    new_path="$unix_path"
21101  fi
21102
21103  if test "x$path" != "x$new_path"; then
21104    BOOT_JDK="$new_path"
21105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21106$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21107  fi
21108
21109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21111
21112    else
21113      # We're on a unix platform. Hooray! :)
21114      path="$BOOT_JDK"
21115      has_space=`$ECHO "$path" | $GREP " "`
21116      if test "x$has_space" != x; then
21117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21118$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21120      fi
21121
21122      # Use eval to expand a potential ~
21123      eval path="$path"
21124      if test ! -f "$path" && test ! -d "$path"; then
21125        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21126      fi
21127
21128      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21129    fi
21130  fi
21131
21132            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21133$as_echo_n "checking for Boot JDK... " >&6; }
21134            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21135$as_echo "$BOOT_JDK" >&6; }
21136            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21137$as_echo_n "checking Boot JDK version... " >&6; }
21138            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21140$as_echo "$BOOT_JDK_VERSION" >&6; }
21141          fi # end check jdk version
21142        fi # end check javac
21143      fi # end check java
21144    fi # end check boot jdk found
21145  fi
21146
21147
21148  if test "x$BOOT_JDK_FOUND" = xno; then
21149    # Now execute the test
21150
21151  if test -x /usr/libexec/java_home; then
21152    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21153    BOOT_JDK_FOUND=maybe
21154    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21155$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21156  fi
21157
21158
21159    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21160    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21161      # Do we have a bin/java?
21162      if test ! -x "$BOOT_JDK/bin/java"; then
21163        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21164$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21165        BOOT_JDK_FOUND=no
21166      else
21167        # Do we have a bin/javac?
21168        if test ! -x "$BOOT_JDK/bin/javac"; then
21169          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21171          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21172$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21173          BOOT_JDK_FOUND=no
21174        else
21175          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21176          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21177
21178          # Extra M4 quote needed to protect [] in grep expression.
21179          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21180          if test "x$FOUND_CORRECT_VERSION" = x; then
21181            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21183            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21184$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21185            BOOT_JDK_FOUND=no
21186          else
21187            # We're done! :-)
21188            BOOT_JDK_FOUND=yes
21189
21190  # Only process if variable expands to non-empty
21191
21192  if test "x$BOOT_JDK" != x; then
21193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21194
21195  # Input might be given as Windows format, start by converting to
21196  # unix format.
21197  path="$BOOT_JDK"
21198  new_path=`$CYGPATH -u "$path"`
21199
21200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21203  # "foo.exe" is OK but "foo" is an error.
21204  #
21205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21206  # It is also a way to make sure we got the proper file name for the real test later on.
21207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21208  if test "x$test_shortpath" = x; then
21209    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21211    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21212  fi
21213
21214  # Call helper function which possibly converts this using DOS-style short mode.
21215  # If so, the updated path is stored in $new_path.
21216
21217  input_path="$new_path"
21218  # Check if we need to convert this using DOS-style short mode. If the path
21219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21220  # take no chances and rewrite it.
21221  # Note: m4 eats our [], so we need to use [ and ] instead.
21222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21223  if test "x$has_forbidden_chars" != x; then
21224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21228      # Going to short mode and back again did indeed matter. Since short mode is
21229      # case insensitive, let's make it lowercase to improve readability.
21230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21231      # Now convert it back to Unix-style (cygpath)
21232      input_path=`$CYGPATH -u "$shortmode_path"`
21233      new_path="$input_path"
21234    fi
21235  fi
21236
21237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21238  if test "x$test_cygdrive_prefix" = x; then
21239    # As a simple fix, exclude /usr/bin since it's not a real path.
21240    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21242      # a path prefixed by /cygdrive for fixpath to work.
21243      new_path="$CYGWIN_ROOT_PATH$input_path"
21244    fi
21245  fi
21246
21247
21248  if test "x$path" != "x$new_path"; then
21249    BOOT_JDK="$new_path"
21250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21252  fi
21253
21254    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21255
21256  path="$BOOT_JDK"
21257  has_colon=`$ECHO $path | $GREP ^.:`
21258  new_path="$path"
21259  if test "x$has_colon" = x; then
21260    # Not in mixed or Windows style, start by that.
21261    new_path=`cmd //c echo $path`
21262  fi
21263
21264
21265  input_path="$new_path"
21266  # Check if we need to convert this using DOS-style short mode. If the path
21267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21268  # take no chances and rewrite it.
21269  # Note: m4 eats our [], so we need to use [ and ] instead.
21270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21271  if test "x$has_forbidden_chars" != x; then
21272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21273    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21274  fi
21275
21276
21277  windows_path="$new_path"
21278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21279    unix_path=`$CYGPATH -u "$windows_path"`
21280    new_path="$unix_path"
21281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21283    new_path="$unix_path"
21284  fi
21285
21286  if test "x$path" != "x$new_path"; then
21287    BOOT_JDK="$new_path"
21288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21289$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21290  fi
21291
21292  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21293  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21294
21295    else
21296      # We're on a unix platform. Hooray! :)
21297      path="$BOOT_JDK"
21298      has_space=`$ECHO "$path" | $GREP " "`
21299      if test "x$has_space" != x; then
21300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21301$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21302        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21303      fi
21304
21305      # Use eval to expand a potential ~
21306      eval path="$path"
21307      if test ! -f "$path" && test ! -d "$path"; then
21308        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21309      fi
21310
21311      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21312    fi
21313  fi
21314
21315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21316$as_echo_n "checking for Boot JDK... " >&6; }
21317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21318$as_echo "$BOOT_JDK" >&6; }
21319            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21320$as_echo_n "checking Boot JDK version... " >&6; }
21321            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21323$as_echo "$BOOT_JDK_VERSION" >&6; }
21324          fi # end check jdk version
21325        fi # end check javac
21326      fi # end check java
21327    fi # end check boot jdk found
21328  fi
21329
21330
21331  if test "x$BOOT_JDK_FOUND" = xno; then
21332    # Now execute the test
21333
21334  if test -x /usr/libexec/java_home; then
21335    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21336    BOOT_JDK_FOUND=maybe
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21338$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21339  fi
21340
21341
21342    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21343    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21344      # Do we have a bin/java?
21345      if test ! -x "$BOOT_JDK/bin/java"; then
21346        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21348        BOOT_JDK_FOUND=no
21349      else
21350        # Do we have a bin/javac?
21351        if test ! -x "$BOOT_JDK/bin/javac"; then
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21355$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21356          BOOT_JDK_FOUND=no
21357        else
21358          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21359          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21360
21361          # Extra M4 quote needed to protect [] in grep expression.
21362          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21363          if test "x$FOUND_CORRECT_VERSION" = x; then
21364            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21366            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21367$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21368            BOOT_JDK_FOUND=no
21369          else
21370            # We're done! :-)
21371            BOOT_JDK_FOUND=yes
21372
21373  # Only process if variable expands to non-empty
21374
21375  if test "x$BOOT_JDK" != x; then
21376    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21377
21378  # Input might be given as Windows format, start by converting to
21379  # unix format.
21380  path="$BOOT_JDK"
21381  new_path=`$CYGPATH -u "$path"`
21382
21383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21386  # "foo.exe" is OK but "foo" is an error.
21387  #
21388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21389  # It is also a way to make sure we got the proper file name for the real test later on.
21390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21391  if test "x$test_shortpath" = x; then
21392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21393$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21394    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21395  fi
21396
21397  # Call helper function which possibly converts this using DOS-style short mode.
21398  # If so, the updated path is stored in $new_path.
21399
21400  input_path="$new_path"
21401  # Check if we need to convert this using DOS-style short mode. If the path
21402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21403  # take no chances and rewrite it.
21404  # Note: m4 eats our [], so we need to use [ and ] instead.
21405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21406  if test "x$has_forbidden_chars" != x; then
21407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21411      # Going to short mode and back again did indeed matter. Since short mode is
21412      # case insensitive, let's make it lowercase to improve readability.
21413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21414      # Now convert it back to Unix-style (cygpath)
21415      input_path=`$CYGPATH -u "$shortmode_path"`
21416      new_path="$input_path"
21417    fi
21418  fi
21419
21420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21421  if test "x$test_cygdrive_prefix" = x; then
21422    # As a simple fix, exclude /usr/bin since it's not a real path.
21423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21425      # a path prefixed by /cygdrive for fixpath to work.
21426      new_path="$CYGWIN_ROOT_PATH$input_path"
21427    fi
21428  fi
21429
21430
21431  if test "x$path" != "x$new_path"; then
21432    BOOT_JDK="$new_path"
21433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21435  fi
21436
21437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21438
21439  path="$BOOT_JDK"
21440  has_colon=`$ECHO $path | $GREP ^.:`
21441  new_path="$path"
21442  if test "x$has_colon" = x; then
21443    # Not in mixed or Windows style, start by that.
21444    new_path=`cmd //c echo $path`
21445  fi
21446
21447
21448  input_path="$new_path"
21449  # Check if we need to convert this using DOS-style short mode. If the path
21450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21451  # take no chances and rewrite it.
21452  # Note: m4 eats our [], so we need to use [ and ] instead.
21453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21454  if test "x$has_forbidden_chars" != x; then
21455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21457  fi
21458
21459
21460  windows_path="$new_path"
21461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21462    unix_path=`$CYGPATH -u "$windows_path"`
21463    new_path="$unix_path"
21464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21466    new_path="$unix_path"
21467  fi
21468
21469  if test "x$path" != "x$new_path"; then
21470    BOOT_JDK="$new_path"
21471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21472$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21473  fi
21474
21475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21477
21478    else
21479      # We're on a unix platform. Hooray! :)
21480      path="$BOOT_JDK"
21481      has_space=`$ECHO "$path" | $GREP " "`
21482      if test "x$has_space" != x; then
21483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21484$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21485        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21486      fi
21487
21488      # Use eval to expand a potential ~
21489      eval path="$path"
21490      if test ! -f "$path" && test ! -d "$path"; then
21491        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21492      fi
21493
21494      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21495    fi
21496  fi
21497
21498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21499$as_echo_n "checking for Boot JDK... " >&6; }
21500            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21501$as_echo "$BOOT_JDK" >&6; }
21502            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21503$as_echo_n "checking Boot JDK version... " >&6; }
21504            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21505            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21506$as_echo "$BOOT_JDK_VERSION" >&6; }
21507          fi # end check jdk version
21508        fi # end check javac
21509      fi # end check java
21510    fi # end check boot jdk found
21511  fi
21512
21513  fi
21514
21515
21516    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21517    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21518      # Do we have a bin/java?
21519      if test ! -x "$BOOT_JDK/bin/java"; then
21520        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21522        BOOT_JDK_FOUND=no
21523      else
21524        # Do we have a bin/javac?
21525        if test ! -x "$BOOT_JDK/bin/javac"; then
21526          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21528          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21529$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21530          BOOT_JDK_FOUND=no
21531        else
21532          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21533          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21534
21535          # Extra M4 quote needed to protect [] in grep expression.
21536          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21537          if test "x$FOUND_CORRECT_VERSION" = x; then
21538            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21540            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21541$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21542            BOOT_JDK_FOUND=no
21543          else
21544            # We're done! :-)
21545            BOOT_JDK_FOUND=yes
21546
21547  # Only process if variable expands to non-empty
21548
21549  if test "x$BOOT_JDK" != x; then
21550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21551
21552  # Input might be given as Windows format, start by converting to
21553  # unix format.
21554  path="$BOOT_JDK"
21555  new_path=`$CYGPATH -u "$path"`
21556
21557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21560  # "foo.exe" is OK but "foo" is an error.
21561  #
21562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21563  # It is also a way to make sure we got the proper file name for the real test later on.
21564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21565  if test "x$test_shortpath" = x; then
21566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21568    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21569  fi
21570
21571  # Call helper function which possibly converts this using DOS-style short mode.
21572  # If so, the updated path is stored in $new_path.
21573
21574  input_path="$new_path"
21575  # Check if we need to convert this using DOS-style short mode. If the path
21576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21577  # take no chances and rewrite it.
21578  # Note: m4 eats our [], so we need to use [ and ] instead.
21579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21580  if test "x$has_forbidden_chars" != x; then
21581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21585      # Going to short mode and back again did indeed matter. Since short mode is
21586      # case insensitive, let's make it lowercase to improve readability.
21587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21588      # Now convert it back to Unix-style (cygpath)
21589      input_path=`$CYGPATH -u "$shortmode_path"`
21590      new_path="$input_path"
21591    fi
21592  fi
21593
21594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21595  if test "x$test_cygdrive_prefix" = x; then
21596    # As a simple fix, exclude /usr/bin since it's not a real path.
21597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21599      # a path prefixed by /cygdrive for fixpath to work.
21600      new_path="$CYGWIN_ROOT_PATH$input_path"
21601    fi
21602  fi
21603
21604
21605  if test "x$path" != "x$new_path"; then
21606    BOOT_JDK="$new_path"
21607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21609  fi
21610
21611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21612
21613  path="$BOOT_JDK"
21614  has_colon=`$ECHO $path | $GREP ^.:`
21615  new_path="$path"
21616  if test "x$has_colon" = x; then
21617    # Not in mixed or Windows style, start by that.
21618    new_path=`cmd //c echo $path`
21619  fi
21620
21621
21622  input_path="$new_path"
21623  # Check if we need to convert this using DOS-style short mode. If the path
21624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21625  # take no chances and rewrite it.
21626  # Note: m4 eats our [], so we need to use [ and ] instead.
21627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21628  if test "x$has_forbidden_chars" != x; then
21629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21631  fi
21632
21633
21634  windows_path="$new_path"
21635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21636    unix_path=`$CYGPATH -u "$windows_path"`
21637    new_path="$unix_path"
21638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21640    new_path="$unix_path"
21641  fi
21642
21643  if test "x$path" != "x$new_path"; then
21644    BOOT_JDK="$new_path"
21645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21647  fi
21648
21649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21651
21652    else
21653      # We're on a unix platform. Hooray! :)
21654      path="$BOOT_JDK"
21655      has_space=`$ECHO "$path" | $GREP " "`
21656      if test "x$has_space" != x; then
21657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21659        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21660      fi
21661
21662      # Use eval to expand a potential ~
21663      eval path="$path"
21664      if test ! -f "$path" && test ! -d "$path"; then
21665        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21666      fi
21667
21668      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21669    fi
21670  fi
21671
21672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21673$as_echo_n "checking for Boot JDK... " >&6; }
21674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21675$as_echo "$BOOT_JDK" >&6; }
21676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21677$as_echo_n "checking Boot JDK version... " >&6; }
21678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21680$as_echo "$BOOT_JDK_VERSION" >&6; }
21681          fi # end check jdk version
21682        fi # end check javac
21683      fi # end check java
21684    fi # end check boot jdk found
21685  fi
21686
21687
21688  # Test: Is $JAVA_HOME set?
21689
21690  if test "x$BOOT_JDK_FOUND" = xno; then
21691    # Now execute the test
21692
21693  if test "x$JAVA_HOME" != x; then
21694    JAVA_HOME_PROCESSED="$JAVA_HOME"
21695
21696  # Only process if variable expands to non-empty
21697
21698  if test "x$JAVA_HOME_PROCESSED" != x; then
21699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21700
21701  # Input might be given as Windows format, start by converting to
21702  # unix format.
21703  path="$JAVA_HOME_PROCESSED"
21704  new_path=`$CYGPATH -u "$path"`
21705
21706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21709  # "foo.exe" is OK but "foo" is an error.
21710  #
21711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21712  # It is also a way to make sure we got the proper file name for the real test later on.
21713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21714  if test "x$test_shortpath" = x; then
21715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21716$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21717    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21718  fi
21719
21720  # Call helper function which possibly converts this using DOS-style short mode.
21721  # If so, the updated path is stored in $new_path.
21722
21723  input_path="$new_path"
21724  # Check if we need to convert this using DOS-style short mode. If the path
21725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21726  # take no chances and rewrite it.
21727  # Note: m4 eats our [], so we need to use [ and ] instead.
21728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21729  if test "x$has_forbidden_chars" != x; then
21730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21734      # Going to short mode and back again did indeed matter. Since short mode is
21735      # case insensitive, let's make it lowercase to improve readability.
21736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21737      # Now convert it back to Unix-style (cygpath)
21738      input_path=`$CYGPATH -u "$shortmode_path"`
21739      new_path="$input_path"
21740    fi
21741  fi
21742
21743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21744  if test "x$test_cygdrive_prefix" = x; then
21745    # As a simple fix, exclude /usr/bin since it's not a real path.
21746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21748      # a path prefixed by /cygdrive for fixpath to work.
21749      new_path="$CYGWIN_ROOT_PATH$input_path"
21750    fi
21751  fi
21752
21753
21754  if test "x$path" != "x$new_path"; then
21755    JAVA_HOME_PROCESSED="$new_path"
21756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21757$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21758  fi
21759
21760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21761
21762  path="$JAVA_HOME_PROCESSED"
21763  has_colon=`$ECHO $path | $GREP ^.:`
21764  new_path="$path"
21765  if test "x$has_colon" = x; then
21766    # Not in mixed or Windows style, start by that.
21767    new_path=`cmd //c echo $path`
21768  fi
21769
21770
21771  input_path="$new_path"
21772  # Check if we need to convert this using DOS-style short mode. If the path
21773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21774  # take no chances and rewrite it.
21775  # Note: m4 eats our [], so we need to use [ and ] instead.
21776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21777  if test "x$has_forbidden_chars" != x; then
21778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21780  fi
21781
21782
21783  windows_path="$new_path"
21784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21785    unix_path=`$CYGPATH -u "$windows_path"`
21786    new_path="$unix_path"
21787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21789    new_path="$unix_path"
21790  fi
21791
21792  if test "x$path" != "x$new_path"; then
21793    JAVA_HOME_PROCESSED="$new_path"
21794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21795$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21796  fi
21797
21798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21800
21801    else
21802      # We're on a unix platform. Hooray! :)
21803      path="$JAVA_HOME_PROCESSED"
21804      has_space=`$ECHO "$path" | $GREP " "`
21805      if test "x$has_space" != x; then
21806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21807$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21808        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21809      fi
21810
21811      # Use eval to expand a potential ~
21812      eval path="$path"
21813      if test ! -f "$path" && test ! -d "$path"; then
21814        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21815      fi
21816
21817      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21818    fi
21819  fi
21820
21821    if test ! -d "$JAVA_HOME_PROCESSED"; then
21822      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21823$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21824    else
21825      # Aha, the user has set a JAVA_HOME
21826      # let us use that as the Boot JDK.
21827      BOOT_JDK="$JAVA_HOME_PROCESSED"
21828      BOOT_JDK_FOUND=maybe
21829      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21830$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21831    fi
21832  fi
21833
21834
21835    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21836    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21837      # Do we have a bin/java?
21838      if test ! -x "$BOOT_JDK/bin/java"; then
21839        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21841        BOOT_JDK_FOUND=no
21842      else
21843        # Do we have a bin/javac?
21844        if test ! -x "$BOOT_JDK/bin/javac"; then
21845          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21848$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21849          BOOT_JDK_FOUND=no
21850        else
21851          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21852          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21853
21854          # Extra M4 quote needed to protect [] in grep expression.
21855          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21856          if test "x$FOUND_CORRECT_VERSION" = x; then
21857            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21859            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21860$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21861            BOOT_JDK_FOUND=no
21862          else
21863            # We're done! :-)
21864            BOOT_JDK_FOUND=yes
21865
21866  # Only process if variable expands to non-empty
21867
21868  if test "x$BOOT_JDK" != x; then
21869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21870
21871  # Input might be given as Windows format, start by converting to
21872  # unix format.
21873  path="$BOOT_JDK"
21874  new_path=`$CYGPATH -u "$path"`
21875
21876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21879  # "foo.exe" is OK but "foo" is an error.
21880  #
21881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21882  # It is also a way to make sure we got the proper file name for the real test later on.
21883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21884  if test "x$test_shortpath" = x; then
21885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21887    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21888  fi
21889
21890  # Call helper function which possibly converts this using DOS-style short mode.
21891  # If so, the updated path is stored in $new_path.
21892
21893  input_path="$new_path"
21894  # Check if we need to convert this using DOS-style short mode. If the path
21895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21896  # take no chances and rewrite it.
21897  # Note: m4 eats our [], so we need to use [ and ] instead.
21898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21899  if test "x$has_forbidden_chars" != x; then
21900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21904      # Going to short mode and back again did indeed matter. Since short mode is
21905      # case insensitive, let's make it lowercase to improve readability.
21906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21907      # Now convert it back to Unix-style (cygpath)
21908      input_path=`$CYGPATH -u "$shortmode_path"`
21909      new_path="$input_path"
21910    fi
21911  fi
21912
21913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21914  if test "x$test_cygdrive_prefix" = x; then
21915    # As a simple fix, exclude /usr/bin since it's not a real path.
21916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21918      # a path prefixed by /cygdrive for fixpath to work.
21919      new_path="$CYGWIN_ROOT_PATH$input_path"
21920    fi
21921  fi
21922
21923
21924  if test "x$path" != "x$new_path"; then
21925    BOOT_JDK="$new_path"
21926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21928  fi
21929
21930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21931
21932  path="$BOOT_JDK"
21933  has_colon=`$ECHO $path | $GREP ^.:`
21934  new_path="$path"
21935  if test "x$has_colon" = x; then
21936    # Not in mixed or Windows style, start by that.
21937    new_path=`cmd //c echo $path`
21938  fi
21939
21940
21941  input_path="$new_path"
21942  # Check if we need to convert this using DOS-style short mode. If the path
21943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21944  # take no chances and rewrite it.
21945  # Note: m4 eats our [], so we need to use [ and ] instead.
21946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21947  if test "x$has_forbidden_chars" != x; then
21948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21950  fi
21951
21952
21953  windows_path="$new_path"
21954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21955    unix_path=`$CYGPATH -u "$windows_path"`
21956    new_path="$unix_path"
21957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21959    new_path="$unix_path"
21960  fi
21961
21962  if test "x$path" != "x$new_path"; then
21963    BOOT_JDK="$new_path"
21964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21966  fi
21967
21968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21970
21971    else
21972      # We're on a unix platform. Hooray! :)
21973      path="$BOOT_JDK"
21974      has_space=`$ECHO "$path" | $GREP " "`
21975      if test "x$has_space" != x; then
21976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21979      fi
21980
21981      # Use eval to expand a potential ~
21982      eval path="$path"
21983      if test ! -f "$path" && test ! -d "$path"; then
21984        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21985      fi
21986
21987      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21988    fi
21989  fi
21990
21991            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21992$as_echo_n "checking for Boot JDK... " >&6; }
21993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21994$as_echo "$BOOT_JDK" >&6; }
21995            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21996$as_echo_n "checking Boot JDK version... " >&6; }
21997            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21999$as_echo "$BOOT_JDK_VERSION" >&6; }
22000          fi # end check jdk version
22001        fi # end check javac
22002      fi # end check java
22003    fi # end check boot jdk found
22004  fi
22005
22006
22007  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22008
22009  if test "x$BOOT_JDK_FOUND" = xno; then
22010    # Now execute the test
22011
22012  # Extract the first word of "javac", so it can be a program name with args.
22013set dummy javac; ac_word=$2
22014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22015$as_echo_n "checking for $ac_word... " >&6; }
22016if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22017  $as_echo_n "(cached) " >&6
22018else
22019  case $JAVAC_CHECK in
22020  [\\/]* | ?:[\\/]*)
22021  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22022  ;;
22023  *)
22024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22025for as_dir in $PATH
22026do
22027  IFS=$as_save_IFS
22028  test -z "$as_dir" && as_dir=.
22029    for ac_exec_ext in '' $ac_executable_extensions; do
22030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22031    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22033    break 2
22034  fi
22035done
22036  done
22037IFS=$as_save_IFS
22038
22039  ;;
22040esac
22041fi
22042JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22043if test -n "$JAVAC_CHECK"; then
22044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22045$as_echo "$JAVAC_CHECK" >&6; }
22046else
22047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22048$as_echo "no" >&6; }
22049fi
22050
22051
22052  # Extract the first word of "java", so it can be a program name with args.
22053set dummy java; ac_word=$2
22054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22055$as_echo_n "checking for $ac_word... " >&6; }
22056if ${ac_cv_path_JAVA_CHECK+:} false; then :
22057  $as_echo_n "(cached) " >&6
22058else
22059  case $JAVA_CHECK in
22060  [\\/]* | ?:[\\/]*)
22061  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22062  ;;
22063  *)
22064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22065for as_dir in $PATH
22066do
22067  IFS=$as_save_IFS
22068  test -z "$as_dir" && as_dir=.
22069    for ac_exec_ext in '' $ac_executable_extensions; do
22070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22071    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22073    break 2
22074  fi
22075done
22076  done
22077IFS=$as_save_IFS
22078
22079  ;;
22080esac
22081fi
22082JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22083if test -n "$JAVA_CHECK"; then
22084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22085$as_echo "$JAVA_CHECK" >&6; }
22086else
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22088$as_echo "no" >&6; }
22089fi
22090
22091
22092  BINARY="$JAVAC_CHECK"
22093  if test "x$JAVAC_CHECK" = x; then
22094    BINARY="$JAVA_CHECK"
22095  fi
22096  if test "x$BINARY" != x; then
22097    # So there is a java(c) binary, it might be part of a JDK.
22098    # Lets find the JDK/JRE directory by following symbolic links.
22099    # Linux/GNU systems often have links from /usr/bin/java to
22100    # /etc/alternatives/java to the real JDK binary.
22101
22102  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22103    # Follow a chain of symbolic links. Use readlink
22104    # where it exists, else fall back to horribly
22105    # complicated shell code.
22106    if test "x$READLINK_TESTED" != yes; then
22107      # On MacOSX there is a readlink tool with a different
22108      # purpose than the GNU readlink tool. Check the found readlink.
22109      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22110      if test "x$ISGNU" = x; then
22111        # A readlink that we do not know how to use.
22112        # Are there other non-GNU readlinks out there?
22113        READLINK_TESTED=yes
22114        READLINK=
22115      fi
22116    fi
22117
22118    if test "x$READLINK" != x; then
22119      BINARY=`$READLINK -f $BINARY`
22120    else
22121      # Save the current directory for restoring afterwards
22122      STARTDIR=$PWD
22123      COUNTER=0
22124      sym_link_dir=`$DIRNAME $BINARY`
22125      sym_link_file=`$BASENAME $BINARY`
22126      cd $sym_link_dir
22127      # Use -P flag to resolve symlinks in directories.
22128      cd `$THEPWDCMD -P`
22129      sym_link_dir=`$THEPWDCMD -P`
22130      # Resolve file symlinks
22131      while test $COUNTER -lt 20; do
22132        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22133        if test "x$ISLINK" == x; then
22134          # This is not a symbolic link! We are done!
22135          break
22136        fi
22137        # Again resolve directory symlinks since the target of the just found
22138        # link could be in a different directory
22139        cd `$DIRNAME $ISLINK`
22140        sym_link_dir=`$THEPWDCMD -P`
22141        sym_link_file=`$BASENAME $ISLINK`
22142        let COUNTER=COUNTER+1
22143      done
22144      cd $STARTDIR
22145      BINARY=$sym_link_dir/$sym_link_file
22146    fi
22147  fi
22148
22149    BOOT_JDK=`dirname "$BINARY"`
22150    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22151    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22152      # Looks like we found ourselves an JDK
22153      BOOT_JDK_FOUND=maybe
22154      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22155$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22156    fi
22157  fi
22158
22159
22160    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22161    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22162      # Do we have a bin/java?
22163      if test ! -x "$BOOT_JDK/bin/java"; then
22164        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22166        BOOT_JDK_FOUND=no
22167      else
22168        # Do we have a bin/javac?
22169        if test ! -x "$BOOT_JDK/bin/javac"; then
22170          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22172          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22173$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22174          BOOT_JDK_FOUND=no
22175        else
22176          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22177          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22178
22179          # Extra M4 quote needed to protect [] in grep expression.
22180          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22181          if test "x$FOUND_CORRECT_VERSION" = x; then
22182            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22184            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22185$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22186            BOOT_JDK_FOUND=no
22187          else
22188            # We're done! :-)
22189            BOOT_JDK_FOUND=yes
22190
22191  # Only process if variable expands to non-empty
22192
22193  if test "x$BOOT_JDK" != x; then
22194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22195
22196  # Input might be given as Windows format, start by converting to
22197  # unix format.
22198  path="$BOOT_JDK"
22199  new_path=`$CYGPATH -u "$path"`
22200
22201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22204  # "foo.exe" is OK but "foo" is an error.
22205  #
22206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22207  # It is also a way to make sure we got the proper file name for the real test later on.
22208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22209  if test "x$test_shortpath" = x; then
22210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22212    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22213  fi
22214
22215  # Call helper function which possibly converts this using DOS-style short mode.
22216  # If so, the updated path is stored in $new_path.
22217
22218  input_path="$new_path"
22219  # Check if we need to convert this using DOS-style short mode. If the path
22220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22221  # take no chances and rewrite it.
22222  # Note: m4 eats our [], so we need to use [ and ] instead.
22223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22224  if test "x$has_forbidden_chars" != x; then
22225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22229      # Going to short mode and back again did indeed matter. Since short mode is
22230      # case insensitive, let's make it lowercase to improve readability.
22231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22232      # Now convert it back to Unix-style (cygpath)
22233      input_path=`$CYGPATH -u "$shortmode_path"`
22234      new_path="$input_path"
22235    fi
22236  fi
22237
22238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22239  if test "x$test_cygdrive_prefix" = x; then
22240    # As a simple fix, exclude /usr/bin since it's not a real path.
22241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22243      # a path prefixed by /cygdrive for fixpath to work.
22244      new_path="$CYGWIN_ROOT_PATH$input_path"
22245    fi
22246  fi
22247
22248
22249  if test "x$path" != "x$new_path"; then
22250    BOOT_JDK="$new_path"
22251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22253  fi
22254
22255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22256
22257  path="$BOOT_JDK"
22258  has_colon=`$ECHO $path | $GREP ^.:`
22259  new_path="$path"
22260  if test "x$has_colon" = x; then
22261    # Not in mixed or Windows style, start by that.
22262    new_path=`cmd //c echo $path`
22263  fi
22264
22265
22266  input_path="$new_path"
22267  # Check if we need to convert this using DOS-style short mode. If the path
22268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22269  # take no chances and rewrite it.
22270  # Note: m4 eats our [], so we need to use [ and ] instead.
22271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22272  if test "x$has_forbidden_chars" != x; then
22273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22275  fi
22276
22277
22278  windows_path="$new_path"
22279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22280    unix_path=`$CYGPATH -u "$windows_path"`
22281    new_path="$unix_path"
22282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22284    new_path="$unix_path"
22285  fi
22286
22287  if test "x$path" != "x$new_path"; then
22288    BOOT_JDK="$new_path"
22289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22291  fi
22292
22293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22295
22296    else
22297      # We're on a unix platform. Hooray! :)
22298      path="$BOOT_JDK"
22299      has_space=`$ECHO "$path" | $GREP " "`
22300      if test "x$has_space" != x; then
22301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22302$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22303        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22304      fi
22305
22306      # Use eval to expand a potential ~
22307      eval path="$path"
22308      if test ! -f "$path" && test ! -d "$path"; then
22309        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22310      fi
22311
22312      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22313    fi
22314  fi
22315
22316            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22317$as_echo_n "checking for Boot JDK... " >&6; }
22318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22319$as_echo "$BOOT_JDK" >&6; }
22320            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22321$as_echo_n "checking Boot JDK version... " >&6; }
22322            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22324$as_echo "$BOOT_JDK_VERSION" >&6; }
22325          fi # end check jdk version
22326        fi # end check javac
22327      fi # end check java
22328    fi # end check boot jdk found
22329  fi
22330
22331
22332  # Test: Is there a JDK installed in default, well-known locations?
22333
22334  if test "x$BOOT_JDK_FOUND" = xno; then
22335    # Now execute the test
22336
22337  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22338
22339  if test "x$BOOT_JDK_FOUND" = xno; then
22340    # Now execute the test
22341
22342  if test "x$ProgramW6432" != x; then
22343    VIRTUAL_DIR="$ProgramW6432/Java"
22344
22345  windows_path="$VIRTUAL_DIR"
22346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22347    unix_path=`$CYGPATH -u "$windows_path"`
22348    VIRTUAL_DIR="$unix_path"
22349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22351    VIRTUAL_DIR="$unix_path"
22352  fi
22353
22354
22355  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22356  BOOT_JDK_SUFFIX=""
22357  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22358  if test "x$ALL_JDKS_FOUND" != x; then
22359    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22360
22361  if test "x$BOOT_JDK_FOUND" = xno; then
22362    # Now execute the test
22363
22364        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22365        if test -d "$BOOT_JDK"; then
22366          BOOT_JDK_FOUND=maybe
22367          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22368$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22369        fi
22370
22371
22372    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22373    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22374      # Do we have a bin/java?
22375      if test ! -x "$BOOT_JDK/bin/java"; then
22376        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22378        BOOT_JDK_FOUND=no
22379      else
22380        # Do we have a bin/javac?
22381        if test ! -x "$BOOT_JDK/bin/javac"; then
22382          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22384          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22385$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22386          BOOT_JDK_FOUND=no
22387        else
22388          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22389          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22390
22391          # Extra M4 quote needed to protect [] in grep expression.
22392          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22393          if test "x$FOUND_CORRECT_VERSION" = x; then
22394            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22396            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22397$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22398            BOOT_JDK_FOUND=no
22399          else
22400            # We're done! :-)
22401            BOOT_JDK_FOUND=yes
22402
22403  # Only process if variable expands to non-empty
22404
22405  if test "x$BOOT_JDK" != x; then
22406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22407
22408  # Input might be given as Windows format, start by converting to
22409  # unix format.
22410  path="$BOOT_JDK"
22411  new_path=`$CYGPATH -u "$path"`
22412
22413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22416  # "foo.exe" is OK but "foo" is an error.
22417  #
22418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22419  # It is also a way to make sure we got the proper file name for the real test later on.
22420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22421  if test "x$test_shortpath" = x; then
22422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22423$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22424    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22425  fi
22426
22427  # Call helper function which possibly converts this using DOS-style short mode.
22428  # If so, the updated path is stored in $new_path.
22429
22430  input_path="$new_path"
22431  # Check if we need to convert this using DOS-style short mode. If the path
22432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22433  # take no chances and rewrite it.
22434  # Note: m4 eats our [], so we need to use [ and ] instead.
22435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22436  if test "x$has_forbidden_chars" != x; then
22437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22441      # Going to short mode and back again did indeed matter. Since short mode is
22442      # case insensitive, let's make it lowercase to improve readability.
22443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22444      # Now convert it back to Unix-style (cygpath)
22445      input_path=`$CYGPATH -u "$shortmode_path"`
22446      new_path="$input_path"
22447    fi
22448  fi
22449
22450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22451  if test "x$test_cygdrive_prefix" = x; then
22452    # As a simple fix, exclude /usr/bin since it's not a real path.
22453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22455      # a path prefixed by /cygdrive for fixpath to work.
22456      new_path="$CYGWIN_ROOT_PATH$input_path"
22457    fi
22458  fi
22459
22460
22461  if test "x$path" != "x$new_path"; then
22462    BOOT_JDK="$new_path"
22463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22464$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22465  fi
22466
22467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22468
22469  path="$BOOT_JDK"
22470  has_colon=`$ECHO $path | $GREP ^.:`
22471  new_path="$path"
22472  if test "x$has_colon" = x; then
22473    # Not in mixed or Windows style, start by that.
22474    new_path=`cmd //c echo $path`
22475  fi
22476
22477
22478  input_path="$new_path"
22479  # Check if we need to convert this using DOS-style short mode. If the path
22480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22481  # take no chances and rewrite it.
22482  # Note: m4 eats our [], so we need to use [ and ] instead.
22483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22484  if test "x$has_forbidden_chars" != x; then
22485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22487  fi
22488
22489
22490  windows_path="$new_path"
22491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22492    unix_path=`$CYGPATH -u "$windows_path"`
22493    new_path="$unix_path"
22494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22496    new_path="$unix_path"
22497  fi
22498
22499  if test "x$path" != "x$new_path"; then
22500    BOOT_JDK="$new_path"
22501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22503  fi
22504
22505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22507
22508    else
22509      # We're on a unix platform. Hooray! :)
22510      path="$BOOT_JDK"
22511      has_space=`$ECHO "$path" | $GREP " "`
22512      if test "x$has_space" != x; then
22513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22514$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22516      fi
22517
22518      # Use eval to expand a potential ~
22519      eval path="$path"
22520      if test ! -f "$path" && test ! -d "$path"; then
22521        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22522      fi
22523
22524      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22525    fi
22526  fi
22527
22528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22529$as_echo_n "checking for Boot JDK... " >&6; }
22530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22531$as_echo "$BOOT_JDK" >&6; }
22532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22533$as_echo_n "checking Boot JDK version... " >&6; }
22534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22536$as_echo "$BOOT_JDK_VERSION" >&6; }
22537          fi # end check jdk version
22538        fi # end check javac
22539      fi # end check java
22540    fi # end check boot jdk found
22541  fi
22542
22543    done
22544  fi
22545
22546  fi
22547
22548
22549    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22550    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22551      # Do we have a bin/java?
22552      if test ! -x "$BOOT_JDK/bin/java"; then
22553        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22555        BOOT_JDK_FOUND=no
22556      else
22557        # Do we have a bin/javac?
22558        if test ! -x "$BOOT_JDK/bin/javac"; then
22559          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22562$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22563          BOOT_JDK_FOUND=no
22564        else
22565          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22566          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22567
22568          # Extra M4 quote needed to protect [] in grep expression.
22569          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22570          if test "x$FOUND_CORRECT_VERSION" = x; then
22571            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22573            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22574$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22575            BOOT_JDK_FOUND=no
22576          else
22577            # We're done! :-)
22578            BOOT_JDK_FOUND=yes
22579
22580  # Only process if variable expands to non-empty
22581
22582  if test "x$BOOT_JDK" != x; then
22583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22584
22585  # Input might be given as Windows format, start by converting to
22586  # unix format.
22587  path="$BOOT_JDK"
22588  new_path=`$CYGPATH -u "$path"`
22589
22590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22593  # "foo.exe" is OK but "foo" is an error.
22594  #
22595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22596  # It is also a way to make sure we got the proper file name for the real test later on.
22597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22598  if test "x$test_shortpath" = x; then
22599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22600$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22601    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22602  fi
22603
22604  # Call helper function which possibly converts this using DOS-style short mode.
22605  # If so, the updated path is stored in $new_path.
22606
22607  input_path="$new_path"
22608  # Check if we need to convert this using DOS-style short mode. If the path
22609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22610  # take no chances and rewrite it.
22611  # Note: m4 eats our [], so we need to use [ and ] instead.
22612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22613  if test "x$has_forbidden_chars" != x; then
22614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22618      # Going to short mode and back again did indeed matter. Since short mode is
22619      # case insensitive, let's make it lowercase to improve readability.
22620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22621      # Now convert it back to Unix-style (cygpath)
22622      input_path=`$CYGPATH -u "$shortmode_path"`
22623      new_path="$input_path"
22624    fi
22625  fi
22626
22627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22628  if test "x$test_cygdrive_prefix" = x; then
22629    # As a simple fix, exclude /usr/bin since it's not a real path.
22630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22632      # a path prefixed by /cygdrive for fixpath to work.
22633      new_path="$CYGWIN_ROOT_PATH$input_path"
22634    fi
22635  fi
22636
22637
22638  if test "x$path" != "x$new_path"; then
22639    BOOT_JDK="$new_path"
22640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22642  fi
22643
22644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22645
22646  path="$BOOT_JDK"
22647  has_colon=`$ECHO $path | $GREP ^.:`
22648  new_path="$path"
22649  if test "x$has_colon" = x; then
22650    # Not in mixed or Windows style, start by that.
22651    new_path=`cmd //c echo $path`
22652  fi
22653
22654
22655  input_path="$new_path"
22656  # Check if we need to convert this using DOS-style short mode. If the path
22657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22658  # take no chances and rewrite it.
22659  # Note: m4 eats our [], so we need to use [ and ] instead.
22660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22661  if test "x$has_forbidden_chars" != x; then
22662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22664  fi
22665
22666
22667  windows_path="$new_path"
22668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22669    unix_path=`$CYGPATH -u "$windows_path"`
22670    new_path="$unix_path"
22671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22673    new_path="$unix_path"
22674  fi
22675
22676  if test "x$path" != "x$new_path"; then
22677    BOOT_JDK="$new_path"
22678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22679$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22680  fi
22681
22682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22684
22685    else
22686      # We're on a unix platform. Hooray! :)
22687      path="$BOOT_JDK"
22688      has_space=`$ECHO "$path" | $GREP " "`
22689      if test "x$has_space" != x; then
22690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22693      fi
22694
22695      # Use eval to expand a potential ~
22696      eval path="$path"
22697      if test ! -f "$path" && test ! -d "$path"; then
22698        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22699      fi
22700
22701      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22702    fi
22703  fi
22704
22705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22706$as_echo_n "checking for Boot JDK... " >&6; }
22707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22708$as_echo "$BOOT_JDK" >&6; }
22709            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22710$as_echo_n "checking Boot JDK version... " >&6; }
22711            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22713$as_echo "$BOOT_JDK_VERSION" >&6; }
22714          fi # end check jdk version
22715        fi # end check javac
22716      fi # end check java
22717    fi # end check boot jdk found
22718  fi
22719
22720
22721  if test "x$BOOT_JDK_FOUND" = xno; then
22722    # Now execute the test
22723
22724  if test "x$PROGRAMW6432" != x; then
22725    VIRTUAL_DIR="$PROGRAMW6432/Java"
22726
22727  windows_path="$VIRTUAL_DIR"
22728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22729    unix_path=`$CYGPATH -u "$windows_path"`
22730    VIRTUAL_DIR="$unix_path"
22731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22733    VIRTUAL_DIR="$unix_path"
22734  fi
22735
22736
22737  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22738  BOOT_JDK_SUFFIX=""
22739  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22740  if test "x$ALL_JDKS_FOUND" != x; then
22741    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22742
22743  if test "x$BOOT_JDK_FOUND" = xno; then
22744    # Now execute the test
22745
22746        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22747        if test -d "$BOOT_JDK"; then
22748          BOOT_JDK_FOUND=maybe
22749          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22750$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22751        fi
22752
22753
22754    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22755    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22756      # Do we have a bin/java?
22757      if test ! -x "$BOOT_JDK/bin/java"; then
22758        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22760        BOOT_JDK_FOUND=no
22761      else
22762        # Do we have a bin/javac?
22763        if test ! -x "$BOOT_JDK/bin/javac"; then
22764          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22766          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22767$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22768          BOOT_JDK_FOUND=no
22769        else
22770          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22771          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22772
22773          # Extra M4 quote needed to protect [] in grep expression.
22774          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22775          if test "x$FOUND_CORRECT_VERSION" = x; then
22776            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22778            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22779$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22780            BOOT_JDK_FOUND=no
22781          else
22782            # We're done! :-)
22783            BOOT_JDK_FOUND=yes
22784
22785  # Only process if variable expands to non-empty
22786
22787  if test "x$BOOT_JDK" != x; then
22788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22789
22790  # Input might be given as Windows format, start by converting to
22791  # unix format.
22792  path="$BOOT_JDK"
22793  new_path=`$CYGPATH -u "$path"`
22794
22795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22798  # "foo.exe" is OK but "foo" is an error.
22799  #
22800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22801  # It is also a way to make sure we got the proper file name for the real test later on.
22802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22803  if test "x$test_shortpath" = x; then
22804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22805$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22806    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22807  fi
22808
22809  # Call helper function which possibly converts this using DOS-style short mode.
22810  # If so, the updated path is stored in $new_path.
22811
22812  input_path="$new_path"
22813  # Check if we need to convert this using DOS-style short mode. If the path
22814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22815  # take no chances and rewrite it.
22816  # Note: m4 eats our [], so we need to use [ and ] instead.
22817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22818  if test "x$has_forbidden_chars" != x; then
22819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22823      # Going to short mode and back again did indeed matter. Since short mode is
22824      # case insensitive, let's make it lowercase to improve readability.
22825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22826      # Now convert it back to Unix-style (cygpath)
22827      input_path=`$CYGPATH -u "$shortmode_path"`
22828      new_path="$input_path"
22829    fi
22830  fi
22831
22832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22833  if test "x$test_cygdrive_prefix" = x; then
22834    # As a simple fix, exclude /usr/bin since it's not a real path.
22835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22837      # a path prefixed by /cygdrive for fixpath to work.
22838      new_path="$CYGWIN_ROOT_PATH$input_path"
22839    fi
22840  fi
22841
22842
22843  if test "x$path" != "x$new_path"; then
22844    BOOT_JDK="$new_path"
22845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22847  fi
22848
22849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22850
22851  path="$BOOT_JDK"
22852  has_colon=`$ECHO $path | $GREP ^.:`
22853  new_path="$path"
22854  if test "x$has_colon" = x; then
22855    # Not in mixed or Windows style, start by that.
22856    new_path=`cmd //c echo $path`
22857  fi
22858
22859
22860  input_path="$new_path"
22861  # Check if we need to convert this using DOS-style short mode. If the path
22862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22863  # take no chances and rewrite it.
22864  # Note: m4 eats our [], so we need to use [ and ] instead.
22865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22866  if test "x$has_forbidden_chars" != x; then
22867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22869  fi
22870
22871
22872  windows_path="$new_path"
22873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22874    unix_path=`$CYGPATH -u "$windows_path"`
22875    new_path="$unix_path"
22876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22878    new_path="$unix_path"
22879  fi
22880
22881  if test "x$path" != "x$new_path"; then
22882    BOOT_JDK="$new_path"
22883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22884$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22885  fi
22886
22887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22889
22890    else
22891      # We're on a unix platform. Hooray! :)
22892      path="$BOOT_JDK"
22893      has_space=`$ECHO "$path" | $GREP " "`
22894      if test "x$has_space" != x; then
22895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22896$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22898      fi
22899
22900      # Use eval to expand a potential ~
22901      eval path="$path"
22902      if test ! -f "$path" && test ! -d "$path"; then
22903        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22904      fi
22905
22906      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22907    fi
22908  fi
22909
22910            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22911$as_echo_n "checking for Boot JDK... " >&6; }
22912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22913$as_echo "$BOOT_JDK" >&6; }
22914            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22915$as_echo_n "checking Boot JDK version... " >&6; }
22916            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22918$as_echo "$BOOT_JDK_VERSION" >&6; }
22919          fi # end check jdk version
22920        fi # end check javac
22921      fi # end check java
22922    fi # end check boot jdk found
22923  fi
22924
22925    done
22926  fi
22927
22928  fi
22929
22930
22931    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22932    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22933      # Do we have a bin/java?
22934      if test ! -x "$BOOT_JDK/bin/java"; then
22935        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22937        BOOT_JDK_FOUND=no
22938      else
22939        # Do we have a bin/javac?
22940        if test ! -x "$BOOT_JDK/bin/javac"; then
22941          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22943          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22944$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22945          BOOT_JDK_FOUND=no
22946        else
22947          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22948          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22949
22950          # Extra M4 quote needed to protect [] in grep expression.
22951          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22952          if test "x$FOUND_CORRECT_VERSION" = x; then
22953            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22955            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22956$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22957            BOOT_JDK_FOUND=no
22958          else
22959            # We're done! :-)
22960            BOOT_JDK_FOUND=yes
22961
22962  # Only process if variable expands to non-empty
22963
22964  if test "x$BOOT_JDK" != x; then
22965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22966
22967  # Input might be given as Windows format, start by converting to
22968  # unix format.
22969  path="$BOOT_JDK"
22970  new_path=`$CYGPATH -u "$path"`
22971
22972  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22973  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22974  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22975  # "foo.exe" is OK but "foo" is an error.
22976  #
22977  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22978  # It is also a way to make sure we got the proper file name for the real test later on.
22979  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22980  if test "x$test_shortpath" = x; then
22981    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22983    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22984  fi
22985
22986  # Call helper function which possibly converts this using DOS-style short mode.
22987  # If so, the updated path is stored in $new_path.
22988
22989  input_path="$new_path"
22990  # Check if we need to convert this using DOS-style short mode. If the path
22991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22992  # take no chances and rewrite it.
22993  # Note: m4 eats our [], so we need to use [ and ] instead.
22994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22995  if test "x$has_forbidden_chars" != x; then
22996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23000      # Going to short mode and back again did indeed matter. Since short mode is
23001      # case insensitive, let's make it lowercase to improve readability.
23002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23003      # Now convert it back to Unix-style (cygpath)
23004      input_path=`$CYGPATH -u "$shortmode_path"`
23005      new_path="$input_path"
23006    fi
23007  fi
23008
23009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23010  if test "x$test_cygdrive_prefix" = x; then
23011    # As a simple fix, exclude /usr/bin since it's not a real path.
23012    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23014      # a path prefixed by /cygdrive for fixpath to work.
23015      new_path="$CYGWIN_ROOT_PATH$input_path"
23016    fi
23017  fi
23018
23019
23020  if test "x$path" != "x$new_path"; then
23021    BOOT_JDK="$new_path"
23022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23024  fi
23025
23026    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23027
23028  path="$BOOT_JDK"
23029  has_colon=`$ECHO $path | $GREP ^.:`
23030  new_path="$path"
23031  if test "x$has_colon" = x; then
23032    # Not in mixed or Windows style, start by that.
23033    new_path=`cmd //c echo $path`
23034  fi
23035
23036
23037  input_path="$new_path"
23038  # Check if we need to convert this using DOS-style short mode. If the path
23039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23040  # take no chances and rewrite it.
23041  # Note: m4 eats our [], so we need to use [ and ] instead.
23042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23043  if test "x$has_forbidden_chars" != x; then
23044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23045    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23046  fi
23047
23048
23049  windows_path="$new_path"
23050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23051    unix_path=`$CYGPATH -u "$windows_path"`
23052    new_path="$unix_path"
23053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23055    new_path="$unix_path"
23056  fi
23057
23058  if test "x$path" != "x$new_path"; then
23059    BOOT_JDK="$new_path"
23060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23061$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23062  fi
23063
23064  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23065  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23066
23067    else
23068      # We're on a unix platform. Hooray! :)
23069      path="$BOOT_JDK"
23070      has_space=`$ECHO "$path" | $GREP " "`
23071      if test "x$has_space" != x; then
23072        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23073$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23074        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23075      fi
23076
23077      # Use eval to expand a potential ~
23078      eval path="$path"
23079      if test ! -f "$path" && test ! -d "$path"; then
23080        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23081      fi
23082
23083      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23084    fi
23085  fi
23086
23087            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23088$as_echo_n "checking for Boot JDK... " >&6; }
23089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23090$as_echo "$BOOT_JDK" >&6; }
23091            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23092$as_echo_n "checking Boot JDK version... " >&6; }
23093            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23095$as_echo "$BOOT_JDK_VERSION" >&6; }
23096          fi # end check jdk version
23097        fi # end check javac
23098      fi # end check java
23099    fi # end check boot jdk found
23100  fi
23101
23102
23103  if test "x$BOOT_JDK_FOUND" = xno; then
23104    # Now execute the test
23105
23106  if test "x$PROGRAMFILES" != x; then
23107    VIRTUAL_DIR="$PROGRAMFILES/Java"
23108
23109  windows_path="$VIRTUAL_DIR"
23110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23111    unix_path=`$CYGPATH -u "$windows_path"`
23112    VIRTUAL_DIR="$unix_path"
23113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23115    VIRTUAL_DIR="$unix_path"
23116  fi
23117
23118
23119  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23120  BOOT_JDK_SUFFIX=""
23121  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23122  if test "x$ALL_JDKS_FOUND" != x; then
23123    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23124
23125  if test "x$BOOT_JDK_FOUND" = xno; then
23126    # Now execute the test
23127
23128        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23129        if test -d "$BOOT_JDK"; then
23130          BOOT_JDK_FOUND=maybe
23131          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23132$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23133        fi
23134
23135
23136    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23137    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23138      # Do we have a bin/java?
23139      if test ! -x "$BOOT_JDK/bin/java"; then
23140        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23142        BOOT_JDK_FOUND=no
23143      else
23144        # Do we have a bin/javac?
23145        if test ! -x "$BOOT_JDK/bin/javac"; then
23146          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23148          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23149$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23150          BOOT_JDK_FOUND=no
23151        else
23152          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23153          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23154
23155          # Extra M4 quote needed to protect [] in grep expression.
23156          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23157          if test "x$FOUND_CORRECT_VERSION" = x; then
23158            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23160            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23161$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23162            BOOT_JDK_FOUND=no
23163          else
23164            # We're done! :-)
23165            BOOT_JDK_FOUND=yes
23166
23167  # Only process if variable expands to non-empty
23168
23169  if test "x$BOOT_JDK" != x; then
23170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23171
23172  # Input might be given as Windows format, start by converting to
23173  # unix format.
23174  path="$BOOT_JDK"
23175  new_path=`$CYGPATH -u "$path"`
23176
23177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23180  # "foo.exe" is OK but "foo" is an error.
23181  #
23182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23183  # It is also a way to make sure we got the proper file name for the real test later on.
23184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23185  if test "x$test_shortpath" = x; then
23186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23188    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23189  fi
23190
23191  # Call helper function which possibly converts this using DOS-style short mode.
23192  # If so, the updated path is stored in $new_path.
23193
23194  input_path="$new_path"
23195  # Check if we need to convert this using DOS-style short mode. If the path
23196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23197  # take no chances and rewrite it.
23198  # Note: m4 eats our [], so we need to use [ and ] instead.
23199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23200  if test "x$has_forbidden_chars" != x; then
23201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23205      # Going to short mode and back again did indeed matter. Since short mode is
23206      # case insensitive, let's make it lowercase to improve readability.
23207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23208      # Now convert it back to Unix-style (cygpath)
23209      input_path=`$CYGPATH -u "$shortmode_path"`
23210      new_path="$input_path"
23211    fi
23212  fi
23213
23214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23215  if test "x$test_cygdrive_prefix" = x; then
23216    # As a simple fix, exclude /usr/bin since it's not a real path.
23217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23219      # a path prefixed by /cygdrive for fixpath to work.
23220      new_path="$CYGWIN_ROOT_PATH$input_path"
23221    fi
23222  fi
23223
23224
23225  if test "x$path" != "x$new_path"; then
23226    BOOT_JDK="$new_path"
23227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23229  fi
23230
23231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23232
23233  path="$BOOT_JDK"
23234  has_colon=`$ECHO $path | $GREP ^.:`
23235  new_path="$path"
23236  if test "x$has_colon" = x; then
23237    # Not in mixed or Windows style, start by that.
23238    new_path=`cmd //c echo $path`
23239  fi
23240
23241
23242  input_path="$new_path"
23243  # Check if we need to convert this using DOS-style short mode. If the path
23244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23245  # take no chances and rewrite it.
23246  # Note: m4 eats our [], so we need to use [ and ] instead.
23247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23248  if test "x$has_forbidden_chars" != x; then
23249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23251  fi
23252
23253
23254  windows_path="$new_path"
23255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23256    unix_path=`$CYGPATH -u "$windows_path"`
23257    new_path="$unix_path"
23258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23260    new_path="$unix_path"
23261  fi
23262
23263  if test "x$path" != "x$new_path"; then
23264    BOOT_JDK="$new_path"
23265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23267  fi
23268
23269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23271
23272    else
23273      # We're on a unix platform. Hooray! :)
23274      path="$BOOT_JDK"
23275      has_space=`$ECHO "$path" | $GREP " "`
23276      if test "x$has_space" != x; then
23277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23280      fi
23281
23282      # Use eval to expand a potential ~
23283      eval path="$path"
23284      if test ! -f "$path" && test ! -d "$path"; then
23285        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23286      fi
23287
23288      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23289    fi
23290  fi
23291
23292            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23293$as_echo_n "checking for Boot JDK... " >&6; }
23294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23295$as_echo "$BOOT_JDK" >&6; }
23296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23297$as_echo_n "checking Boot JDK version... " >&6; }
23298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23300$as_echo "$BOOT_JDK_VERSION" >&6; }
23301          fi # end check jdk version
23302        fi # end check javac
23303      fi # end check java
23304    fi # end check boot jdk found
23305  fi
23306
23307    done
23308  fi
23309
23310  fi
23311
23312
23313    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23314    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23315      # Do we have a bin/java?
23316      if test ! -x "$BOOT_JDK/bin/java"; then
23317        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23318$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23319        BOOT_JDK_FOUND=no
23320      else
23321        # Do we have a bin/javac?
23322        if test ! -x "$BOOT_JDK/bin/javac"; then
23323          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23325          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23326$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23327          BOOT_JDK_FOUND=no
23328        else
23329          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23330          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23331
23332          # Extra M4 quote needed to protect [] in grep expression.
23333          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23334          if test "x$FOUND_CORRECT_VERSION" = x; then
23335            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23336$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23337            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23338$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23339            BOOT_JDK_FOUND=no
23340          else
23341            # We're done! :-)
23342            BOOT_JDK_FOUND=yes
23343
23344  # Only process if variable expands to non-empty
23345
23346  if test "x$BOOT_JDK" != x; then
23347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23348
23349  # Input might be given as Windows format, start by converting to
23350  # unix format.
23351  path="$BOOT_JDK"
23352  new_path=`$CYGPATH -u "$path"`
23353
23354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23357  # "foo.exe" is OK but "foo" is an error.
23358  #
23359  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23360  # It is also a way to make sure we got the proper file name for the real test later on.
23361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23362  if test "x$test_shortpath" = x; then
23363    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23364$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23365    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23366  fi
23367
23368  # Call helper function which possibly converts this using DOS-style short mode.
23369  # If so, the updated path is stored in $new_path.
23370
23371  input_path="$new_path"
23372  # Check if we need to convert this using DOS-style short mode. If the path
23373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23374  # take no chances and rewrite it.
23375  # Note: m4 eats our [], so we need to use [ and ] instead.
23376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23377  if test "x$has_forbidden_chars" != x; then
23378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23382      # Going to short mode and back again did indeed matter. Since short mode is
23383      # case insensitive, let's make it lowercase to improve readability.
23384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23385      # Now convert it back to Unix-style (cygpath)
23386      input_path=`$CYGPATH -u "$shortmode_path"`
23387      new_path="$input_path"
23388    fi
23389  fi
23390
23391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23392  if test "x$test_cygdrive_prefix" = x; then
23393    # As a simple fix, exclude /usr/bin since it's not a real path.
23394    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23396      # a path prefixed by /cygdrive for fixpath to work.
23397      new_path="$CYGWIN_ROOT_PATH$input_path"
23398    fi
23399  fi
23400
23401
23402  if test "x$path" != "x$new_path"; then
23403    BOOT_JDK="$new_path"
23404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23405$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23406  fi
23407
23408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23409
23410  path="$BOOT_JDK"
23411  has_colon=`$ECHO $path | $GREP ^.:`
23412  new_path="$path"
23413  if test "x$has_colon" = x; then
23414    # Not in mixed or Windows style, start by that.
23415    new_path=`cmd //c echo $path`
23416  fi
23417
23418
23419  input_path="$new_path"
23420  # Check if we need to convert this using DOS-style short mode. If the path
23421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23422  # take no chances and rewrite it.
23423  # Note: m4 eats our [], so we need to use [ and ] instead.
23424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23425  if test "x$has_forbidden_chars" != x; then
23426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23428  fi
23429
23430
23431  windows_path="$new_path"
23432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23433    unix_path=`$CYGPATH -u "$windows_path"`
23434    new_path="$unix_path"
23435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23437    new_path="$unix_path"
23438  fi
23439
23440  if test "x$path" != "x$new_path"; then
23441    BOOT_JDK="$new_path"
23442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23443$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23444  fi
23445
23446  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23447  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23448
23449    else
23450      # We're on a unix platform. Hooray! :)
23451      path="$BOOT_JDK"
23452      has_space=`$ECHO "$path" | $GREP " "`
23453      if test "x$has_space" != x; then
23454        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23455$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23456        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23457      fi
23458
23459      # Use eval to expand a potential ~
23460      eval path="$path"
23461      if test ! -f "$path" && test ! -d "$path"; then
23462        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23463      fi
23464
23465      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23466    fi
23467  fi
23468
23469            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23470$as_echo_n "checking for Boot JDK... " >&6; }
23471            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23472$as_echo "$BOOT_JDK" >&6; }
23473            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23474$as_echo_n "checking Boot JDK version... " >&6; }
23475            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23477$as_echo "$BOOT_JDK_VERSION" >&6; }
23478          fi # end check jdk version
23479        fi # end check javac
23480      fi # end check java
23481    fi # end check boot jdk found
23482  fi
23483
23484
23485  if test "x$BOOT_JDK_FOUND" = xno; then
23486    # Now execute the test
23487
23488  if test "x$ProgramFiles" != x; then
23489    VIRTUAL_DIR="$ProgramFiles/Java"
23490
23491  windows_path="$VIRTUAL_DIR"
23492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23493    unix_path=`$CYGPATH -u "$windows_path"`
23494    VIRTUAL_DIR="$unix_path"
23495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23497    VIRTUAL_DIR="$unix_path"
23498  fi
23499
23500
23501  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23502  BOOT_JDK_SUFFIX=""
23503  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23504  if test "x$ALL_JDKS_FOUND" != x; then
23505    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23506
23507  if test "x$BOOT_JDK_FOUND" = xno; then
23508    # Now execute the test
23509
23510        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23511        if test -d "$BOOT_JDK"; then
23512          BOOT_JDK_FOUND=maybe
23513          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23514$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23515        fi
23516
23517
23518    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23519    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23520      # Do we have a bin/java?
23521      if test ! -x "$BOOT_JDK/bin/java"; then
23522        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23524        BOOT_JDK_FOUND=no
23525      else
23526        # Do we have a bin/javac?
23527        if test ! -x "$BOOT_JDK/bin/javac"; then
23528          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23530          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23531$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23532          BOOT_JDK_FOUND=no
23533        else
23534          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23535          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23536
23537          # Extra M4 quote needed to protect [] in grep expression.
23538          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23539          if test "x$FOUND_CORRECT_VERSION" = x; then
23540            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23542            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23543$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23544            BOOT_JDK_FOUND=no
23545          else
23546            # We're done! :-)
23547            BOOT_JDK_FOUND=yes
23548
23549  # Only process if variable expands to non-empty
23550
23551  if test "x$BOOT_JDK" != x; then
23552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23553
23554  # Input might be given as Windows format, start by converting to
23555  # unix format.
23556  path="$BOOT_JDK"
23557  new_path=`$CYGPATH -u "$path"`
23558
23559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23562  # "foo.exe" is OK but "foo" is an error.
23563  #
23564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23565  # It is also a way to make sure we got the proper file name for the real test later on.
23566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23567  if test "x$test_shortpath" = x; then
23568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23569$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23570    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23571  fi
23572
23573  # Call helper function which possibly converts this using DOS-style short mode.
23574  # If so, the updated path is stored in $new_path.
23575
23576  input_path="$new_path"
23577  # Check if we need to convert this using DOS-style short mode. If the path
23578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23579  # take no chances and rewrite it.
23580  # Note: m4 eats our [], so we need to use [ and ] instead.
23581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23582  if test "x$has_forbidden_chars" != x; then
23583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23587      # Going to short mode and back again did indeed matter. Since short mode is
23588      # case insensitive, let's make it lowercase to improve readability.
23589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23590      # Now convert it back to Unix-style (cygpath)
23591      input_path=`$CYGPATH -u "$shortmode_path"`
23592      new_path="$input_path"
23593    fi
23594  fi
23595
23596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23597  if test "x$test_cygdrive_prefix" = x; then
23598    # As a simple fix, exclude /usr/bin since it's not a real path.
23599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23601      # a path prefixed by /cygdrive for fixpath to work.
23602      new_path="$CYGWIN_ROOT_PATH$input_path"
23603    fi
23604  fi
23605
23606
23607  if test "x$path" != "x$new_path"; then
23608    BOOT_JDK="$new_path"
23609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23610$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23611  fi
23612
23613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23614
23615  path="$BOOT_JDK"
23616  has_colon=`$ECHO $path | $GREP ^.:`
23617  new_path="$path"
23618  if test "x$has_colon" = x; then
23619    # Not in mixed or Windows style, start by that.
23620    new_path=`cmd //c echo $path`
23621  fi
23622
23623
23624  input_path="$new_path"
23625  # Check if we need to convert this using DOS-style short mode. If the path
23626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23627  # take no chances and rewrite it.
23628  # Note: m4 eats our [], so we need to use [ and ] instead.
23629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23630  if test "x$has_forbidden_chars" != x; then
23631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23633  fi
23634
23635
23636  windows_path="$new_path"
23637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23638    unix_path=`$CYGPATH -u "$windows_path"`
23639    new_path="$unix_path"
23640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23642    new_path="$unix_path"
23643  fi
23644
23645  if test "x$path" != "x$new_path"; then
23646    BOOT_JDK="$new_path"
23647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23649  fi
23650
23651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23653
23654    else
23655      # We're on a unix platform. Hooray! :)
23656      path="$BOOT_JDK"
23657      has_space=`$ECHO "$path" | $GREP " "`
23658      if test "x$has_space" != x; then
23659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23660$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23662      fi
23663
23664      # Use eval to expand a potential ~
23665      eval path="$path"
23666      if test ! -f "$path" && test ! -d "$path"; then
23667        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23668      fi
23669
23670      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23671    fi
23672  fi
23673
23674            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23675$as_echo_n "checking for Boot JDK... " >&6; }
23676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23677$as_echo "$BOOT_JDK" >&6; }
23678            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23679$as_echo_n "checking Boot JDK version... " >&6; }
23680            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23682$as_echo "$BOOT_JDK_VERSION" >&6; }
23683          fi # end check jdk version
23684        fi # end check javac
23685      fi # end check java
23686    fi # end check boot jdk found
23687  fi
23688
23689    done
23690  fi
23691
23692  fi
23693
23694
23695    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23696    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23697      # Do we have a bin/java?
23698      if test ! -x "$BOOT_JDK/bin/java"; then
23699        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23701        BOOT_JDK_FOUND=no
23702      else
23703        # Do we have a bin/javac?
23704        if test ! -x "$BOOT_JDK/bin/javac"; then
23705          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23707          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23708$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23709          BOOT_JDK_FOUND=no
23710        else
23711          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23712          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23713
23714          # Extra M4 quote needed to protect [] in grep expression.
23715          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23716          if test "x$FOUND_CORRECT_VERSION" = x; then
23717            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23719            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23720$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23721            BOOT_JDK_FOUND=no
23722          else
23723            # We're done! :-)
23724            BOOT_JDK_FOUND=yes
23725
23726  # Only process if variable expands to non-empty
23727
23728  if test "x$BOOT_JDK" != x; then
23729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23730
23731  # Input might be given as Windows format, start by converting to
23732  # unix format.
23733  path="$BOOT_JDK"
23734  new_path=`$CYGPATH -u "$path"`
23735
23736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23739  # "foo.exe" is OK but "foo" is an error.
23740  #
23741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23742  # It is also a way to make sure we got the proper file name for the real test later on.
23743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23744  if test "x$test_shortpath" = x; then
23745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23747    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23748  fi
23749
23750  # Call helper function which possibly converts this using DOS-style short mode.
23751  # If so, the updated path is stored in $new_path.
23752
23753  input_path="$new_path"
23754  # Check if we need to convert this using DOS-style short mode. If the path
23755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23756  # take no chances and rewrite it.
23757  # Note: m4 eats our [], so we need to use [ and ] instead.
23758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23759  if test "x$has_forbidden_chars" != x; then
23760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23764      # Going to short mode and back again did indeed matter. Since short mode is
23765      # case insensitive, let's make it lowercase to improve readability.
23766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23767      # Now convert it back to Unix-style (cygpath)
23768      input_path=`$CYGPATH -u "$shortmode_path"`
23769      new_path="$input_path"
23770    fi
23771  fi
23772
23773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23774  if test "x$test_cygdrive_prefix" = x; then
23775    # As a simple fix, exclude /usr/bin since it's not a real path.
23776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23778      # a path prefixed by /cygdrive for fixpath to work.
23779      new_path="$CYGWIN_ROOT_PATH$input_path"
23780    fi
23781  fi
23782
23783
23784  if test "x$path" != "x$new_path"; then
23785    BOOT_JDK="$new_path"
23786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23788  fi
23789
23790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23791
23792  path="$BOOT_JDK"
23793  has_colon=`$ECHO $path | $GREP ^.:`
23794  new_path="$path"
23795  if test "x$has_colon" = x; then
23796    # Not in mixed or Windows style, start by that.
23797    new_path=`cmd //c echo $path`
23798  fi
23799
23800
23801  input_path="$new_path"
23802  # Check if we need to convert this using DOS-style short mode. If the path
23803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23804  # take no chances and rewrite it.
23805  # Note: m4 eats our [], so we need to use [ and ] instead.
23806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23807  if test "x$has_forbidden_chars" != x; then
23808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23810  fi
23811
23812
23813  windows_path="$new_path"
23814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23815    unix_path=`$CYGPATH -u "$windows_path"`
23816    new_path="$unix_path"
23817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23819    new_path="$unix_path"
23820  fi
23821
23822  if test "x$path" != "x$new_path"; then
23823    BOOT_JDK="$new_path"
23824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23826  fi
23827
23828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23830
23831    else
23832      # We're on a unix platform. Hooray! :)
23833      path="$BOOT_JDK"
23834      has_space=`$ECHO "$path" | $GREP " "`
23835      if test "x$has_space" != x; then
23836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23839      fi
23840
23841      # Use eval to expand a potential ~
23842      eval path="$path"
23843      if test ! -f "$path" && test ! -d "$path"; then
23844        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23845      fi
23846
23847      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23848    fi
23849  fi
23850
23851            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23852$as_echo_n "checking for Boot JDK... " >&6; }
23853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23854$as_echo "$BOOT_JDK" >&6; }
23855            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23856$as_echo_n "checking Boot JDK version... " >&6; }
23857            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23858            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23859$as_echo "$BOOT_JDK_VERSION" >&6; }
23860          fi # end check jdk version
23861        fi # end check javac
23862      fi # end check java
23863    fi # end check boot jdk found
23864  fi
23865
23866
23867  if test "x$BOOT_JDK_FOUND" = xno; then
23868    # Now execute the test
23869
23870  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23871  BOOT_JDK_SUFFIX=""
23872  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23873  if test "x$ALL_JDKS_FOUND" != x; then
23874    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23875
23876  if test "x$BOOT_JDK_FOUND" = xno; then
23877    # Now execute the test
23878
23879        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23880        if test -d "$BOOT_JDK"; then
23881          BOOT_JDK_FOUND=maybe
23882          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23883$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23884        fi
23885
23886
23887    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23888    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23889      # Do we have a bin/java?
23890      if test ! -x "$BOOT_JDK/bin/java"; then
23891        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23893        BOOT_JDK_FOUND=no
23894      else
23895        # Do we have a bin/javac?
23896        if test ! -x "$BOOT_JDK/bin/javac"; then
23897          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23899          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23900$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23901          BOOT_JDK_FOUND=no
23902        else
23903          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23904          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23905
23906          # Extra M4 quote needed to protect [] in grep expression.
23907          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23908          if test "x$FOUND_CORRECT_VERSION" = x; then
23909            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23911            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23912$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23913            BOOT_JDK_FOUND=no
23914          else
23915            # We're done! :-)
23916            BOOT_JDK_FOUND=yes
23917
23918  # Only process if variable expands to non-empty
23919
23920  if test "x$BOOT_JDK" != x; then
23921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23922
23923  # Input might be given as Windows format, start by converting to
23924  # unix format.
23925  path="$BOOT_JDK"
23926  new_path=`$CYGPATH -u "$path"`
23927
23928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23931  # "foo.exe" is OK but "foo" is an error.
23932  #
23933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23934  # It is also a way to make sure we got the proper file name for the real test later on.
23935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23936  if test "x$test_shortpath" = x; then
23937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23938$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23939    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23940  fi
23941
23942  # Call helper function which possibly converts this using DOS-style short mode.
23943  # If so, the updated path is stored in $new_path.
23944
23945  input_path="$new_path"
23946  # Check if we need to convert this using DOS-style short mode. If the path
23947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23948  # take no chances and rewrite it.
23949  # Note: m4 eats our [], so we need to use [ and ] instead.
23950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23951  if test "x$has_forbidden_chars" != x; then
23952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23956      # Going to short mode and back again did indeed matter. Since short mode is
23957      # case insensitive, let's make it lowercase to improve readability.
23958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23959      # Now convert it back to Unix-style (cygpath)
23960      input_path=`$CYGPATH -u "$shortmode_path"`
23961      new_path="$input_path"
23962    fi
23963  fi
23964
23965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23966  if test "x$test_cygdrive_prefix" = x; then
23967    # As a simple fix, exclude /usr/bin since it's not a real path.
23968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23970      # a path prefixed by /cygdrive for fixpath to work.
23971      new_path="$CYGWIN_ROOT_PATH$input_path"
23972    fi
23973  fi
23974
23975
23976  if test "x$path" != "x$new_path"; then
23977    BOOT_JDK="$new_path"
23978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23979$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23980  fi
23981
23982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23983
23984  path="$BOOT_JDK"
23985  has_colon=`$ECHO $path | $GREP ^.:`
23986  new_path="$path"
23987  if test "x$has_colon" = x; then
23988    # Not in mixed or Windows style, start by that.
23989    new_path=`cmd //c echo $path`
23990  fi
23991
23992
23993  input_path="$new_path"
23994  # Check if we need to convert this using DOS-style short mode. If the path
23995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23996  # take no chances and rewrite it.
23997  # Note: m4 eats our [], so we need to use [ and ] instead.
23998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23999  if test "x$has_forbidden_chars" != x; then
24000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24002  fi
24003
24004
24005  windows_path="$new_path"
24006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24007    unix_path=`$CYGPATH -u "$windows_path"`
24008    new_path="$unix_path"
24009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24011    new_path="$unix_path"
24012  fi
24013
24014  if test "x$path" != "x$new_path"; then
24015    BOOT_JDK="$new_path"
24016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24017$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24018  fi
24019
24020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24022
24023    else
24024      # We're on a unix platform. Hooray! :)
24025      path="$BOOT_JDK"
24026      has_space=`$ECHO "$path" | $GREP " "`
24027      if test "x$has_space" != x; then
24028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24031      fi
24032
24033      # Use eval to expand a potential ~
24034      eval path="$path"
24035      if test ! -f "$path" && test ! -d "$path"; then
24036        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24037      fi
24038
24039      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24040    fi
24041  fi
24042
24043            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24044$as_echo_n "checking for Boot JDK... " >&6; }
24045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24046$as_echo "$BOOT_JDK" >&6; }
24047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24048$as_echo_n "checking Boot JDK version... " >&6; }
24049            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24051$as_echo "$BOOT_JDK_VERSION" >&6; }
24052          fi # end check jdk version
24053        fi # end check javac
24054      fi # end check java
24055    fi # end check boot jdk found
24056  fi
24057
24058    done
24059  fi
24060
24061
24062    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24063    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24064      # Do we have a bin/java?
24065      if test ! -x "$BOOT_JDK/bin/java"; then
24066        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24068        BOOT_JDK_FOUND=no
24069      else
24070        # Do we have a bin/javac?
24071        if test ! -x "$BOOT_JDK/bin/javac"; then
24072          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24074          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24075$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24076          BOOT_JDK_FOUND=no
24077        else
24078          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24079          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24080
24081          # Extra M4 quote needed to protect [] in grep expression.
24082          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24083          if test "x$FOUND_CORRECT_VERSION" = x; then
24084            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24086            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24087$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24088            BOOT_JDK_FOUND=no
24089          else
24090            # We're done! :-)
24091            BOOT_JDK_FOUND=yes
24092
24093  # Only process if variable expands to non-empty
24094
24095  if test "x$BOOT_JDK" != x; then
24096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24097
24098  # Input might be given as Windows format, start by converting to
24099  # unix format.
24100  path="$BOOT_JDK"
24101  new_path=`$CYGPATH -u "$path"`
24102
24103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24106  # "foo.exe" is OK but "foo" is an error.
24107  #
24108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24109  # It is also a way to make sure we got the proper file name for the real test later on.
24110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24111  if test "x$test_shortpath" = x; then
24112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24114    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24115  fi
24116
24117  # Call helper function which possibly converts this using DOS-style short mode.
24118  # If so, the updated path is stored in $new_path.
24119
24120  input_path="$new_path"
24121  # Check if we need to convert this using DOS-style short mode. If the path
24122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24123  # take no chances and rewrite it.
24124  # Note: m4 eats our [], so we need to use [ and ] instead.
24125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24126  if test "x$has_forbidden_chars" != x; then
24127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24131      # Going to short mode and back again did indeed matter. Since short mode is
24132      # case insensitive, let's make it lowercase to improve readability.
24133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24134      # Now convert it back to Unix-style (cygpath)
24135      input_path=`$CYGPATH -u "$shortmode_path"`
24136      new_path="$input_path"
24137    fi
24138  fi
24139
24140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24141  if test "x$test_cygdrive_prefix" = x; then
24142    # As a simple fix, exclude /usr/bin since it's not a real path.
24143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24145      # a path prefixed by /cygdrive for fixpath to work.
24146      new_path="$CYGWIN_ROOT_PATH$input_path"
24147    fi
24148  fi
24149
24150
24151  if test "x$path" != "x$new_path"; then
24152    BOOT_JDK="$new_path"
24153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24155  fi
24156
24157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24158
24159  path="$BOOT_JDK"
24160  has_colon=`$ECHO $path | $GREP ^.:`
24161  new_path="$path"
24162  if test "x$has_colon" = x; then
24163    # Not in mixed or Windows style, start by that.
24164    new_path=`cmd //c echo $path`
24165  fi
24166
24167
24168  input_path="$new_path"
24169  # Check if we need to convert this using DOS-style short mode. If the path
24170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24171  # take no chances and rewrite it.
24172  # Note: m4 eats our [], so we need to use [ and ] instead.
24173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24174  if test "x$has_forbidden_chars" != x; then
24175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24177  fi
24178
24179
24180  windows_path="$new_path"
24181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24182    unix_path=`$CYGPATH -u "$windows_path"`
24183    new_path="$unix_path"
24184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24186    new_path="$unix_path"
24187  fi
24188
24189  if test "x$path" != "x$new_path"; then
24190    BOOT_JDK="$new_path"
24191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24193  fi
24194
24195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24197
24198    else
24199      # We're on a unix platform. Hooray! :)
24200      path="$BOOT_JDK"
24201      has_space=`$ECHO "$path" | $GREP " "`
24202      if test "x$has_space" != x; then
24203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24206      fi
24207
24208      # Use eval to expand a potential ~
24209      eval path="$path"
24210      if test ! -f "$path" && test ! -d "$path"; then
24211        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24212      fi
24213
24214      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24215    fi
24216  fi
24217
24218            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24219$as_echo_n "checking for Boot JDK... " >&6; }
24220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24221$as_echo "$BOOT_JDK" >&6; }
24222            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24223$as_echo_n "checking Boot JDK version... " >&6; }
24224            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24226$as_echo "$BOOT_JDK_VERSION" >&6; }
24227          fi # end check jdk version
24228        fi # end check javac
24229      fi # end check java
24230    fi # end check boot jdk found
24231  fi
24232
24233  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24234
24235  if test "x$BOOT_JDK_FOUND" = xno; then
24236    # Now execute the test
24237
24238  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24239  BOOT_JDK_SUFFIX="/Contents/Home"
24240  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24241  if test "x$ALL_JDKS_FOUND" != x; then
24242    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24243
24244  if test "x$BOOT_JDK_FOUND" = xno; then
24245    # Now execute the test
24246
24247        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24248        if test -d "$BOOT_JDK"; then
24249          BOOT_JDK_FOUND=maybe
24250          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24251$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24252        fi
24253
24254
24255    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24256    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24257      # Do we have a bin/java?
24258      if test ! -x "$BOOT_JDK/bin/java"; then
24259        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24261        BOOT_JDK_FOUND=no
24262      else
24263        # Do we have a bin/javac?
24264        if test ! -x "$BOOT_JDK/bin/javac"; then
24265          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24267          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24268$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24269          BOOT_JDK_FOUND=no
24270        else
24271          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24272          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24273
24274          # Extra M4 quote needed to protect [] in grep expression.
24275          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24276          if test "x$FOUND_CORRECT_VERSION" = x; then
24277            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24279            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24280$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24281            BOOT_JDK_FOUND=no
24282          else
24283            # We're done! :-)
24284            BOOT_JDK_FOUND=yes
24285
24286  # Only process if variable expands to non-empty
24287
24288  if test "x$BOOT_JDK" != x; then
24289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24290
24291  # Input might be given as Windows format, start by converting to
24292  # unix format.
24293  path="$BOOT_JDK"
24294  new_path=`$CYGPATH -u "$path"`
24295
24296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24299  # "foo.exe" is OK but "foo" is an error.
24300  #
24301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24302  # It is also a way to make sure we got the proper file name for the real test later on.
24303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24304  if test "x$test_shortpath" = x; then
24305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24306$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24307    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24308  fi
24309
24310  # Call helper function which possibly converts this using DOS-style short mode.
24311  # If so, the updated path is stored in $new_path.
24312
24313  input_path="$new_path"
24314  # Check if we need to convert this using DOS-style short mode. If the path
24315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24316  # take no chances and rewrite it.
24317  # Note: m4 eats our [], so we need to use [ and ] instead.
24318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24319  if test "x$has_forbidden_chars" != x; then
24320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24324      # Going to short mode and back again did indeed matter. Since short mode is
24325      # case insensitive, let's make it lowercase to improve readability.
24326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24327      # Now convert it back to Unix-style (cygpath)
24328      input_path=`$CYGPATH -u "$shortmode_path"`
24329      new_path="$input_path"
24330    fi
24331  fi
24332
24333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24334  if test "x$test_cygdrive_prefix" = x; then
24335    # As a simple fix, exclude /usr/bin since it's not a real path.
24336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24338      # a path prefixed by /cygdrive for fixpath to work.
24339      new_path="$CYGWIN_ROOT_PATH$input_path"
24340    fi
24341  fi
24342
24343
24344  if test "x$path" != "x$new_path"; then
24345    BOOT_JDK="$new_path"
24346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24348  fi
24349
24350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24351
24352  path="$BOOT_JDK"
24353  has_colon=`$ECHO $path | $GREP ^.:`
24354  new_path="$path"
24355  if test "x$has_colon" = x; then
24356    # Not in mixed or Windows style, start by that.
24357    new_path=`cmd //c echo $path`
24358  fi
24359
24360
24361  input_path="$new_path"
24362  # Check if we need to convert this using DOS-style short mode. If the path
24363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24364  # take no chances and rewrite it.
24365  # Note: m4 eats our [], so we need to use [ and ] instead.
24366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24367  if test "x$has_forbidden_chars" != x; then
24368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24370  fi
24371
24372
24373  windows_path="$new_path"
24374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24375    unix_path=`$CYGPATH -u "$windows_path"`
24376    new_path="$unix_path"
24377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24379    new_path="$unix_path"
24380  fi
24381
24382  if test "x$path" != "x$new_path"; then
24383    BOOT_JDK="$new_path"
24384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24386  fi
24387
24388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24390
24391    else
24392      # We're on a unix platform. Hooray! :)
24393      path="$BOOT_JDK"
24394      has_space=`$ECHO "$path" | $GREP " "`
24395      if test "x$has_space" != x; then
24396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24397$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24399      fi
24400
24401      # Use eval to expand a potential ~
24402      eval path="$path"
24403      if test ! -f "$path" && test ! -d "$path"; then
24404        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24405      fi
24406
24407      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24408    fi
24409  fi
24410
24411            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24412$as_echo_n "checking for Boot JDK... " >&6; }
24413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24414$as_echo "$BOOT_JDK" >&6; }
24415            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24416$as_echo_n "checking Boot JDK version... " >&6; }
24417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24419$as_echo "$BOOT_JDK_VERSION" >&6; }
24420          fi # end check jdk version
24421        fi # end check javac
24422      fi # end check java
24423    fi # end check boot jdk found
24424  fi
24425
24426    done
24427  fi
24428
24429
24430    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24431    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24432      # Do we have a bin/java?
24433      if test ! -x "$BOOT_JDK/bin/java"; then
24434        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24436        BOOT_JDK_FOUND=no
24437      else
24438        # Do we have a bin/javac?
24439        if test ! -x "$BOOT_JDK/bin/javac"; then
24440          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24442          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24443$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24444          BOOT_JDK_FOUND=no
24445        else
24446          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24447          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24448
24449          # Extra M4 quote needed to protect [] in grep expression.
24450          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24451          if test "x$FOUND_CORRECT_VERSION" = x; then
24452            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24454            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24455$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24456            BOOT_JDK_FOUND=no
24457          else
24458            # We're done! :-)
24459            BOOT_JDK_FOUND=yes
24460
24461  # Only process if variable expands to non-empty
24462
24463  if test "x$BOOT_JDK" != x; then
24464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24465
24466  # Input might be given as Windows format, start by converting to
24467  # unix format.
24468  path="$BOOT_JDK"
24469  new_path=`$CYGPATH -u "$path"`
24470
24471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24474  # "foo.exe" is OK but "foo" is an error.
24475  #
24476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24477  # It is also a way to make sure we got the proper file name for the real test later on.
24478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24479  if test "x$test_shortpath" = x; then
24480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24482    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24483  fi
24484
24485  # Call helper function which possibly converts this using DOS-style short mode.
24486  # If so, the updated path is stored in $new_path.
24487
24488  input_path="$new_path"
24489  # Check if we need to convert this using DOS-style short mode. If the path
24490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24491  # take no chances and rewrite it.
24492  # Note: m4 eats our [], so we need to use [ and ] instead.
24493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24494  if test "x$has_forbidden_chars" != x; then
24495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24499      # Going to short mode and back again did indeed matter. Since short mode is
24500      # case insensitive, let's make it lowercase to improve readability.
24501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24502      # Now convert it back to Unix-style (cygpath)
24503      input_path=`$CYGPATH -u "$shortmode_path"`
24504      new_path="$input_path"
24505    fi
24506  fi
24507
24508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24509  if test "x$test_cygdrive_prefix" = x; then
24510    # As a simple fix, exclude /usr/bin since it's not a real path.
24511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24513      # a path prefixed by /cygdrive for fixpath to work.
24514      new_path="$CYGWIN_ROOT_PATH$input_path"
24515    fi
24516  fi
24517
24518
24519  if test "x$path" != "x$new_path"; then
24520    BOOT_JDK="$new_path"
24521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24523  fi
24524
24525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24526
24527  path="$BOOT_JDK"
24528  has_colon=`$ECHO $path | $GREP ^.:`
24529  new_path="$path"
24530  if test "x$has_colon" = x; then
24531    # Not in mixed or Windows style, start by that.
24532    new_path=`cmd //c echo $path`
24533  fi
24534
24535
24536  input_path="$new_path"
24537  # Check if we need to convert this using DOS-style short mode. If the path
24538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24539  # take no chances and rewrite it.
24540  # Note: m4 eats our [], so we need to use [ and ] instead.
24541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24542  if test "x$has_forbidden_chars" != x; then
24543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24545  fi
24546
24547
24548  windows_path="$new_path"
24549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24550    unix_path=`$CYGPATH -u "$windows_path"`
24551    new_path="$unix_path"
24552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24554    new_path="$unix_path"
24555  fi
24556
24557  if test "x$path" != "x$new_path"; then
24558    BOOT_JDK="$new_path"
24559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24561  fi
24562
24563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24565
24566    else
24567      # We're on a unix platform. Hooray! :)
24568      path="$BOOT_JDK"
24569      has_space=`$ECHO "$path" | $GREP " "`
24570      if test "x$has_space" != x; then
24571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24573        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24574      fi
24575
24576      # Use eval to expand a potential ~
24577      eval path="$path"
24578      if test ! -f "$path" && test ! -d "$path"; then
24579        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24580      fi
24581
24582      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24583    fi
24584  fi
24585
24586            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24587$as_echo_n "checking for Boot JDK... " >&6; }
24588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24589$as_echo "$BOOT_JDK" >&6; }
24590            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24591$as_echo_n "checking Boot JDK version... " >&6; }
24592            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24594$as_echo "$BOOT_JDK_VERSION" >&6; }
24595          fi # end check jdk version
24596        fi # end check javac
24597      fi # end check java
24598    fi # end check boot jdk found
24599  fi
24600
24601
24602  if test "x$BOOT_JDK_FOUND" = xno; then
24603    # Now execute the test
24604
24605  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24606  BOOT_JDK_SUFFIX="/Contents/Home"
24607  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24608  if test "x$ALL_JDKS_FOUND" != x; then
24609    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24610
24611  if test "x$BOOT_JDK_FOUND" = xno; then
24612    # Now execute the test
24613
24614        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24615        if test -d "$BOOT_JDK"; then
24616          BOOT_JDK_FOUND=maybe
24617          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24618$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24619        fi
24620
24621
24622    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24623    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24624      # Do we have a bin/java?
24625      if test ! -x "$BOOT_JDK/bin/java"; then
24626        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24628        BOOT_JDK_FOUND=no
24629      else
24630        # Do we have a bin/javac?
24631        if test ! -x "$BOOT_JDK/bin/javac"; then
24632          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24634          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24635$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24636          BOOT_JDK_FOUND=no
24637        else
24638          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24639          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24640
24641          # Extra M4 quote needed to protect [] in grep expression.
24642          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24643          if test "x$FOUND_CORRECT_VERSION" = x; then
24644            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24646            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24647$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24648            BOOT_JDK_FOUND=no
24649          else
24650            # We're done! :-)
24651            BOOT_JDK_FOUND=yes
24652
24653  # Only process if variable expands to non-empty
24654
24655  if test "x$BOOT_JDK" != x; then
24656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24657
24658  # Input might be given as Windows format, start by converting to
24659  # unix format.
24660  path="$BOOT_JDK"
24661  new_path=`$CYGPATH -u "$path"`
24662
24663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24666  # "foo.exe" is OK but "foo" is an error.
24667  #
24668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24669  # It is also a way to make sure we got the proper file name for the real test later on.
24670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24671  if test "x$test_shortpath" = x; then
24672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24674    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24675  fi
24676
24677  # Call helper function which possibly converts this using DOS-style short mode.
24678  # If so, the updated path is stored in $new_path.
24679
24680  input_path="$new_path"
24681  # Check if we need to convert this using DOS-style short mode. If the path
24682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24683  # take no chances and rewrite it.
24684  # Note: m4 eats our [], so we need to use [ and ] instead.
24685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24686  if test "x$has_forbidden_chars" != x; then
24687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24691      # Going to short mode and back again did indeed matter. Since short mode is
24692      # case insensitive, let's make it lowercase to improve readability.
24693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24694      # Now convert it back to Unix-style (cygpath)
24695      input_path=`$CYGPATH -u "$shortmode_path"`
24696      new_path="$input_path"
24697    fi
24698  fi
24699
24700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24701  if test "x$test_cygdrive_prefix" = x; then
24702    # As a simple fix, exclude /usr/bin since it's not a real path.
24703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24705      # a path prefixed by /cygdrive for fixpath to work.
24706      new_path="$CYGWIN_ROOT_PATH$input_path"
24707    fi
24708  fi
24709
24710
24711  if test "x$path" != "x$new_path"; then
24712    BOOT_JDK="$new_path"
24713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24715  fi
24716
24717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24718
24719  path="$BOOT_JDK"
24720  has_colon=`$ECHO $path | $GREP ^.:`
24721  new_path="$path"
24722  if test "x$has_colon" = x; then
24723    # Not in mixed or Windows style, start by that.
24724    new_path=`cmd //c echo $path`
24725  fi
24726
24727
24728  input_path="$new_path"
24729  # Check if we need to convert this using DOS-style short mode. If the path
24730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24731  # take no chances and rewrite it.
24732  # Note: m4 eats our [], so we need to use [ and ] instead.
24733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24734  if test "x$has_forbidden_chars" != x; then
24735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24737  fi
24738
24739
24740  windows_path="$new_path"
24741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24742    unix_path=`$CYGPATH -u "$windows_path"`
24743    new_path="$unix_path"
24744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24746    new_path="$unix_path"
24747  fi
24748
24749  if test "x$path" != "x$new_path"; then
24750    BOOT_JDK="$new_path"
24751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24753  fi
24754
24755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24757
24758    else
24759      # We're on a unix platform. Hooray! :)
24760      path="$BOOT_JDK"
24761      has_space=`$ECHO "$path" | $GREP " "`
24762      if test "x$has_space" != x; then
24763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24766      fi
24767
24768      # Use eval to expand a potential ~
24769      eval path="$path"
24770      if test ! -f "$path" && test ! -d "$path"; then
24771        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24772      fi
24773
24774      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24775    fi
24776  fi
24777
24778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24779$as_echo_n "checking for Boot JDK... " >&6; }
24780            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24781$as_echo "$BOOT_JDK" >&6; }
24782            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24783$as_echo_n "checking Boot JDK version... " >&6; }
24784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24786$as_echo "$BOOT_JDK_VERSION" >&6; }
24787          fi # end check jdk version
24788        fi # end check javac
24789      fi # end check java
24790    fi # end check boot jdk found
24791  fi
24792
24793    done
24794  fi
24795
24796
24797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24799      # Do we have a bin/java?
24800      if test ! -x "$BOOT_JDK/bin/java"; then
24801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24803        BOOT_JDK_FOUND=no
24804      else
24805        # Do we have a bin/javac?
24806        if test ! -x "$BOOT_JDK/bin/javac"; then
24807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24811          BOOT_JDK_FOUND=no
24812        else
24813          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24814          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24815
24816          # Extra M4 quote needed to protect [] in grep expression.
24817          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24818          if test "x$FOUND_CORRECT_VERSION" = x; then
24819            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24821            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24822$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24823            BOOT_JDK_FOUND=no
24824          else
24825            # We're done! :-)
24826            BOOT_JDK_FOUND=yes
24827
24828  # Only process if variable expands to non-empty
24829
24830  if test "x$BOOT_JDK" != x; then
24831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24832
24833  # Input might be given as Windows format, start by converting to
24834  # unix format.
24835  path="$BOOT_JDK"
24836  new_path=`$CYGPATH -u "$path"`
24837
24838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24841  # "foo.exe" is OK but "foo" is an error.
24842  #
24843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24844  # It is also a way to make sure we got the proper file name for the real test later on.
24845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24846  if test "x$test_shortpath" = x; then
24847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24850  fi
24851
24852  # Call helper function which possibly converts this using DOS-style short mode.
24853  # If so, the updated path is stored in $new_path.
24854
24855  input_path="$new_path"
24856  # Check if we need to convert this using DOS-style short mode. If the path
24857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24858  # take no chances and rewrite it.
24859  # Note: m4 eats our [], so we need to use [ and ] instead.
24860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24861  if test "x$has_forbidden_chars" != x; then
24862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24866      # Going to short mode and back again did indeed matter. Since short mode is
24867      # case insensitive, let's make it lowercase to improve readability.
24868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24869      # Now convert it back to Unix-style (cygpath)
24870      input_path=`$CYGPATH -u "$shortmode_path"`
24871      new_path="$input_path"
24872    fi
24873  fi
24874
24875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24876  if test "x$test_cygdrive_prefix" = x; then
24877    # As a simple fix, exclude /usr/bin since it's not a real path.
24878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24880      # a path prefixed by /cygdrive for fixpath to work.
24881      new_path="$CYGWIN_ROOT_PATH$input_path"
24882    fi
24883  fi
24884
24885
24886  if test "x$path" != "x$new_path"; then
24887    BOOT_JDK="$new_path"
24888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24890  fi
24891
24892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24893
24894  path="$BOOT_JDK"
24895  has_colon=`$ECHO $path | $GREP ^.:`
24896  new_path="$path"
24897  if test "x$has_colon" = x; then
24898    # Not in mixed or Windows style, start by that.
24899    new_path=`cmd //c echo $path`
24900  fi
24901
24902
24903  input_path="$new_path"
24904  # Check if we need to convert this using DOS-style short mode. If the path
24905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24906  # take no chances and rewrite it.
24907  # Note: m4 eats our [], so we need to use [ and ] instead.
24908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24909  if test "x$has_forbidden_chars" != x; then
24910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24912  fi
24913
24914
24915  windows_path="$new_path"
24916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24917    unix_path=`$CYGPATH -u "$windows_path"`
24918    new_path="$unix_path"
24919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24921    new_path="$unix_path"
24922  fi
24923
24924  if test "x$path" != "x$new_path"; then
24925    BOOT_JDK="$new_path"
24926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24928  fi
24929
24930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24932
24933    else
24934      # We're on a unix platform. Hooray! :)
24935      path="$BOOT_JDK"
24936      has_space=`$ECHO "$path" | $GREP " "`
24937      if test "x$has_space" != x; then
24938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24941      fi
24942
24943      # Use eval to expand a potential ~
24944      eval path="$path"
24945      if test ! -f "$path" && test ! -d "$path"; then
24946        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24947      fi
24948
24949      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24950    fi
24951  fi
24952
24953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24954$as_echo_n "checking for Boot JDK... " >&6; }
24955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24956$as_echo "$BOOT_JDK" >&6; }
24957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24958$as_echo_n "checking Boot JDK version... " >&6; }
24959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24961$as_echo "$BOOT_JDK_VERSION" >&6; }
24962          fi # end check jdk version
24963        fi # end check javac
24964      fi # end check java
24965    fi # end check boot jdk found
24966  fi
24967
24968  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24969
24970  if test "x$BOOT_JDK_FOUND" = xno; then
24971    # Now execute the test
24972
24973  BOOT_JDK_PREFIX="/usr/lib/jvm"
24974  BOOT_JDK_SUFFIX=""
24975  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24976  if test "x$ALL_JDKS_FOUND" != x; then
24977    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24978
24979  if test "x$BOOT_JDK_FOUND" = xno; then
24980    # Now execute the test
24981
24982        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24983        if test -d "$BOOT_JDK"; then
24984          BOOT_JDK_FOUND=maybe
24985          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24986$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24987        fi
24988
24989
24990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24992      # Do we have a bin/java?
24993      if test ! -x "$BOOT_JDK/bin/java"; then
24994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24996        BOOT_JDK_FOUND=no
24997      else
24998        # Do we have a bin/javac?
24999        if test ! -x "$BOOT_JDK/bin/javac"; then
25000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25004          BOOT_JDK_FOUND=no
25005        else
25006          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25007          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25008
25009          # Extra M4 quote needed to protect [] in grep expression.
25010          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25011          if test "x$FOUND_CORRECT_VERSION" = x; then
25012            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25014            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25015$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25016            BOOT_JDK_FOUND=no
25017          else
25018            # We're done! :-)
25019            BOOT_JDK_FOUND=yes
25020
25021  # Only process if variable expands to non-empty
25022
25023  if test "x$BOOT_JDK" != x; then
25024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25025
25026  # Input might be given as Windows format, start by converting to
25027  # unix format.
25028  path="$BOOT_JDK"
25029  new_path=`$CYGPATH -u "$path"`
25030
25031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25034  # "foo.exe" is OK but "foo" is an error.
25035  #
25036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25037  # It is also a way to make sure we got the proper file name for the real test later on.
25038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25039  if test "x$test_shortpath" = x; then
25040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25042    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25043  fi
25044
25045  # Call helper function which possibly converts this using DOS-style short mode.
25046  # If so, the updated path is stored in $new_path.
25047
25048  input_path="$new_path"
25049  # Check if we need to convert this using DOS-style short mode. If the path
25050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25051  # take no chances and rewrite it.
25052  # Note: m4 eats our [], so we need to use [ and ] instead.
25053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25054  if test "x$has_forbidden_chars" != x; then
25055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25059      # Going to short mode and back again did indeed matter. Since short mode is
25060      # case insensitive, let's make it lowercase to improve readability.
25061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25062      # Now convert it back to Unix-style (cygpath)
25063      input_path=`$CYGPATH -u "$shortmode_path"`
25064      new_path="$input_path"
25065    fi
25066  fi
25067
25068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25069  if test "x$test_cygdrive_prefix" = x; then
25070    # As a simple fix, exclude /usr/bin since it's not a real path.
25071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25073      # a path prefixed by /cygdrive for fixpath to work.
25074      new_path="$CYGWIN_ROOT_PATH$input_path"
25075    fi
25076  fi
25077
25078
25079  if test "x$path" != "x$new_path"; then
25080    BOOT_JDK="$new_path"
25081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25082$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25083  fi
25084
25085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25086
25087  path="$BOOT_JDK"
25088  has_colon=`$ECHO $path | $GREP ^.:`
25089  new_path="$path"
25090  if test "x$has_colon" = x; then
25091    # Not in mixed or Windows style, start by that.
25092    new_path=`cmd //c echo $path`
25093  fi
25094
25095
25096  input_path="$new_path"
25097  # Check if we need to convert this using DOS-style short mode. If the path
25098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25099  # take no chances and rewrite it.
25100  # Note: m4 eats our [], so we need to use [ and ] instead.
25101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25102  if test "x$has_forbidden_chars" != x; then
25103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25105  fi
25106
25107
25108  windows_path="$new_path"
25109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110    unix_path=`$CYGPATH -u "$windows_path"`
25111    new_path="$unix_path"
25112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25114    new_path="$unix_path"
25115  fi
25116
25117  if test "x$path" != "x$new_path"; then
25118    BOOT_JDK="$new_path"
25119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25121  fi
25122
25123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25125
25126    else
25127      # We're on a unix platform. Hooray! :)
25128      path="$BOOT_JDK"
25129      has_space=`$ECHO "$path" | $GREP " "`
25130      if test "x$has_space" != x; then
25131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25132$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25134      fi
25135
25136      # Use eval to expand a potential ~
25137      eval path="$path"
25138      if test ! -f "$path" && test ! -d "$path"; then
25139        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25140      fi
25141
25142      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25143    fi
25144  fi
25145
25146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25147$as_echo_n "checking for Boot JDK... " >&6; }
25148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25149$as_echo "$BOOT_JDK" >&6; }
25150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25151$as_echo_n "checking Boot JDK version... " >&6; }
25152            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25154$as_echo "$BOOT_JDK_VERSION" >&6; }
25155          fi # end check jdk version
25156        fi # end check javac
25157      fi # end check java
25158    fi # end check boot jdk found
25159  fi
25160
25161    done
25162  fi
25163
25164
25165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25167      # Do we have a bin/java?
25168      if test ! -x "$BOOT_JDK/bin/java"; then
25169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25171        BOOT_JDK_FOUND=no
25172      else
25173        # Do we have a bin/javac?
25174        if test ! -x "$BOOT_JDK/bin/javac"; then
25175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25179          BOOT_JDK_FOUND=no
25180        else
25181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25183
25184          # Extra M4 quote needed to protect [] in grep expression.
25185          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25186          if test "x$FOUND_CORRECT_VERSION" = x; then
25187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25191            BOOT_JDK_FOUND=no
25192          else
25193            # We're done! :-)
25194            BOOT_JDK_FOUND=yes
25195
25196  # Only process if variable expands to non-empty
25197
25198  if test "x$BOOT_JDK" != x; then
25199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25200
25201  # Input might be given as Windows format, start by converting to
25202  # unix format.
25203  path="$BOOT_JDK"
25204  new_path=`$CYGPATH -u "$path"`
25205
25206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25209  # "foo.exe" is OK but "foo" is an error.
25210  #
25211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25212  # It is also a way to make sure we got the proper file name for the real test later on.
25213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25214  if test "x$test_shortpath" = x; then
25215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25218  fi
25219
25220  # Call helper function which possibly converts this using DOS-style short mode.
25221  # If so, the updated path is stored in $new_path.
25222
25223  input_path="$new_path"
25224  # Check if we need to convert this using DOS-style short mode. If the path
25225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25226  # take no chances and rewrite it.
25227  # Note: m4 eats our [], so we need to use [ and ] instead.
25228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25229  if test "x$has_forbidden_chars" != x; then
25230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25234      # Going to short mode and back again did indeed matter. Since short mode is
25235      # case insensitive, let's make it lowercase to improve readability.
25236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25237      # Now convert it back to Unix-style (cygpath)
25238      input_path=`$CYGPATH -u "$shortmode_path"`
25239      new_path="$input_path"
25240    fi
25241  fi
25242
25243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25244  if test "x$test_cygdrive_prefix" = x; then
25245    # As a simple fix, exclude /usr/bin since it's not a real path.
25246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25248      # a path prefixed by /cygdrive for fixpath to work.
25249      new_path="$CYGWIN_ROOT_PATH$input_path"
25250    fi
25251  fi
25252
25253
25254  if test "x$path" != "x$new_path"; then
25255    BOOT_JDK="$new_path"
25256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25258  fi
25259
25260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25261
25262  path="$BOOT_JDK"
25263  has_colon=`$ECHO $path | $GREP ^.:`
25264  new_path="$path"
25265  if test "x$has_colon" = x; then
25266    # Not in mixed or Windows style, start by that.
25267    new_path=`cmd //c echo $path`
25268  fi
25269
25270
25271  input_path="$new_path"
25272  # Check if we need to convert this using DOS-style short mode. If the path
25273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25274  # take no chances and rewrite it.
25275  # Note: m4 eats our [], so we need to use [ and ] instead.
25276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25277  if test "x$has_forbidden_chars" != x; then
25278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25280  fi
25281
25282
25283  windows_path="$new_path"
25284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25285    unix_path=`$CYGPATH -u "$windows_path"`
25286    new_path="$unix_path"
25287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25289    new_path="$unix_path"
25290  fi
25291
25292  if test "x$path" != "x$new_path"; then
25293    BOOT_JDK="$new_path"
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25296  fi
25297
25298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25300
25301    else
25302      # We're on a unix platform. Hooray! :)
25303      path="$BOOT_JDK"
25304      has_space=`$ECHO "$path" | $GREP " "`
25305      if test "x$has_space" != x; then
25306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25309      fi
25310
25311      # Use eval to expand a potential ~
25312      eval path="$path"
25313      if test ! -f "$path" && test ! -d "$path"; then
25314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25315      fi
25316
25317      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25318    fi
25319  fi
25320
25321            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25322$as_echo_n "checking for Boot JDK... " >&6; }
25323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25324$as_echo "$BOOT_JDK" >&6; }
25325            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25326$as_echo_n "checking Boot JDK version... " >&6; }
25327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25329$as_echo "$BOOT_JDK_VERSION" >&6; }
25330          fi # end check jdk version
25331        fi # end check javac
25332      fi # end check java
25333    fi # end check boot jdk found
25334  fi
25335
25336  fi
25337
25338
25339    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25340    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25341      # Do we have a bin/java?
25342      if test ! -x "$BOOT_JDK/bin/java"; then
25343        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25345        BOOT_JDK_FOUND=no
25346      else
25347        # Do we have a bin/javac?
25348        if test ! -x "$BOOT_JDK/bin/javac"; then
25349          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25351          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25352$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25353          BOOT_JDK_FOUND=no
25354        else
25355          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25356          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25357
25358          # Extra M4 quote needed to protect [] in grep expression.
25359          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25360          if test "x$FOUND_CORRECT_VERSION" = x; then
25361            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25363            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25364$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25365            BOOT_JDK_FOUND=no
25366          else
25367            # We're done! :-)
25368            BOOT_JDK_FOUND=yes
25369
25370  # Only process if variable expands to non-empty
25371
25372  if test "x$BOOT_JDK" != x; then
25373    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25374
25375  # Input might be given as Windows format, start by converting to
25376  # unix format.
25377  path="$BOOT_JDK"
25378  new_path=`$CYGPATH -u "$path"`
25379
25380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25383  # "foo.exe" is OK but "foo" is an error.
25384  #
25385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25386  # It is also a way to make sure we got the proper file name for the real test later on.
25387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25388  if test "x$test_shortpath" = x; then
25389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25391    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25392  fi
25393
25394  # Call helper function which possibly converts this using DOS-style short mode.
25395  # If so, the updated path is stored in $new_path.
25396
25397  input_path="$new_path"
25398  # Check if we need to convert this using DOS-style short mode. If the path
25399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25400  # take no chances and rewrite it.
25401  # Note: m4 eats our [], so we need to use [ and ] instead.
25402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25403  if test "x$has_forbidden_chars" != x; then
25404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25408      # Going to short mode and back again did indeed matter. Since short mode is
25409      # case insensitive, let's make it lowercase to improve readability.
25410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25411      # Now convert it back to Unix-style (cygpath)
25412      input_path=`$CYGPATH -u "$shortmode_path"`
25413      new_path="$input_path"
25414    fi
25415  fi
25416
25417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25418  if test "x$test_cygdrive_prefix" = x; then
25419    # As a simple fix, exclude /usr/bin since it's not a real path.
25420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25422      # a path prefixed by /cygdrive for fixpath to work.
25423      new_path="$CYGWIN_ROOT_PATH$input_path"
25424    fi
25425  fi
25426
25427
25428  if test "x$path" != "x$new_path"; then
25429    BOOT_JDK="$new_path"
25430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25431$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25432  fi
25433
25434    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25435
25436  path="$BOOT_JDK"
25437  has_colon=`$ECHO $path | $GREP ^.:`
25438  new_path="$path"
25439  if test "x$has_colon" = x; then
25440    # Not in mixed or Windows style, start by that.
25441    new_path=`cmd //c echo $path`
25442  fi
25443
25444
25445  input_path="$new_path"
25446  # Check if we need to convert this using DOS-style short mode. If the path
25447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25448  # take no chances and rewrite it.
25449  # Note: m4 eats our [], so we need to use [ and ] instead.
25450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25451  if test "x$has_forbidden_chars" != x; then
25452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25454  fi
25455
25456
25457  windows_path="$new_path"
25458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25459    unix_path=`$CYGPATH -u "$windows_path"`
25460    new_path="$unix_path"
25461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25463    new_path="$unix_path"
25464  fi
25465
25466  if test "x$path" != "x$new_path"; then
25467    BOOT_JDK="$new_path"
25468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25469$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25470  fi
25471
25472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25474
25475    else
25476      # We're on a unix platform. Hooray! :)
25477      path="$BOOT_JDK"
25478      has_space=`$ECHO "$path" | $GREP " "`
25479      if test "x$has_space" != x; then
25480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25482        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25483      fi
25484
25485      # Use eval to expand a potential ~
25486      eval path="$path"
25487      if test ! -f "$path" && test ! -d "$path"; then
25488        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25489      fi
25490
25491      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25492    fi
25493  fi
25494
25495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25496$as_echo_n "checking for Boot JDK... " >&6; }
25497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25498$as_echo "$BOOT_JDK" >&6; }
25499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25500$as_echo_n "checking Boot JDK version... " >&6; }
25501            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25503$as_echo "$BOOT_JDK_VERSION" >&6; }
25504          fi # end check jdk version
25505        fi # end check javac
25506      fi # end check java
25507    fi # end check boot jdk found
25508  fi
25509
25510
25511  # If we haven't found anything yet, we've truly lost. Give up.
25512  if test "x$BOOT_JDK_FOUND" = xno; then
25513
25514  # Print a helpful message on how to acquire the necessary build dependency.
25515  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25516  MISSING_DEPENDENCY=openjdk
25517
25518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25519    cygwin_help $MISSING_DEPENDENCY
25520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25521    msys_help $MISSING_DEPENDENCY
25522  else
25523    PKGHANDLER_COMMAND=
25524
25525    case $PKGHANDLER in
25526      apt-get)
25527        apt_help     $MISSING_DEPENDENCY ;;
25528      yum)
25529        yum_help     $MISSING_DEPENDENCY ;;
25530      port)
25531        port_help    $MISSING_DEPENDENCY ;;
25532      pkgutil)
25533        pkgutil_help $MISSING_DEPENDENCY ;;
25534      pkgadd)
25535        pkgadd_help  $MISSING_DEPENDENCY ;;
25536    esac
25537
25538    if test "x$PKGHANDLER_COMMAND" != x; then
25539      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25540    fi
25541  fi
25542
25543    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25544$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25545    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25546$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25547    as_fn_error $? "Cannot continue" "$LINENO" 5
25548  fi
25549
25550
25551
25552  # Setup tools from the Boot JDK.
25553
25554  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25555
25556  # Publish this variable in the help.
25557
25558
25559  if test "x$JAVA" = x; then
25560    # The variable is not set by user, try to locate tool using the code snippet
25561
25562      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25563$as_echo_n "checking for java in Boot JDK... " >&6; }
25564      JAVA=$BOOT_JDK/bin/java
25565      if test ! -x $JAVA; then
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25567$as_echo "not found" >&6; }
25568        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25569$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25570        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25571      fi
25572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25573$as_echo "ok" >&6; }
25574
25575
25576  else
25577    # The variable is set, but is it from the command line or the environment?
25578
25579    # Try to remove the string !JAVA! from our list.
25580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25582      # If it failed, the variable was not from the command line. Ignore it,
25583      # but warn the user (except for BASH, which is always set by the calling BASH).
25584      if test "xJAVA" != xBASH; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25586$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25587      fi
25588      # Try to locate tool using the code snippet
25589
25590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25591$as_echo_n "checking for java in Boot JDK... " >&6; }
25592      JAVA=$BOOT_JDK/bin/java
25593      if test ! -x $JAVA; then
25594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25595$as_echo "not found" >&6; }
25596        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25597$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25598        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25599      fi
25600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25601$as_echo "ok" >&6; }
25602
25603
25604    else
25605      # If it succeeded, then it was overridden by the user. We will use it
25606      # for the tool.
25607
25608      # First remove it from the list of overridden variables, so we can test
25609      # for unknown variables in the end.
25610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25611
25612      # Check if the provided tool contains a complete path.
25613      tool_specified="$JAVA"
25614      tool_basename="${tool_specified##*/}"
25615      if test "x$tool_basename" = "x$tool_specified"; then
25616        # A command without a complete path is provided, search $PATH.
25617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25618$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25619        # Extract the first word of "$tool_basename", so it can be a program name with args.
25620set dummy $tool_basename; ac_word=$2
25621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25622$as_echo_n "checking for $ac_word... " >&6; }
25623if ${ac_cv_path_JAVA+:} false; then :
25624  $as_echo_n "(cached) " >&6
25625else
25626  case $JAVA in
25627  [\\/]* | ?:[\\/]*)
25628  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25629  ;;
25630  *)
25631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25632for as_dir in $PATH
25633do
25634  IFS=$as_save_IFS
25635  test -z "$as_dir" && as_dir=.
25636    for ac_exec_ext in '' $ac_executable_extensions; do
25637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25638    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25640    break 2
25641  fi
25642done
25643  done
25644IFS=$as_save_IFS
25645
25646  ;;
25647esac
25648fi
25649JAVA=$ac_cv_path_JAVA
25650if test -n "$JAVA"; then
25651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25652$as_echo "$JAVA" >&6; }
25653else
25654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25655$as_echo "no" >&6; }
25656fi
25657
25658
25659        if test "x$JAVA" = x; then
25660          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25661        fi
25662      else
25663        # Otherwise we believe it is a complete path. Use it as it is.
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25665$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25667$as_echo_n "checking for JAVA... " >&6; }
25668        if test ! -x "$tool_specified"; then
25669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25670$as_echo "not found" >&6; }
25671          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25672        fi
25673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25674$as_echo "$tool_specified" >&6; }
25675      fi
25676    fi
25677  fi
25678
25679
25680
25681  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25682
25683  # Publish this variable in the help.
25684
25685
25686  if test "x$JAVAC" = x; then
25687    # The variable is not set by user, try to locate tool using the code snippet
25688
25689      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25690$as_echo_n "checking for javac in Boot JDK... " >&6; }
25691      JAVAC=$BOOT_JDK/bin/javac
25692      if test ! -x $JAVAC; then
25693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25694$as_echo "not found" >&6; }
25695        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25696$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25697        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25698      fi
25699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25700$as_echo "ok" >&6; }
25701
25702
25703  else
25704    # The variable is set, but is it from the command line or the environment?
25705
25706    # Try to remove the string !JAVAC! from our list.
25707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25709      # If it failed, the variable was not from the command line. Ignore it,
25710      # but warn the user (except for BASH, which is always set by the calling BASH).
25711      if test "xJAVAC" != xBASH; then
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25713$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25714      fi
25715      # Try to locate tool using the code snippet
25716
25717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25718$as_echo_n "checking for javac in Boot JDK... " >&6; }
25719      JAVAC=$BOOT_JDK/bin/javac
25720      if test ! -x $JAVAC; then
25721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25722$as_echo "not found" >&6; }
25723        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25724$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25725        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25726      fi
25727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25728$as_echo "ok" >&6; }
25729
25730
25731    else
25732      # If it succeeded, then it was overridden by the user. We will use it
25733      # for the tool.
25734
25735      # First remove it from the list of overridden variables, so we can test
25736      # for unknown variables in the end.
25737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25738
25739      # Check if the provided tool contains a complete path.
25740      tool_specified="$JAVAC"
25741      tool_basename="${tool_specified##*/}"
25742      if test "x$tool_basename" = "x$tool_specified"; then
25743        # A command without a complete path is provided, search $PATH.
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25745$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25746        # Extract the first word of "$tool_basename", so it can be a program name with args.
25747set dummy $tool_basename; ac_word=$2
25748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25749$as_echo_n "checking for $ac_word... " >&6; }
25750if ${ac_cv_path_JAVAC+:} false; then :
25751  $as_echo_n "(cached) " >&6
25752else
25753  case $JAVAC in
25754  [\\/]* | ?:[\\/]*)
25755  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25756  ;;
25757  *)
25758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25759for as_dir in $PATH
25760do
25761  IFS=$as_save_IFS
25762  test -z "$as_dir" && as_dir=.
25763    for ac_exec_ext in '' $ac_executable_extensions; do
25764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25765    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25767    break 2
25768  fi
25769done
25770  done
25771IFS=$as_save_IFS
25772
25773  ;;
25774esac
25775fi
25776JAVAC=$ac_cv_path_JAVAC
25777if test -n "$JAVAC"; then
25778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25779$as_echo "$JAVAC" >&6; }
25780else
25781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25782$as_echo "no" >&6; }
25783fi
25784
25785
25786        if test "x$JAVAC" = x; then
25787          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25788        fi
25789      else
25790        # Otherwise we believe it is a complete path. Use it as it is.
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25792$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25794$as_echo_n "checking for JAVAC... " >&6; }
25795        if test ! -x "$tool_specified"; then
25796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25797$as_echo "not found" >&6; }
25798          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25799        fi
25800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25801$as_echo "$tool_specified" >&6; }
25802      fi
25803    fi
25804  fi
25805
25806
25807
25808  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25809
25810  # Publish this variable in the help.
25811
25812
25813  if test "x$JAVAH" = x; then
25814    # The variable is not set by user, try to locate tool using the code snippet
25815
25816      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25817$as_echo_n "checking for javah in Boot JDK... " >&6; }
25818      JAVAH=$BOOT_JDK/bin/javah
25819      if test ! -x $JAVAH; then
25820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25821$as_echo "not found" >&6; }
25822        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25823$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25824        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25825      fi
25826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25827$as_echo "ok" >&6; }
25828
25829
25830  else
25831    # The variable is set, but is it from the command line or the environment?
25832
25833    # Try to remove the string !JAVAH! from our list.
25834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25836      # If it failed, the variable was not from the command line. Ignore it,
25837      # but warn the user (except for BASH, which is always set by the calling BASH).
25838      if test "xJAVAH" != xBASH; then
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25840$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25841      fi
25842      # Try to locate tool using the code snippet
25843
25844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25845$as_echo_n "checking for javah in Boot JDK... " >&6; }
25846      JAVAH=$BOOT_JDK/bin/javah
25847      if test ! -x $JAVAH; then
25848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25849$as_echo "not found" >&6; }
25850        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25851$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25852        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25853      fi
25854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25855$as_echo "ok" >&6; }
25856
25857
25858    else
25859      # If it succeeded, then it was overridden by the user. We will use it
25860      # for the tool.
25861
25862      # First remove it from the list of overridden variables, so we can test
25863      # for unknown variables in the end.
25864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25865
25866      # Check if the provided tool contains a complete path.
25867      tool_specified="$JAVAH"
25868      tool_basename="${tool_specified##*/}"
25869      if test "x$tool_basename" = "x$tool_specified"; then
25870        # A command without a complete path is provided, search $PATH.
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25872$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25873        # Extract the first word of "$tool_basename", so it can be a program name with args.
25874set dummy $tool_basename; ac_word=$2
25875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25876$as_echo_n "checking for $ac_word... " >&6; }
25877if ${ac_cv_path_JAVAH+:} false; then :
25878  $as_echo_n "(cached) " >&6
25879else
25880  case $JAVAH in
25881  [\\/]* | ?:[\\/]*)
25882  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25883  ;;
25884  *)
25885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25886for as_dir in $PATH
25887do
25888  IFS=$as_save_IFS
25889  test -z "$as_dir" && as_dir=.
25890    for ac_exec_ext in '' $ac_executable_extensions; do
25891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25892    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25894    break 2
25895  fi
25896done
25897  done
25898IFS=$as_save_IFS
25899
25900  ;;
25901esac
25902fi
25903JAVAH=$ac_cv_path_JAVAH
25904if test -n "$JAVAH"; then
25905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25906$as_echo "$JAVAH" >&6; }
25907else
25908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25909$as_echo "no" >&6; }
25910fi
25911
25912
25913        if test "x$JAVAH" = x; then
25914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25915        fi
25916      else
25917        # Otherwise we believe it is a complete path. Use it as it is.
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25919$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25921$as_echo_n "checking for JAVAH... " >&6; }
25922        if test ! -x "$tool_specified"; then
25923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25924$as_echo "not found" >&6; }
25925          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25926        fi
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25928$as_echo "$tool_specified" >&6; }
25929      fi
25930    fi
25931  fi
25932
25933
25934
25935  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25936
25937  # Publish this variable in the help.
25938
25939
25940  if test "x$JAR" = x; then
25941    # The variable is not set by user, try to locate tool using the code snippet
25942
25943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25944$as_echo_n "checking for jar in Boot JDK... " >&6; }
25945      JAR=$BOOT_JDK/bin/jar
25946      if test ! -x $JAR; then
25947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25948$as_echo "not found" >&6; }
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25950$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25951        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25952      fi
25953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25954$as_echo "ok" >&6; }
25955
25956
25957  else
25958    # The variable is set, but is it from the command line or the environment?
25959
25960    # Try to remove the string !JAR! from our list.
25961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25963      # If it failed, the variable was not from the command line. Ignore it,
25964      # but warn the user (except for BASH, which is always set by the calling BASH).
25965      if test "xJAR" != xBASH; then
25966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25967$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25968      fi
25969      # Try to locate tool using the code snippet
25970
25971      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25972$as_echo_n "checking for jar in Boot JDK... " >&6; }
25973      JAR=$BOOT_JDK/bin/jar
25974      if test ! -x $JAR; then
25975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25976$as_echo "not found" >&6; }
25977        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25978$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25979        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25980      fi
25981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25982$as_echo "ok" >&6; }
25983
25984
25985    else
25986      # If it succeeded, then it was overridden by the user. We will use it
25987      # for the tool.
25988
25989      # First remove it from the list of overridden variables, so we can test
25990      # for unknown variables in the end.
25991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25992
25993      # Check if the provided tool contains a complete path.
25994      tool_specified="$JAR"
25995      tool_basename="${tool_specified##*/}"
25996      if test "x$tool_basename" = "x$tool_specified"; then
25997        # A command without a complete path is provided, search $PATH.
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25999$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26000        # Extract the first word of "$tool_basename", so it can be a program name with args.
26001set dummy $tool_basename; ac_word=$2
26002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26003$as_echo_n "checking for $ac_word... " >&6; }
26004if ${ac_cv_path_JAR+:} false; then :
26005  $as_echo_n "(cached) " >&6
26006else
26007  case $JAR in
26008  [\\/]* | ?:[\\/]*)
26009  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26010  ;;
26011  *)
26012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26013for as_dir in $PATH
26014do
26015  IFS=$as_save_IFS
26016  test -z "$as_dir" && as_dir=.
26017    for ac_exec_ext in '' $ac_executable_extensions; do
26018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26019    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26021    break 2
26022  fi
26023done
26024  done
26025IFS=$as_save_IFS
26026
26027  ;;
26028esac
26029fi
26030JAR=$ac_cv_path_JAR
26031if test -n "$JAR"; then
26032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26033$as_echo "$JAR" >&6; }
26034else
26035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26036$as_echo "no" >&6; }
26037fi
26038
26039
26040        if test "x$JAR" = x; then
26041          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26042        fi
26043      else
26044        # Otherwise we believe it is a complete path. Use it as it is.
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26046$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26048$as_echo_n "checking for JAR... " >&6; }
26049        if test ! -x "$tool_specified"; then
26050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26051$as_echo "not found" >&6; }
26052          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26053        fi
26054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26055$as_echo "$tool_specified" >&6; }
26056      fi
26057    fi
26058  fi
26059
26060
26061
26062  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26063
26064  # Publish this variable in the help.
26065
26066
26067  if test "x$JARSIGNER" = x; then
26068    # The variable is not set by user, try to locate tool using the code snippet
26069
26070      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26071$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26072      JARSIGNER=$BOOT_JDK/bin/jarsigner
26073      if test ! -x $JARSIGNER; then
26074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26075$as_echo "not found" >&6; }
26076        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26077$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26078        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26079      fi
26080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26081$as_echo "ok" >&6; }
26082
26083
26084  else
26085    # The variable is set, but is it from the command line or the environment?
26086
26087    # Try to remove the string !JARSIGNER! from our list.
26088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26090      # If it failed, the variable was not from the command line. Ignore it,
26091      # but warn the user (except for BASH, which is always set by the calling BASH).
26092      if test "xJARSIGNER" != xBASH; then
26093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26094$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26095      fi
26096      # Try to locate tool using the code snippet
26097
26098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26099$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26100      JARSIGNER=$BOOT_JDK/bin/jarsigner
26101      if test ! -x $JARSIGNER; then
26102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26103$as_echo "not found" >&6; }
26104        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26105$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26106        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26107      fi
26108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26109$as_echo "ok" >&6; }
26110
26111
26112    else
26113      # If it succeeded, then it was overridden by the user. We will use it
26114      # for the tool.
26115
26116      # First remove it from the list of overridden variables, so we can test
26117      # for unknown variables in the end.
26118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26119
26120      # Check if the provided tool contains a complete path.
26121      tool_specified="$JARSIGNER"
26122      tool_basename="${tool_specified##*/}"
26123      if test "x$tool_basename" = "x$tool_specified"; then
26124        # A command without a complete path is provided, search $PATH.
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26126$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26127        # Extract the first word of "$tool_basename", so it can be a program name with args.
26128set dummy $tool_basename; ac_word=$2
26129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26130$as_echo_n "checking for $ac_word... " >&6; }
26131if ${ac_cv_path_JARSIGNER+:} false; then :
26132  $as_echo_n "(cached) " >&6
26133else
26134  case $JARSIGNER in
26135  [\\/]* | ?:[\\/]*)
26136  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26137  ;;
26138  *)
26139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26140for as_dir in $PATH
26141do
26142  IFS=$as_save_IFS
26143  test -z "$as_dir" && as_dir=.
26144    for ac_exec_ext in '' $ac_executable_extensions; do
26145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26146    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26148    break 2
26149  fi
26150done
26151  done
26152IFS=$as_save_IFS
26153
26154  ;;
26155esac
26156fi
26157JARSIGNER=$ac_cv_path_JARSIGNER
26158if test -n "$JARSIGNER"; then
26159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26160$as_echo "$JARSIGNER" >&6; }
26161else
26162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26163$as_echo "no" >&6; }
26164fi
26165
26166
26167        if test "x$JARSIGNER" = x; then
26168          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26169        fi
26170      else
26171        # Otherwise we believe it is a complete path. Use it as it is.
26172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26173$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26175$as_echo_n "checking for JARSIGNER... " >&6; }
26176        if test ! -x "$tool_specified"; then
26177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26178$as_echo "not found" >&6; }
26179          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26180        fi
26181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26182$as_echo "$tool_specified" >&6; }
26183      fi
26184    fi
26185  fi
26186
26187
26188
26189  # Finally, set some other options...
26190
26191  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26192  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26193
26194
26195
26196
26197###############################################################################
26198#
26199# Configure the sources to use. We can add or override individual directories.
26200#
26201###############################################################################
26202
26203
26204  # Where are the sources. Any of these can be overridden
26205  # using --with-override-corba and the likes.
26206  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26207  CORBA_TOPDIR="$SRC_ROOT/corba"
26208  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26209  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26210  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26211  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26212  JDK_TOPDIR="$SRC_ROOT/jdk"
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223  ###############################################################################
26224  #
26225  # Pickup additional source for a component from outside of the source root
26226  # or override source for a component.
26227  #
26228
26229# Check whether --with-add-source-root was given.
26230if test "${with_add_source_root+set}" = set; then :
26231  withval=$with_add_source_root;
26232fi
26233
26234
26235
26236# Check whether --with-override-source-root was given.
26237if test "${with_override_source_root+set}" = set; then :
26238  withval=$with_override_source_root;
26239fi
26240
26241
26242
26243# Check whether --with-adds-and-overrides was given.
26244if test "${with_adds_and_overrides+set}" = set; then :
26245  withval=$with_adds_and_overrides;
26246fi
26247
26248
26249  if test "x$with_adds_and_overrides" != x; then
26250    with_add_source_root="$with_adds_and_overrides/adds"
26251    with_override_source_root="$with_adds_and_overrides/overrides"
26252  fi
26253
26254  if test "x$with_add_source_root" != x; then
26255    if ! test -d $with_add_source_root; then
26256      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26257    fi
26258    CURDIR="$PWD"
26259    cd "$with_add_source_root"
26260    ADD_SRC_ROOT="`pwd`"
26261    cd "$CURDIR"
26262    # Verify that the addon source root does not have any root makefiles.
26263    # If it does, then it is usually an error, prevent this.
26264    if test -f $with_add_source_root/langtools/make/Makefile; then
26265      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
26266    fi
26267    if test -f $with_add_source_root/corba/make/Makefile; then
26268      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
26269    fi
26270    if test -f $with_add_source_root/jaxp/make/Makefile; then
26271      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
26272    fi
26273    if test -f $with_add_source_root/jaxws/make/Makefile; then
26274      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
26275    fi
26276    if test -f $with_add_source_root/hotspot/make/Makefile; then
26277      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
26278    fi
26279    if test -f $with_add_source_root/nashorn/make/Makefile; then
26280      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
26281    fi
26282    if test -f $with_add_source_root/jdk/make/Makefile; then
26283      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
26284    fi
26285  fi
26286
26287
26288  if test "x$with_override_source_root" != x; then
26289    if ! test -d $with_override_source_root; then
26290      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26291    fi
26292    CURDIR="$PWD"
26293    cd "$with_override_source_root"
26294    OVERRIDE_SRC_ROOT="`pwd`"
26295    cd "$CURDIR"
26296    if test -f $with_override_source_root/langtools/make/Makefile; then
26297      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
26298    fi
26299    if test -f $with_override_source_root/corba/make/Makefile; then
26300      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
26301    fi
26302    if test -f $with_override_source_root/jaxp/make/Makefile; then
26303      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
26304    fi
26305    if test -f $with_override_source_root/jaxws/make/Makefile; then
26306      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
26307    fi
26308    if test -f $with_override_source_root/hotspot/make/Makefile; then
26309      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
26310    fi
26311    if test -f $with_override_source_root/nashorn/make/Makefile; then
26312      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
26313    fi
26314    if test -f $with_override_source_root/jdk/make/Makefile; then
26315      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
26316    fi
26317  fi
26318
26319
26320  ###############################################################################
26321  #
26322  # Override a repo completely, this is used for example when you have 3 small
26323  # development sandboxes of the langtools sources and want to avoid having 3 full
26324  # OpenJDK sources checked out on disk.
26325  #
26326  # Assuming that the 3 langtools sandboxes are located here:
26327  # /home/fredrik/sandbox1/langtools
26328  # /home/fredrik/sandbox2/langtools
26329  # /home/fredrik/sandbox3/langtools
26330  #
26331  # From the source root you create build subdirs manually:
26332  #     mkdir -p build1 build2 build3
26333  # in each build directory run:
26334  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26335  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26336  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26337  #
26338
26339
26340# Check whether --with-override-langtools was given.
26341if test "${with_override_langtools+set}" = set; then :
26342  withval=$with_override_langtools;
26343fi
26344
26345
26346
26347# Check whether --with-override-corba was given.
26348if test "${with_override_corba+set}" = set; then :
26349  withval=$with_override_corba;
26350fi
26351
26352
26353
26354# Check whether --with-override-jaxp was given.
26355if test "${with_override_jaxp+set}" = set; then :
26356  withval=$with_override_jaxp;
26357fi
26358
26359
26360
26361# Check whether --with-override-jaxws was given.
26362if test "${with_override_jaxws+set}" = set; then :
26363  withval=$with_override_jaxws;
26364fi
26365
26366
26367
26368# Check whether --with-override-hotspot was given.
26369if test "${with_override_hotspot+set}" = set; then :
26370  withval=$with_override_hotspot;
26371fi
26372
26373
26374
26375# Check whether --with-override-nashorn was given.
26376if test "${with_override_nashorn+set}" = set; then :
26377  withval=$with_override_nashorn;
26378fi
26379
26380
26381
26382# Check whether --with-override-jdk was given.
26383if test "${with_override_jdk+set}" = set; then :
26384  withval=$with_override_jdk;
26385fi
26386
26387
26388  if test "x$with_override_langtools" != x; then
26389    CURDIR="$PWD"
26390    cd "$with_override_langtools"
26391    LANGTOOLS_TOPDIR="`pwd`"
26392    cd "$CURDIR"
26393    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26394      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26395    fi
26396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26397$as_echo_n "checking if langtools should be overridden... " >&6; }
26398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26399$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26400  fi
26401  if test "x$with_override_corba" != x; then
26402    CURDIR="$PWD"
26403    cd "$with_override_corba"
26404    CORBA_TOPDIR="`pwd`"
26405    cd "$CURDIR"
26406    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26407      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26408    fi
26409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26410$as_echo_n "checking if corba should be overridden... " >&6; }
26411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26412$as_echo "yes with $CORBA_TOPDIR" >&6; }
26413  fi
26414  if test "x$with_override_jaxp" != x; then
26415    CURDIR="$PWD"
26416    cd "$with_override_jaxp"
26417    JAXP_TOPDIR="`pwd`"
26418    cd "$CURDIR"
26419    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26420      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26421    fi
26422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26423$as_echo_n "checking if jaxp should be overridden... " >&6; }
26424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26425$as_echo "yes with $JAXP_TOPDIR" >&6; }
26426  fi
26427  if test "x$with_override_jaxws" != x; then
26428    CURDIR="$PWD"
26429    cd "$with_override_jaxws"
26430    JAXWS_TOPDIR="`pwd`"
26431    cd "$CURDIR"
26432    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26433      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26434    fi
26435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26436$as_echo_n "checking if jaxws should be overridden... " >&6; }
26437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26438$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26439  fi
26440  if test "x$with_override_hotspot" != x; then
26441    CURDIR="$PWD"
26442    cd "$with_override_hotspot"
26443    HOTSPOT_TOPDIR="`pwd`"
26444    cd "$CURDIR"
26445    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26446      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26447    fi
26448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26449$as_echo_n "checking if hotspot should be overridden... " >&6; }
26450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26451$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26452  fi
26453  if test "x$with_override_nashorn" != x; then
26454    CURDIR="$PWD"
26455    cd "$with_override_nashorn"
26456    NASHORN_TOPDIR="`pwd`"
26457    cd "$CURDIR"
26458    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26459      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26460    fi
26461    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26462$as_echo_n "checking if nashorn should be overridden... " >&6; }
26463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26464$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26465  fi
26466  if test "x$with_override_jdk" != x; then
26467    CURDIR="$PWD"
26468    cd "$with_override_jdk"
26469    JDK_TOPDIR="`pwd`"
26470    cd "$CURDIR"
26471    if ! test -f $JDK_TOPDIR/make/Makefile; then
26472      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26473    fi
26474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26475$as_echo_n "checking if JDK should be overridden... " >&6; }
26476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26477$as_echo "yes with $JDK_TOPDIR" >&6; }
26478  fi
26479
26480
26481  BUILD_OUTPUT="$OUTPUT_ROOT"
26482
26483
26484  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26485  BUILD_HOTSPOT=true
26486
26487
26488
26489# Check whether --with-import-hotspot was given.
26490if test "${with_import_hotspot+set}" = set; then :
26491  withval=$with_import_hotspot;
26492fi
26493
26494  if test "x$with_import_hotspot" != x; then
26495    CURDIR="$PWD"
26496    cd "$with_import_hotspot"
26497    HOTSPOT_DIST="`pwd`"
26498    cd "$CURDIR"
26499    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26500      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26501    fi
26502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26503$as_echo_n "checking if hotspot should be imported... " >&6; }
26504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26505$as_echo "yes from $HOTSPOT_DIST" >&6; }
26506    BUILD_HOTSPOT=false
26507  fi
26508
26509  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26510
26511
26512###############################################################################
26513#
26514# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26515# native code.
26516#
26517###############################################################################
26518
26519# First determine the toolchain type (compiler family)
26520
26521
26522# Check whether --with-toolchain-type was given.
26523if test "${with_toolchain_type+set}" = set; then :
26524  withval=$with_toolchain_type;
26525fi
26526
26527
26528  # Use indirect variable referencing
26529  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26530  VALID_TOOLCHAINS=${!toolchain_var_name}
26531
26532  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26533    if test -n "$XCODEBUILD"; then
26534      # On Mac OS X, default toolchain to clang after Xcode 5
26535      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26536      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26537      if test $? -ne 0; then
26538        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26539      fi
26540      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26541          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26542          $CUT -f 1 -d .`
26543      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26544$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26545      if test $XCODE_MAJOR_VERSION -ge 5; then
26546          DEFAULT_TOOLCHAIN="clang"
26547      else
26548          DEFAULT_TOOLCHAIN="gcc"
26549      fi
26550    else
26551      # If Xcode is not installed, but the command line tools are
26552      # then we can't run xcodebuild. On these systems we should
26553      # default to clang
26554      DEFAULT_TOOLCHAIN="clang"
26555    fi
26556  else
26557    # First toolchain type in the list is the default
26558    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26559  fi
26560
26561  if test "x$with_toolchain_type" = xlist; then
26562    # List all toolchains
26563    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26564$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26565    for toolchain in $VALID_TOOLCHAINS; do
26566      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26567      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26568      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26569    done
26570
26571    exit 0
26572  elif test "x$with_toolchain_type" != x; then
26573    # User override; check that it is valid
26574    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26575      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26576$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26577      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26578$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26579      as_fn_error $? "Cannot continue." "$LINENO" 5
26580    fi
26581    TOOLCHAIN_TYPE=$with_toolchain_type
26582  else
26583    # No flag given, use default
26584    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26585  fi
26586
26587
26588  TOOLCHAIN_CC_BINARY_clang="clang"
26589  TOOLCHAIN_CC_BINARY_gcc="gcc"
26590  TOOLCHAIN_CC_BINARY_microsoft="cl"
26591  TOOLCHAIN_CC_BINARY_solstudio="cc"
26592  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26593
26594  TOOLCHAIN_CXX_BINARY_clang="clang++"
26595  TOOLCHAIN_CXX_BINARY_gcc="g++"
26596  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26597  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26598  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26599
26600  # Use indirect variable referencing
26601  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26602  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26603  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26604  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26605  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26606  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26607
26608
26609  # Define filename patterns
26610  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26611    LIBRARY_PREFIX=
26612    SHARED_LIBRARY_SUFFIX='.dll'
26613    STATIC_LIBRARY_SUFFIX='.lib'
26614    SHARED_LIBRARY='$1.dll'
26615    STATIC_LIBRARY='$1.lib'
26616    OBJ_SUFFIX='.obj'
26617    EXE_SUFFIX='.exe'
26618  else
26619    LIBRARY_PREFIX=lib
26620    SHARED_LIBRARY_SUFFIX='.so'
26621    STATIC_LIBRARY_SUFFIX='.a'
26622    SHARED_LIBRARY='lib$1.so'
26623    STATIC_LIBRARY='lib$1.a'
26624    OBJ_SUFFIX='.o'
26625    EXE_SUFFIX=''
26626    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26627      SHARED_LIBRARY='lib$1.dylib'
26628      SHARED_LIBRARY_SUFFIX='.dylib'
26629    fi
26630  fi
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26642    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26643$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26644  else
26645    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26646$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26647  fi
26648
26649
26650# Then detect the actual binaries needed
26651
26652  # FIXME: Is this needed?
26653  ac_ext=cpp
26654ac_cpp='$CXXCPP $CPPFLAGS'
26655ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26656ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26657ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26658
26659
26660  # Store the CFLAGS etc passed to the configure script.
26661  ORG_CFLAGS="$CFLAGS"
26662  ORG_CXXFLAGS="$CXXFLAGS"
26663
26664  # autoconf magic only relies on PATH, so update it if tools dir is specified
26665  OLD_PATH="$PATH"
26666
26667  # On Windows, we need to detect the visual studio installation first.
26668  # This will change the PATH, but we need to keep that new PATH even
26669  # after toolchain detection is done, since the compiler (on x86) uses
26670  # it for DLL resolution in runtime.
26671  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26672      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26673
26674  # Store path to cygwin link.exe to help excluding it when searching for
26675  # VS linker. This must be done before changing the PATH when looking for VS.
26676  # Extract the first word of "link", so it can be a program name with args.
26677set dummy link; ac_word=$2
26678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26679$as_echo_n "checking for $ac_word... " >&6; }
26680if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26681  $as_echo_n "(cached) " >&6
26682else
26683  case $CYGWIN_LINK in
26684  [\\/]* | ?:[\\/]*)
26685  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26686  ;;
26687  *)
26688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26689for as_dir in $PATH
26690do
26691  IFS=$as_save_IFS
26692  test -z "$as_dir" && as_dir=.
26693    for ac_exec_ext in '' $ac_executable_extensions; do
26694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26695    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26697    break 2
26698  fi
26699done
26700  done
26701IFS=$as_save_IFS
26702
26703  ;;
26704esac
26705fi
26706CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26707if test -n "$CYGWIN_LINK"; then
26708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26709$as_echo "$CYGWIN_LINK" >&6; }
26710else
26711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26712$as_echo "no" >&6; }
26713fi
26714
26715
26716  if test "x$CYGWIN_LINK" != x; then
26717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26718$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26719    "$CYGWIN_LINK" --version > /dev/null
26720    if test $? -eq 0 ; then
26721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26722$as_echo "yes" >&6; }
26723    else
26724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26725$as_echo "no" >&6; }
26726      # This might be the VS linker. Don't exclude it later on.
26727      CYGWIN_LINK=""
26728    fi
26729  fi
26730
26731  # First-hand choice is to locate and run the vsvars bat file.
26732
26733
26734# Check whether --with-toolchain-version was given.
26735if test "${with_toolchain_version+set}" = set; then :
26736  withval=$with_toolchain_version;
26737fi
26738
26739
26740  if test "x$with_toolchain_version" = xlist; then
26741    # List all toolchains
26742    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26743$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26744    for version in $VALID_VS_VERSIONS; do
26745      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26746      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26747    done
26748
26749    exit 0
26750  elif test "x$DEVKIT_VS_VERSION" != x; then
26751    VS_VERSION=$DEVKIT_VS_VERSION
26752    TOOLCHAIN_VERSION=$VS_VERSION
26753    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26754    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26755    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26756    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26757    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26758    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26759
26760    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26761    # can still be exported as INCLUDE for compiler invocations without
26762    # SYSROOT_CFLAGS
26763    OLDIFS="$IFS"
26764    IFS=";"
26765    for i in $DEVKIT_VS_INCLUDE; do
26766      ipath=$i
26767
26768  unix_path="$ipath"
26769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26770    windows_path=`$CYGPATH -m "$unix_path"`
26771    ipath="$windows_path"
26772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26773    windows_path=`cmd //c echo $unix_path`
26774    ipath="$windows_path"
26775  fi
26776
26777      VS_INCLUDE="$VS_INCLUDE;$ipath"
26778    done
26779    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26780    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26781    for i in $DEVKIT_VS_LIB; do
26782      libpath=$i
26783
26784  unix_path="$libpath"
26785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26786    windows_path=`$CYGPATH -m "$unix_path"`
26787    libpath="$windows_path"
26788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26789    windows_path=`cmd //c echo $unix_path`
26790    libpath="$windows_path"
26791  fi
26792
26793      VS_LIB="$VS_LIB;$libpath"
26794    done
26795    IFS="$OLDIFS"
26796
26797    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26798$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26799
26800  elif test "x$with_toolchain_version" != x; then
26801    # User override; check that it is valid
26802    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26803      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26804$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26805      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26806$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26807      as_fn_error $? "Cannot continue." "$LINENO" 5
26808    fi
26809    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26810  else
26811    # No flag given, use default
26812    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26813  fi
26814
26815  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26816
26817  VS_VERSION="$VS_VERSION"
26818  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26819  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26820  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26821  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26822
26823  # When using --with-tools-dir, assume it points to the correct and default
26824  # version of Visual Studio or that --with-toolchain-version was also set.
26825  if test "x$with_tools_dir" != x; then
26826
26827  if test "x$VS_ENV_CMD" = x; then
26828    VS_VERSION="${VS_VERSION}"
26829    VS_BASE="$with_tools_dir/../.."
26830    METHOD="--with-tools-dir"
26831
26832    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26833      VCVARSFILE="vc/bin/vcvars32.bat"
26834    else
26835      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26836    fi
26837
26838
26839  windows_path="$VS_BASE"
26840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26841    unix_path=`$CYGPATH -u "$windows_path"`
26842    VS_BASE="$unix_path"
26843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26845    VS_BASE="$unix_path"
26846  fi
26847
26848    if test -d "$VS_BASE"; then
26849      if test -f "$VS_BASE/$VCVARSFILE"; then
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26851$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26852        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26853        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26854        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26855        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26856      else
26857        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26858$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26860$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26861      fi
26862    fi
26863  fi
26864
26865
26866  if test "x$VS_ENV_CMD" = x; then
26867    VS_VERSION="${VS_VERSION}"
26868    VS_BASE="$with_tools_dir/../../.."
26869    METHOD="--with-tools-dir"
26870
26871    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26872      VCVARSFILE="vc/bin/vcvars32.bat"
26873    else
26874      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26875    fi
26876
26877
26878  windows_path="$VS_BASE"
26879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26880    unix_path=`$CYGPATH -u "$windows_path"`
26881    VS_BASE="$unix_path"
26882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26884    VS_BASE="$unix_path"
26885  fi
26886
26887    if test -d "$VS_BASE"; then
26888      if test -f "$VS_BASE/$VCVARSFILE"; then
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26890$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26891        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26892        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26893        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26894        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26895      else
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26897$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26898        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26899$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26900      fi
26901    fi
26902  fi
26903
26904    if test "x$VS_ENV_CMD" = x; then
26905      # Having specified an argument which is incorrect will produce an instant failure;
26906      # we should not go on looking
26907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26908$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26909      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26910$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26911      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26912$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26913      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26914    fi
26915  fi
26916
26917  VS_ENV_CMD=""
26918  VS_ENV_ARGS=""
26919
26920  if test "x$VS_COMNTOOLS" != x; then
26921
26922  if test "x$VS_ENV_CMD" = x; then
26923    VS_VERSION="${VS_VERSION}"
26924    VS_BASE="$VS_COMNTOOLS/../.."
26925    METHOD="$VS_COMNTOOLS_VAR variable"
26926
26927    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26928      VCVARSFILE="vc/bin/vcvars32.bat"
26929    else
26930      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26931    fi
26932
26933
26934  windows_path="$VS_BASE"
26935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26936    unix_path=`$CYGPATH -u "$windows_path"`
26937    VS_BASE="$unix_path"
26938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26940    VS_BASE="$unix_path"
26941  fi
26942
26943    if test -d "$VS_BASE"; then
26944      if test -f "$VS_BASE/$VCVARSFILE"; then
26945        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26946$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26947        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26948        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26949        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26950        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26951      else
26952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26953$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26954        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26955$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26956      fi
26957    fi
26958  fi
26959
26960  fi
26961  if test "x$PROGRAMFILES" != x; then
26962
26963  if test "x$VS_ENV_CMD" = x; then
26964    VS_VERSION="${VS_VERSION}"
26965    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26966    METHOD="well-known name"
26967
26968    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26969      VCVARSFILE="vc/bin/vcvars32.bat"
26970    else
26971      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26972    fi
26973
26974
26975  windows_path="$VS_BASE"
26976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26977    unix_path=`$CYGPATH -u "$windows_path"`
26978    VS_BASE="$unix_path"
26979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26981    VS_BASE="$unix_path"
26982  fi
26983
26984    if test -d "$VS_BASE"; then
26985      if test -f "$VS_BASE/$VCVARSFILE"; then
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26987$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26988        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26989        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26990        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26991        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26992      else
26993        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26994$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26995        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26996$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26997      fi
26998    fi
26999  fi
27000
27001  fi
27002  # Work around the insanely named ProgramFiles(x86) env variable
27003  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27004  if test "x$PROGRAMFILES_X86" != x; then
27005
27006  if test "x$VS_ENV_CMD" = x; then
27007    VS_VERSION="${VS_VERSION}"
27008    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27009    METHOD="well-known name"
27010
27011    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27012      VCVARSFILE="vc/bin/vcvars32.bat"
27013    else
27014      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27015    fi
27016
27017
27018  windows_path="$VS_BASE"
27019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27020    unix_path=`$CYGPATH -u "$windows_path"`
27021    VS_BASE="$unix_path"
27022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27024    VS_BASE="$unix_path"
27025  fi
27026
27027    if test -d "$VS_BASE"; then
27028      if test -f "$VS_BASE/$VCVARSFILE"; then
27029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27030$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27031        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27032        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27033        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27034        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27035      else
27036        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27037$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27038        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27039$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27040      fi
27041    fi
27042  fi
27043
27044  fi
27045
27046  if test "x$VS_ENV_CMD" = x; then
27047    VS_VERSION="${VS_VERSION}"
27048    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27049    METHOD="well-known name"
27050
27051    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27052      VCVARSFILE="vc/bin/vcvars32.bat"
27053    else
27054      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27055    fi
27056
27057
27058  windows_path="$VS_BASE"
27059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27060    unix_path=`$CYGPATH -u "$windows_path"`
27061    VS_BASE="$unix_path"
27062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27064    VS_BASE="$unix_path"
27065  fi
27066
27067    if test -d "$VS_BASE"; then
27068      if test -f "$VS_BASE/$VCVARSFILE"; then
27069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27070$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27071        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27072        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27073        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27074        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27075      else
27076        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27077$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27078        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27079$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27080      fi
27081    fi
27082  fi
27083
27084
27085  if test "x$VS_ENV_CMD" = x; then
27086    VS_VERSION="${VS_VERSION}"
27087    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27088    METHOD="well-known name"
27089
27090    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27091      VCVARSFILE="vc/bin/vcvars32.bat"
27092    else
27093      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27094    fi
27095
27096
27097  windows_path="$VS_BASE"
27098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27099    unix_path=`$CYGPATH -u "$windows_path"`
27100    VS_BASE="$unix_path"
27101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27103    VS_BASE="$unix_path"
27104  fi
27105
27106    if test -d "$VS_BASE"; then
27107      if test -f "$VS_BASE/$VCVARSFILE"; then
27108        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27109$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27110        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27111        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27112        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27113        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27114      else
27115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27116$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27118$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27119      fi
27120    fi
27121  fi
27122
27123
27124  if test "x$SDK_INSTALL_DIR" != x; then
27125    if test "x$ProgramW6432" != x; then
27126
27127  if test "x$VS_ENV_CMD" = x; then
27128    VS_VERSION="${VS_VERSION}"
27129    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27130    METHOD="well-known name"
27131
27132  windows_path="$WIN_SDK_BASE"
27133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27134    unix_path=`$CYGPATH -u "$windows_path"`
27135    WIN_SDK_BASE="$unix_path"
27136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27138    WIN_SDK_BASE="$unix_path"
27139  fi
27140
27141    if test -d "$WIN_SDK_BASE"; then
27142      # There have been cases of partial or broken SDK installations. A missing
27143      # lib dir is not going to work.
27144      if test ! -d "$WIN_SDK_BASE/lib"; then
27145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27146$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27147        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27148$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27149      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27150        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27151$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27152        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27153        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27154          VS_ENV_ARGS="/x86"
27155        else
27156          VS_ENV_ARGS="/x64"
27157        fi
27158        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27159        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27160        # TODO: improve detection for other versions of SDK
27161        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27162      else
27163        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27164$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27165        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27166$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27167      fi
27168    fi
27169  fi
27170
27171    fi
27172    if test "x$PROGRAMW6432" != x; then
27173
27174  if test "x$VS_ENV_CMD" = x; then
27175    VS_VERSION="${VS_VERSION}"
27176    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27177    METHOD="well-known name"
27178
27179  windows_path="$WIN_SDK_BASE"
27180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27181    unix_path=`$CYGPATH -u "$windows_path"`
27182    WIN_SDK_BASE="$unix_path"
27183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27185    WIN_SDK_BASE="$unix_path"
27186  fi
27187
27188    if test -d "$WIN_SDK_BASE"; then
27189      # There have been cases of partial or broken SDK installations. A missing
27190      # lib dir is not going to work.
27191      if test ! -d "$WIN_SDK_BASE/lib"; then
27192        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27193$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27194        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27195$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27196      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27198$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27199        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27200        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27201          VS_ENV_ARGS="/x86"
27202        else
27203          VS_ENV_ARGS="/x64"
27204        fi
27205        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27206        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27207        # TODO: improve detection for other versions of SDK
27208        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27209      else
27210        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27211$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27212        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27213$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27214      fi
27215    fi
27216  fi
27217
27218    fi
27219    if test "x$PROGRAMFILES" != x; then
27220
27221  if test "x$VS_ENV_CMD" = x; then
27222    VS_VERSION="${VS_VERSION}"
27223    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27224    METHOD="well-known name"
27225
27226  windows_path="$WIN_SDK_BASE"
27227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27228    unix_path=`$CYGPATH -u "$windows_path"`
27229    WIN_SDK_BASE="$unix_path"
27230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27232    WIN_SDK_BASE="$unix_path"
27233  fi
27234
27235    if test -d "$WIN_SDK_BASE"; then
27236      # There have been cases of partial or broken SDK installations. A missing
27237      # lib dir is not going to work.
27238      if test ! -d "$WIN_SDK_BASE/lib"; then
27239        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27240$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27241        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27242$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27243      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27245$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27246        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27247        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27248          VS_ENV_ARGS="/x86"
27249        else
27250          VS_ENV_ARGS="/x64"
27251        fi
27252        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27253        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27254        # TODO: improve detection for other versions of SDK
27255        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27256      else
27257        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27258$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27259        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27260$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27261      fi
27262    fi
27263  fi
27264
27265    fi
27266
27267  if test "x$VS_ENV_CMD" = x; then
27268    VS_VERSION="${VS_VERSION}"
27269    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27270    METHOD="well-known name"
27271
27272  windows_path="$WIN_SDK_BASE"
27273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27274    unix_path=`$CYGPATH -u "$windows_path"`
27275    WIN_SDK_BASE="$unix_path"
27276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27278    WIN_SDK_BASE="$unix_path"
27279  fi
27280
27281    if test -d "$WIN_SDK_BASE"; then
27282      # There have been cases of partial or broken SDK installations. A missing
27283      # lib dir is not going to work.
27284      if test ! -d "$WIN_SDK_BASE/lib"; then
27285        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27286$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27287        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27288$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27289      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27291$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27292        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27293        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27294          VS_ENV_ARGS="/x86"
27295        else
27296          VS_ENV_ARGS="/x64"
27297        fi
27298        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27299        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27300        # TODO: improve detection for other versions of SDK
27301        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27302      else
27303        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27304$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27305        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27306$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27307      fi
27308    fi
27309  fi
27310
27311
27312  if test "x$VS_ENV_CMD" = x; then
27313    VS_VERSION="${VS_VERSION}"
27314    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27315    METHOD="well-known name"
27316
27317  windows_path="$WIN_SDK_BASE"
27318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27319    unix_path=`$CYGPATH -u "$windows_path"`
27320    WIN_SDK_BASE="$unix_path"
27321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27323    WIN_SDK_BASE="$unix_path"
27324  fi
27325
27326    if test -d "$WIN_SDK_BASE"; then
27327      # There have been cases of partial or broken SDK installations. A missing
27328      # lib dir is not going to work.
27329      if test ! -d "$WIN_SDK_BASE/lib"; then
27330        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27331$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27333$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27334      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27336$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27337        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27338        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27339          VS_ENV_ARGS="/x86"
27340        else
27341          VS_ENV_ARGS="/x64"
27342        fi
27343        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27344        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27345        # TODO: improve detection for other versions of SDK
27346        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27347      else
27348        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27349$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27350        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27351$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27352      fi
27353    fi
27354  fi
27355
27356  fi
27357
27358    if test "x$VS_ENV_CMD" != x; then
27359      TOOLCHAIN_VERSION=$VS_VERSION
27360      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27361      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27362      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27363      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27364      # The rest of the variables are already evaled while probing
27365      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27366$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27367      break
27368    fi
27369  done
27370
27371
27372  # If we have a devkit, skip all of the below.
27373  if test "x$DEVKIT_VS_VERSION" = x; then
27374    if test "x$VS_ENV_CMD" != x; then
27375      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27376
27377  # Only process if variable expands to non-empty
27378
27379  if test "x$VS_ENV_CMD" != x; then
27380    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27381
27382  # First separate the path from the arguments. This will split at the first
27383  # space.
27384  complete="$VS_ENV_CMD"
27385  path="${complete%% *}"
27386  tmp="$complete EOL"
27387  arguments="${tmp#* }"
27388
27389  # Input might be given as Windows format, start by converting to
27390  # unix format.
27391  new_path=`$CYGPATH -u "$path"`
27392
27393  # Now try to locate executable using which
27394  new_path=`$WHICH "$new_path" 2> /dev/null`
27395  # bat and cmd files are not always considered executable in cygwin causing which
27396  # to not find them
27397  if test "x$new_path" = x \
27398      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27399      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27400    new_path=`$CYGPATH -u "$path"`
27401  fi
27402  if test "x$new_path" = x; then
27403    # Oops. Which didn't find the executable.
27404    # The splitting of arguments from the executable at a space might have been incorrect,
27405    # since paths with space are more likely in Windows. Give it another try with the whole
27406    # argument.
27407    path="$complete"
27408    arguments="EOL"
27409    new_path=`$CYGPATH -u "$path"`
27410    new_path=`$WHICH "$new_path" 2> /dev/null`
27411    # bat and cmd files are not always considered executable in cygwin causing which
27412    # to not find them
27413    if test "x$new_path" = x \
27414        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27415        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27416      new_path=`$CYGPATH -u "$path"`
27417    fi
27418    if test "x$new_path" = x; then
27419      # It's still not found. Now this is an unrecoverable error.
27420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27421$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27422      has_space=`$ECHO "$complete" | $GREP " "`
27423      if test "x$has_space" != x; then
27424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27426      fi
27427      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27428    fi
27429  fi
27430
27431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27434  # "foo.exe" is OK but "foo" is an error.
27435  #
27436  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27437  # It is also a way to make sure we got the proper file name for the real test later on.
27438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27439  if test "x$test_shortpath" = x; then
27440    # Short path failed, file does not exist as specified.
27441    # Try adding .exe or .cmd
27442    if test -f "${new_path}.exe"; then
27443      input_to_shortpath="${new_path}.exe"
27444    elif test -f "${new_path}.cmd"; then
27445      input_to_shortpath="${new_path}.cmd"
27446    else
27447      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27448$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27449      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27450$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27451      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27452    fi
27453  else
27454    input_to_shortpath="$new_path"
27455  fi
27456
27457  # Call helper function which possibly converts this using DOS-style short mode.
27458  # If so, the updated path is stored in $new_path.
27459  new_path="$input_to_shortpath"
27460
27461  input_path="$input_to_shortpath"
27462  # Check if we need to convert this using DOS-style short mode. If the path
27463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27464  # take no chances and rewrite it.
27465  # Note: m4 eats our [], so we need to use [ and ] instead.
27466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27467  if test "x$has_forbidden_chars" != x; then
27468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27472      # Going to short mode and back again did indeed matter. Since short mode is
27473      # case insensitive, let's make it lowercase to improve readability.
27474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27475      # Now convert it back to Unix-style (cygpath)
27476      input_path=`$CYGPATH -u "$shortmode_path"`
27477      new_path="$input_path"
27478    fi
27479  fi
27480
27481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27482  if test "x$test_cygdrive_prefix" = x; then
27483    # As a simple fix, exclude /usr/bin since it's not a real path.
27484    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27486      # a path prefixed by /cygdrive for fixpath to work.
27487      new_path="$CYGWIN_ROOT_PATH$input_path"
27488    fi
27489  fi
27490
27491  # remove trailing .exe if any
27492  new_path="${new_path/%.exe/}"
27493
27494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27495
27496  # First separate the path from the arguments. This will split at the first
27497  # space.
27498  complete="$VS_ENV_CMD"
27499  path="${complete%% *}"
27500  tmp="$complete EOL"
27501  arguments="${tmp#* }"
27502
27503  # Input might be given as Windows format, start by converting to
27504  # unix format.
27505  new_path="$path"
27506
27507  windows_path="$new_path"
27508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27509    unix_path=`$CYGPATH -u "$windows_path"`
27510    new_path="$unix_path"
27511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27513    new_path="$unix_path"
27514  fi
27515
27516
27517  # Now try to locate executable using which
27518  new_path=`$WHICH "$new_path" 2> /dev/null`
27519
27520  if test "x$new_path" = x; then
27521    # Oops. Which didn't find the executable.
27522    # The splitting of arguments from the executable at a space might have been incorrect,
27523    # since paths with space are more likely in Windows. Give it another try with the whole
27524    # argument.
27525    path="$complete"
27526    arguments="EOL"
27527    new_path="$path"
27528
27529  windows_path="$new_path"
27530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27531    unix_path=`$CYGPATH -u "$windows_path"`
27532    new_path="$unix_path"
27533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27535    new_path="$unix_path"
27536  fi
27537
27538
27539    new_path=`$WHICH "$new_path" 2> /dev/null`
27540    # bat and cmd files are not always considered executable in MSYS causing which
27541    # to not find them
27542    if test "x$new_path" = x \
27543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27545      new_path="$path"
27546
27547  windows_path="$new_path"
27548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27549    unix_path=`$CYGPATH -u "$windows_path"`
27550    new_path="$unix_path"
27551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27553    new_path="$unix_path"
27554  fi
27555
27556    fi
27557
27558    if test "x$new_path" = x; then
27559      # It's still not found. Now this is an unrecoverable error.
27560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27561$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27562      has_space=`$ECHO "$complete" | $GREP " "`
27563      if test "x$has_space" != x; then
27564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27566      fi
27567      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27568    fi
27569  fi
27570
27571  # Now new_path has a complete unix path to the binary
27572  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27573    # Keep paths in /bin as-is, but remove trailing .exe if any
27574    new_path="${new_path/%.exe/}"
27575    # Do not save /bin paths to all_fixpath_prefixes!
27576  else
27577    # Not in mixed or Windows style, start by that.
27578    new_path=`cmd //c echo $new_path`
27579
27580  input_path="$new_path"
27581  # Check if we need to convert this using DOS-style short mode. If the path
27582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27583  # take no chances and rewrite it.
27584  # Note: m4 eats our [], so we need to use [ and ] instead.
27585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27586  if test "x$has_forbidden_chars" != x; then
27587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27589  fi
27590
27591    # Output is in $new_path
27592
27593  windows_path="$new_path"
27594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27595    unix_path=`$CYGPATH -u "$windows_path"`
27596    new_path="$unix_path"
27597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27599    new_path="$unix_path"
27600  fi
27601
27602    # remove trailing .exe if any
27603    new_path="${new_path/%.exe/}"
27604
27605    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27606    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27607  fi
27608
27609    else
27610      # We're on a unix platform. Hooray! :)
27611      # First separate the path from the arguments. This will split at the first
27612      # space.
27613      complete="$VS_ENV_CMD"
27614      path="${complete%% *}"
27615      tmp="$complete EOL"
27616      arguments="${tmp#* }"
27617
27618      # Cannot rely on the command "which" here since it doesn't always work.
27619      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27620      if test -z "$is_absolute_path"; then
27621        # Path to executable is not absolute. Find it.
27622        IFS_save="$IFS"
27623        IFS=:
27624        for p in $PATH; do
27625          if test -f "$p/$path" && test -x "$p/$path"; then
27626            new_path="$p/$path"
27627            break
27628          fi
27629        done
27630        IFS="$IFS_save"
27631      else
27632        # This is an absolute path, we can use it without further modifications.
27633        new_path="$path"
27634      fi
27635
27636      if test "x$new_path" = x; then
27637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27638$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27639        has_space=`$ECHO "$complete" | $GREP " "`
27640        if test "x$has_space" != x; then
27641          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27642$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27643        fi
27644        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27645      fi
27646    fi
27647
27648    # Now join together the path and the arguments once again
27649    if test "x$arguments" != xEOL; then
27650      new_complete="$new_path ${arguments% *}"
27651    else
27652      new_complete="$new_path"
27653    fi
27654
27655    if test "x$complete" != "x$new_complete"; then
27656      VS_ENV_CMD="$new_complete"
27657      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27658$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27659    fi
27660  fi
27661
27662
27663      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27664      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27665$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27666
27667      # We need to create a couple of temporary files.
27668      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27669      $MKDIR -p $VS_ENV_TMP_DIR
27670
27671      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27672      # Instead create a shell script which will set the relevant variables when run.
27673      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27674
27675  unix_path="$WINPATH_VS_ENV_CMD"
27676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27677    windows_path=`$CYGPATH -m "$unix_path"`
27678    WINPATH_VS_ENV_CMD="$windows_path"
27679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27680    windows_path=`cmd //c echo $unix_path`
27681    WINPATH_VS_ENV_CMD="$windows_path"
27682  fi
27683
27684      WINPATH_BASH="$BASH"
27685
27686  unix_path="$WINPATH_BASH"
27687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27688    windows_path=`$CYGPATH -m "$unix_path"`
27689    WINPATH_BASH="$windows_path"
27690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27691    windows_path=`cmd //c echo $unix_path`
27692    WINPATH_BASH="$windows_path"
27693  fi
27694
27695
27696      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27697      # script (executable by bash) that will setup the important variables.
27698      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27699      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27700      # This will end up something like:
27701      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27702      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27703      # These will end up something like:
27704      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27705      # The trailing space for everyone except PATH is no typo, but is needed due
27706      # to trailing \ in the Windows paths. These will be stripped later.
27707      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27708          >> $EXTRACT_VC_ENV_BAT_FILE
27709      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27710          >> $EXTRACT_VC_ENV_BAT_FILE
27711      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27712          >> $EXTRACT_VC_ENV_BAT_FILE
27713      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27714          >> $EXTRACT_VC_ENV_BAT_FILE
27715      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27716          >> $EXTRACT_VC_ENV_BAT_FILE
27717      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27718          >> $EXTRACT_VC_ENV_BAT_FILE
27719
27720      # Now execute the newly created bat file.
27721      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27722      # Change directory so we don't need to mess with Windows paths in redirects.
27723      cd $VS_ENV_TMP_DIR
27724      cmd /c extract-vs-env.bat | $CAT
27725      cd $CURDIR
27726
27727      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27728        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27729$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27730        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27731$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27733$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27734        as_fn_error $? "Cannot continue" "$LINENO" 5
27735      fi
27736
27737      # Now set all paths and other env variables. This will allow the rest of
27738      # the configure script to find and run the compiler in the proper way.
27739      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27740$as_echo "$as_me: Setting extracted environment variables" >&6;}
27741      . $VS_ENV_TMP_DIR/set-vs-env.sh
27742      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27743      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27744    else
27745      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27746      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27747$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27748    fi
27749  fi
27750
27751  # At this point, we should have correct variables in the environment, or we can't continue.
27752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27753$as_echo_n "checking for Visual Studio variables... " >&6; }
27754
27755  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27756      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27757    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27759$as_echo "present but broken" >&6; }
27760      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27761    else
27762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27763$as_echo "ok" >&6; }
27764      # Remove any trailing "\" ";" and " " from the variables.
27765      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27766      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27767      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27768      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27769      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27770      # Remove any paths containing # (typically F#) as that messes up make. This
27771      # is needed if visual studio was installed with F# support.
27772      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27773
27774
27775
27776
27777
27778      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27779      OLDIFS="$IFS"
27780      IFS=";"
27781      for i in $VS_INCLUDE; do
27782        ipath=$i
27783        # Only process non-empty elements
27784        if test "x$ipath" != x; then
27785          IFS="$OLDIFS"
27786          # Check that directory exists before calling fixup_path
27787          testpath=$ipath
27788
27789  windows_path="$testpath"
27790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27791    unix_path=`$CYGPATH -u "$windows_path"`
27792    testpath="$unix_path"
27793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27795    testpath="$unix_path"
27796  fi
27797
27798          if test -d "$testpath"; then
27799
27800  # Only process if variable expands to non-empty
27801
27802  if test "x$ipath" != x; then
27803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27804
27805  # Input might be given as Windows format, start by converting to
27806  # unix format.
27807  path="$ipath"
27808  new_path=`$CYGPATH -u "$path"`
27809
27810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27813  # "foo.exe" is OK but "foo" is an error.
27814  #
27815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27816  # It is also a way to make sure we got the proper file name for the real test later on.
27817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27818  if test "x$test_shortpath" = x; then
27819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27820$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27821    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27822  fi
27823
27824  # Call helper function which possibly converts this using DOS-style short mode.
27825  # If so, the updated path is stored in $new_path.
27826
27827  input_path="$new_path"
27828  # Check if we need to convert this using DOS-style short mode. If the path
27829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27830  # take no chances and rewrite it.
27831  # Note: m4 eats our [], so we need to use [ and ] instead.
27832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27833  if test "x$has_forbidden_chars" != x; then
27834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27838      # Going to short mode and back again did indeed matter. Since short mode is
27839      # case insensitive, let's make it lowercase to improve readability.
27840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27841      # Now convert it back to Unix-style (cygpath)
27842      input_path=`$CYGPATH -u "$shortmode_path"`
27843      new_path="$input_path"
27844    fi
27845  fi
27846
27847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27848  if test "x$test_cygdrive_prefix" = x; then
27849    # As a simple fix, exclude /usr/bin since it's not a real path.
27850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27852      # a path prefixed by /cygdrive for fixpath to work.
27853      new_path="$CYGWIN_ROOT_PATH$input_path"
27854    fi
27855  fi
27856
27857
27858  if test "x$path" != "x$new_path"; then
27859    ipath="$new_path"
27860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27861$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27862  fi
27863
27864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27865
27866  path="$ipath"
27867  has_colon=`$ECHO $path | $GREP ^.:`
27868  new_path="$path"
27869  if test "x$has_colon" = x; then
27870    # Not in mixed or Windows style, start by that.
27871    new_path=`cmd //c echo $path`
27872  fi
27873
27874
27875  input_path="$new_path"
27876  # Check if we need to convert this using DOS-style short mode. If the path
27877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27878  # take no chances and rewrite it.
27879  # Note: m4 eats our [], so we need to use [ and ] instead.
27880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27881  if test "x$has_forbidden_chars" != x; then
27882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27884  fi
27885
27886
27887  windows_path="$new_path"
27888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27889    unix_path=`$CYGPATH -u "$windows_path"`
27890    new_path="$unix_path"
27891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27893    new_path="$unix_path"
27894  fi
27895
27896  if test "x$path" != "x$new_path"; then
27897    ipath="$new_path"
27898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27899$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27900  fi
27901
27902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27904
27905    else
27906      # We're on a unix platform. Hooray! :)
27907      path="$ipath"
27908      has_space=`$ECHO "$path" | $GREP " "`
27909      if test "x$has_space" != x; then
27910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27911$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27913      fi
27914
27915      # Use eval to expand a potential ~
27916      eval path="$path"
27917      if test ! -f "$path" && test ! -d "$path"; then
27918        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27919      fi
27920
27921      ipath="`cd "$path"; $THEPWDCMD -L`"
27922    fi
27923  fi
27924
27925            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27926          fi
27927          IFS=";"
27928        fi
27929      done
27930      # Convert VS_LIB into SYSROOT_LDFLAGS
27931      for i in $VS_LIB; do
27932        libpath=$i
27933        # Only process non-empty elements
27934        if test "x$libpath" != x; then
27935          IFS="$OLDIFS"
27936          # Check that directory exists before calling fixup_path
27937          testpath=$libpath
27938
27939  windows_path="$testpath"
27940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27941    unix_path=`$CYGPATH -u "$windows_path"`
27942    testpath="$unix_path"
27943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27945    testpath="$unix_path"
27946  fi
27947
27948          if test -d "$testpath"; then
27949
27950  # Only process if variable expands to non-empty
27951
27952  if test "x$libpath" != x; then
27953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27954
27955  # Input might be given as Windows format, start by converting to
27956  # unix format.
27957  path="$libpath"
27958  new_path=`$CYGPATH -u "$path"`
27959
27960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27963  # "foo.exe" is OK but "foo" is an error.
27964  #
27965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27966  # It is also a way to make sure we got the proper file name for the real test later on.
27967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27968  if test "x$test_shortpath" = x; then
27969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27970$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27971    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27972  fi
27973
27974  # Call helper function which possibly converts this using DOS-style short mode.
27975  # If so, the updated path is stored in $new_path.
27976
27977  input_path="$new_path"
27978  # Check if we need to convert this using DOS-style short mode. If the path
27979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27980  # take no chances and rewrite it.
27981  # Note: m4 eats our [], so we need to use [ and ] instead.
27982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27983  if test "x$has_forbidden_chars" != x; then
27984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27988      # Going to short mode and back again did indeed matter. Since short mode is
27989      # case insensitive, let's make it lowercase to improve readability.
27990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27991      # Now convert it back to Unix-style (cygpath)
27992      input_path=`$CYGPATH -u "$shortmode_path"`
27993      new_path="$input_path"
27994    fi
27995  fi
27996
27997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27998  if test "x$test_cygdrive_prefix" = x; then
27999    # As a simple fix, exclude /usr/bin since it's not a real path.
28000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28002      # a path prefixed by /cygdrive for fixpath to work.
28003      new_path="$CYGWIN_ROOT_PATH$input_path"
28004    fi
28005  fi
28006
28007
28008  if test "x$path" != "x$new_path"; then
28009    libpath="$new_path"
28010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28011$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28012  fi
28013
28014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28015
28016  path="$libpath"
28017  has_colon=`$ECHO $path | $GREP ^.:`
28018  new_path="$path"
28019  if test "x$has_colon" = x; then
28020    # Not in mixed or Windows style, start by that.
28021    new_path=`cmd //c echo $path`
28022  fi
28023
28024
28025  input_path="$new_path"
28026  # Check if we need to convert this using DOS-style short mode. If the path
28027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28028  # take no chances and rewrite it.
28029  # Note: m4 eats our [], so we need to use [ and ] instead.
28030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28031  if test "x$has_forbidden_chars" != x; then
28032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28034  fi
28035
28036
28037  windows_path="$new_path"
28038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28039    unix_path=`$CYGPATH -u "$windows_path"`
28040    new_path="$unix_path"
28041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28043    new_path="$unix_path"
28044  fi
28045
28046  if test "x$path" != "x$new_path"; then
28047    libpath="$new_path"
28048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28049$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28050  fi
28051
28052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28054
28055    else
28056      # We're on a unix platform. Hooray! :)
28057      path="$libpath"
28058      has_space=`$ECHO "$path" | $GREP " "`
28059      if test "x$has_space" != x; then
28060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28061$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28062        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28063      fi
28064
28065      # Use eval to expand a potential ~
28066      eval path="$path"
28067      if test ! -f "$path" && test ! -d "$path"; then
28068        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28069      fi
28070
28071      libpath="`cd "$path"; $THEPWDCMD -L`"
28072    fi
28073  fi
28074
28075            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28076          fi
28077          IFS=";"
28078        fi
28079      done
28080      IFS="$OLDIFS"
28081    fi
28082  else
28083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28084$as_echo "not found" >&6; }
28085
28086    if test "x$VS_ENV_CMD" = x; then
28087      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28088$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28089      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28090$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28091    else
28092      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28093$as_echo "$as_me: Running the extraction script failed." >&6;}
28094    fi
28095    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28096$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28097    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28098$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28099    as_fn_error $? "Cannot continue" "$LINENO" 5
28100  fi
28101
28102    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28103    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28104    PATH="$VS_PATH"
28105    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28106    export INCLUDE="$VS_INCLUDE"
28107    export LIB="$VS_LIB"
28108  fi
28109
28110  # For solaris we really need solaris tools, and not the GNU equivalent.
28111  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28112  # so add that to path before starting to probe.
28113  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28114  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28115    PATH="/usr/ccs/bin:$PATH"
28116  fi
28117
28118  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28119  # override all other locations.
28120  if test "x$TOOLCHAIN_PATH" != x; then
28121    PATH=$TOOLCHAIN_PATH:$PATH
28122  fi
28123
28124
28125  #
28126  # Setup the compilers (CC and CXX)
28127  #
28128
28129  COMPILER_NAME=C
28130  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28131
28132  if test "x$CC" != x; then
28133    # User has supplied compiler name already, always let that override.
28134    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28135$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28136    if test "x`basename $CC`" = "x$CC"; then
28137      # A command without a complete path is provided, search $PATH.
28138
28139      for ac_prog in $CC
28140do
28141  # Extract the first word of "$ac_prog", so it can be a program name with args.
28142set dummy $ac_prog; ac_word=$2
28143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28144$as_echo_n "checking for $ac_word... " >&6; }
28145if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28146  $as_echo_n "(cached) " >&6
28147else
28148  case $POTENTIAL_CC in
28149  [\\/]* | ?:[\\/]*)
28150  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28151  ;;
28152  *)
28153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28154for as_dir in $PATH
28155do
28156  IFS=$as_save_IFS
28157  test -z "$as_dir" && as_dir=.
28158    for ac_exec_ext in '' $ac_executable_extensions; do
28159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28160    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28162    break 2
28163  fi
28164done
28165  done
28166IFS=$as_save_IFS
28167
28168  ;;
28169esac
28170fi
28171POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28172if test -n "$POTENTIAL_CC"; then
28173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28174$as_echo "$POTENTIAL_CC" >&6; }
28175else
28176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28177$as_echo "no" >&6; }
28178fi
28179
28180
28181  test -n "$POTENTIAL_CC" && break
28182done
28183
28184      if test "x$POTENTIAL_CC" != x; then
28185        CC=$POTENTIAL_CC
28186      else
28187        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28188      fi
28189    else
28190      # Otherwise it might already be a complete path
28191      if test ! -x "$CC"; then
28192        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28193      fi
28194    fi
28195  else
28196    # No user supplied value. Locate compiler ourselves.
28197
28198    # If we are cross compiling, assume cross compilation tools follows the
28199    # cross compilation standard where they are prefixed with the autoconf
28200    # standard name for the target. For example the binary
28201    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28202    # If we are not cross compiling, then the default compiler name will be
28203    # used.
28204
28205    CC=
28206    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28207    # before checking the rest of the PATH.
28208    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28209    # step, this should not be necessary.
28210    if test -n "$TOOLCHAIN_PATH"; then
28211      PATH_save="$PATH"
28212      PATH="$TOOLCHAIN_PATH"
28213      for ac_prog in $SEARCH_LIST
28214do
28215  # Extract the first word of "$ac_prog", so it can be a program name with args.
28216set dummy $ac_prog; ac_word=$2
28217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28218$as_echo_n "checking for $ac_word... " >&6; }
28219if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28220  $as_echo_n "(cached) " >&6
28221else
28222  case $TOOLCHAIN_PATH_CC in
28223  [\\/]* | ?:[\\/]*)
28224  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28225  ;;
28226  *)
28227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28228for as_dir in $PATH
28229do
28230  IFS=$as_save_IFS
28231  test -z "$as_dir" && as_dir=.
28232    for ac_exec_ext in '' $ac_executable_extensions; do
28233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28234    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28236    break 2
28237  fi
28238done
28239  done
28240IFS=$as_save_IFS
28241
28242  ;;
28243esac
28244fi
28245TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28246if test -n "$TOOLCHAIN_PATH_CC"; then
28247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28248$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28249else
28250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28251$as_echo "no" >&6; }
28252fi
28253
28254
28255  test -n "$TOOLCHAIN_PATH_CC" && break
28256done
28257
28258      CC=$TOOLCHAIN_PATH_CC
28259      PATH="$PATH_save"
28260    fi
28261
28262    # AC_PATH_PROGS can't be run multiple times with the same variable,
28263    # so create a new name for this run.
28264    if test "x$CC" = x; then
28265      for ac_prog in $SEARCH_LIST
28266do
28267  # Extract the first word of "$ac_prog", so it can be a program name with args.
28268set dummy $ac_prog; ac_word=$2
28269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28270$as_echo_n "checking for $ac_word... " >&6; }
28271if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28272  $as_echo_n "(cached) " >&6
28273else
28274  case $POTENTIAL_CC in
28275  [\\/]* | ?:[\\/]*)
28276  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28277  ;;
28278  *)
28279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28280for as_dir in $PATH
28281do
28282  IFS=$as_save_IFS
28283  test -z "$as_dir" && as_dir=.
28284    for ac_exec_ext in '' $ac_executable_extensions; do
28285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28286    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28288    break 2
28289  fi
28290done
28291  done
28292IFS=$as_save_IFS
28293
28294  ;;
28295esac
28296fi
28297POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28298if test -n "$POTENTIAL_CC"; then
28299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28300$as_echo "$POTENTIAL_CC" >&6; }
28301else
28302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28303$as_echo "no" >&6; }
28304fi
28305
28306
28307  test -n "$POTENTIAL_CC" && break
28308done
28309
28310      CC=$POTENTIAL_CC
28311    fi
28312
28313    if test "x$CC" = x; then
28314
28315  # Print a helpful message on how to acquire the necessary build dependency.
28316  # devkit is the help tag: freetype, cups, pulse, alsa etc
28317  MISSING_DEPENDENCY=devkit
28318
28319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28320    cygwin_help $MISSING_DEPENDENCY
28321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28322    msys_help $MISSING_DEPENDENCY
28323  else
28324    PKGHANDLER_COMMAND=
28325
28326    case $PKGHANDLER in
28327      apt-get)
28328        apt_help     $MISSING_DEPENDENCY ;;
28329      yum)
28330        yum_help     $MISSING_DEPENDENCY ;;
28331      port)
28332        port_help    $MISSING_DEPENDENCY ;;
28333      pkgutil)
28334        pkgutil_help $MISSING_DEPENDENCY ;;
28335      pkgadd)
28336        pkgadd_help  $MISSING_DEPENDENCY ;;
28337    esac
28338
28339    if test "x$PKGHANDLER_COMMAND" != x; then
28340      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28341    fi
28342  fi
28343
28344      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28345    fi
28346  fi
28347
28348  # Now we have a compiler binary in CC. Make sure it's okay.
28349
28350  # Only process if variable expands to non-empty
28351
28352  if test "x$CC" != x; then
28353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28354
28355  # First separate the path from the arguments. This will split at the first
28356  # space.
28357  complete="$CC"
28358  path="${complete%% *}"
28359  tmp="$complete EOL"
28360  arguments="${tmp#* }"
28361
28362  # Input might be given as Windows format, start by converting to
28363  # unix format.
28364  new_path=`$CYGPATH -u "$path"`
28365
28366  # Now try to locate executable using which
28367  new_path=`$WHICH "$new_path" 2> /dev/null`
28368  # bat and cmd files are not always considered executable in cygwin causing which
28369  # to not find them
28370  if test "x$new_path" = x \
28371      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28372      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28373    new_path=`$CYGPATH -u "$path"`
28374  fi
28375  if test "x$new_path" = x; then
28376    # Oops. Which didn't find the executable.
28377    # The splitting of arguments from the executable at a space might have been incorrect,
28378    # since paths with space are more likely in Windows. Give it another try with the whole
28379    # argument.
28380    path="$complete"
28381    arguments="EOL"
28382    new_path=`$CYGPATH -u "$path"`
28383    new_path=`$WHICH "$new_path" 2> /dev/null`
28384    # bat and cmd files are not always considered executable in cygwin causing which
28385    # to not find them
28386    if test "x$new_path" = x \
28387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28389      new_path=`$CYGPATH -u "$path"`
28390    fi
28391    if test "x$new_path" = x; then
28392      # It's still not found. Now this is an unrecoverable error.
28393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28394$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28395      has_space=`$ECHO "$complete" | $GREP " "`
28396      if test "x$has_space" != x; then
28397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28399      fi
28400      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28401    fi
28402  fi
28403
28404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28407  # "foo.exe" is OK but "foo" is an error.
28408  #
28409  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28410  # It is also a way to make sure we got the proper file name for the real test later on.
28411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28412  if test "x$test_shortpath" = x; then
28413    # Short path failed, file does not exist as specified.
28414    # Try adding .exe or .cmd
28415    if test -f "${new_path}.exe"; then
28416      input_to_shortpath="${new_path}.exe"
28417    elif test -f "${new_path}.cmd"; then
28418      input_to_shortpath="${new_path}.cmd"
28419    else
28420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28421$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28422      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28423$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28424      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28425    fi
28426  else
28427    input_to_shortpath="$new_path"
28428  fi
28429
28430  # Call helper function which possibly converts this using DOS-style short mode.
28431  # If so, the updated path is stored in $new_path.
28432  new_path="$input_to_shortpath"
28433
28434  input_path="$input_to_shortpath"
28435  # Check if we need to convert this using DOS-style short mode. If the path
28436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28437  # take no chances and rewrite it.
28438  # Note: m4 eats our [], so we need to use [ and ] instead.
28439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28440  if test "x$has_forbidden_chars" != x; then
28441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28445      # Going to short mode and back again did indeed matter. Since short mode is
28446      # case insensitive, let's make it lowercase to improve readability.
28447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28448      # Now convert it back to Unix-style (cygpath)
28449      input_path=`$CYGPATH -u "$shortmode_path"`
28450      new_path="$input_path"
28451    fi
28452  fi
28453
28454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28455  if test "x$test_cygdrive_prefix" = x; then
28456    # As a simple fix, exclude /usr/bin since it's not a real path.
28457    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28459      # a path prefixed by /cygdrive for fixpath to work.
28460      new_path="$CYGWIN_ROOT_PATH$input_path"
28461    fi
28462  fi
28463
28464  # remove trailing .exe if any
28465  new_path="${new_path/%.exe/}"
28466
28467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28468
28469  # First separate the path from the arguments. This will split at the first
28470  # space.
28471  complete="$CC"
28472  path="${complete%% *}"
28473  tmp="$complete EOL"
28474  arguments="${tmp#* }"
28475
28476  # Input might be given as Windows format, start by converting to
28477  # unix format.
28478  new_path="$path"
28479
28480  windows_path="$new_path"
28481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28482    unix_path=`$CYGPATH -u "$windows_path"`
28483    new_path="$unix_path"
28484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28486    new_path="$unix_path"
28487  fi
28488
28489
28490  # Now try to locate executable using which
28491  new_path=`$WHICH "$new_path" 2> /dev/null`
28492
28493  if test "x$new_path" = x; then
28494    # Oops. Which didn't find the executable.
28495    # The splitting of arguments from the executable at a space might have been incorrect,
28496    # since paths with space are more likely in Windows. Give it another try with the whole
28497    # argument.
28498    path="$complete"
28499    arguments="EOL"
28500    new_path="$path"
28501
28502  windows_path="$new_path"
28503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28504    unix_path=`$CYGPATH -u "$windows_path"`
28505    new_path="$unix_path"
28506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28508    new_path="$unix_path"
28509  fi
28510
28511
28512    new_path=`$WHICH "$new_path" 2> /dev/null`
28513    # bat and cmd files are not always considered executable in MSYS causing which
28514    # to not find them
28515    if test "x$new_path" = x \
28516        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28517        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28518      new_path="$path"
28519
28520  windows_path="$new_path"
28521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28522    unix_path=`$CYGPATH -u "$windows_path"`
28523    new_path="$unix_path"
28524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28526    new_path="$unix_path"
28527  fi
28528
28529    fi
28530
28531    if test "x$new_path" = x; then
28532      # It's still not found. Now this is an unrecoverable error.
28533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28534$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28535      has_space=`$ECHO "$complete" | $GREP " "`
28536      if test "x$has_space" != x; then
28537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28539      fi
28540      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28541    fi
28542  fi
28543
28544  # Now new_path has a complete unix path to the binary
28545  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28546    # Keep paths in /bin as-is, but remove trailing .exe if any
28547    new_path="${new_path/%.exe/}"
28548    # Do not save /bin paths to all_fixpath_prefixes!
28549  else
28550    # Not in mixed or Windows style, start by that.
28551    new_path=`cmd //c echo $new_path`
28552
28553  input_path="$new_path"
28554  # Check if we need to convert this using DOS-style short mode. If the path
28555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28556  # take no chances and rewrite it.
28557  # Note: m4 eats our [], so we need to use [ and ] instead.
28558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28559  if test "x$has_forbidden_chars" != x; then
28560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28562  fi
28563
28564    # Output is in $new_path
28565
28566  windows_path="$new_path"
28567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28568    unix_path=`$CYGPATH -u "$windows_path"`
28569    new_path="$unix_path"
28570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28572    new_path="$unix_path"
28573  fi
28574
28575    # remove trailing .exe if any
28576    new_path="${new_path/%.exe/}"
28577
28578    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28579    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28580  fi
28581
28582    else
28583      # We're on a unix platform. Hooray! :)
28584      # First separate the path from the arguments. This will split at the first
28585      # space.
28586      complete="$CC"
28587      path="${complete%% *}"
28588      tmp="$complete EOL"
28589      arguments="${tmp#* }"
28590
28591      # Cannot rely on the command "which" here since it doesn't always work.
28592      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28593      if test -z "$is_absolute_path"; then
28594        # Path to executable is not absolute. Find it.
28595        IFS_save="$IFS"
28596        IFS=:
28597        for p in $PATH; do
28598          if test -f "$p/$path" && test -x "$p/$path"; then
28599            new_path="$p/$path"
28600            break
28601          fi
28602        done
28603        IFS="$IFS_save"
28604      else
28605        # This is an absolute path, we can use it without further modifications.
28606        new_path="$path"
28607      fi
28608
28609      if test "x$new_path" = x; then
28610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28611$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28612        has_space=`$ECHO "$complete" | $GREP " "`
28613        if test "x$has_space" != x; then
28614          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28615$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28616        fi
28617        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28618      fi
28619    fi
28620
28621    # Now join together the path and the arguments once again
28622    if test "x$arguments" != xEOL; then
28623      new_complete="$new_path ${arguments% *}"
28624    else
28625      new_complete="$new_path"
28626    fi
28627
28628    if test "x$complete" != "x$new_complete"; then
28629      CC="$new_complete"
28630      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28631$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28632    fi
28633  fi
28634
28635  TEST_COMPILER="$CC"
28636  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28637  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28638  if test "x$OPENJDK_BUILD_OS" != xaix; then
28639    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28641$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28642
28643  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28644    # Follow a chain of symbolic links. Use readlink
28645    # where it exists, else fall back to horribly
28646    # complicated shell code.
28647    if test "x$READLINK_TESTED" != yes; then
28648      # On MacOSX there is a readlink tool with a different
28649      # purpose than the GNU readlink tool. Check the found readlink.
28650      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28651      if test "x$ISGNU" = x; then
28652        # A readlink that we do not know how to use.
28653        # Are there other non-GNU readlinks out there?
28654        READLINK_TESTED=yes
28655        READLINK=
28656      fi
28657    fi
28658
28659    if test "x$READLINK" != x; then
28660      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28661    else
28662      # Save the current directory for restoring afterwards
28663      STARTDIR=$PWD
28664      COUNTER=0
28665      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28666      sym_link_file=`$BASENAME $TEST_COMPILER`
28667      cd $sym_link_dir
28668      # Use -P flag to resolve symlinks in directories.
28669      cd `$THEPWDCMD -P`
28670      sym_link_dir=`$THEPWDCMD -P`
28671      # Resolve file symlinks
28672      while test $COUNTER -lt 20; do
28673        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28674        if test "x$ISLINK" == x; then
28675          # This is not a symbolic link! We are done!
28676          break
28677        fi
28678        # Again resolve directory symlinks since the target of the just found
28679        # link could be in a different directory
28680        cd `$DIRNAME $ISLINK`
28681        sym_link_dir=`$THEPWDCMD -P`
28682        sym_link_file=`$BASENAME $ISLINK`
28683        let COUNTER=COUNTER+1
28684      done
28685      cd $STARTDIR
28686      TEST_COMPILER=$sym_link_dir/$sym_link_file
28687    fi
28688  fi
28689
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28691$as_echo "$TEST_COMPILER" >&6; }
28692  fi
28693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28694$as_echo_n "checking if CC is disguised ccache... " >&6; }
28695
28696  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28697  if test "x$COMPILER_BASENAME" = "xccache"; then
28698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28699$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28700    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28701    # We want to control ccache invocation ourselves, so ignore this cc and try
28702    # searching again.
28703
28704    # Remove the path to the fake ccache cc from the PATH
28705    RETRY_COMPILER_SAVED_PATH="$PATH"
28706    COMPILER_DIRNAME=`$DIRNAME $CC`
28707    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28708
28709    # Try again looking for our compiler
28710    if test -n "$ac_tool_prefix"; then
28711  for ac_prog in $TOOLCHAIN_CC_BINARY
28712  do
28713    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28714set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28716$as_echo_n "checking for $ac_word... " >&6; }
28717if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28718  $as_echo_n "(cached) " >&6
28719else
28720  if test -n "$PROPER_COMPILER_CC"; then
28721  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28722else
28723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28724for as_dir in $PATH
28725do
28726  IFS=$as_save_IFS
28727  test -z "$as_dir" && as_dir=.
28728    for ac_exec_ext in '' $ac_executable_extensions; do
28729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28730    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28732    break 2
28733  fi
28734done
28735  done
28736IFS=$as_save_IFS
28737
28738fi
28739fi
28740PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28741if test -n "$PROPER_COMPILER_CC"; then
28742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28743$as_echo "$PROPER_COMPILER_CC" >&6; }
28744else
28745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28746$as_echo "no" >&6; }
28747fi
28748
28749
28750    test -n "$PROPER_COMPILER_CC" && break
28751  done
28752fi
28753if test -z "$PROPER_COMPILER_CC"; then
28754  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28755  for ac_prog in $TOOLCHAIN_CC_BINARY
28756do
28757  # Extract the first word of "$ac_prog", so it can be a program name with args.
28758set dummy $ac_prog; ac_word=$2
28759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28760$as_echo_n "checking for $ac_word... " >&6; }
28761if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28762  $as_echo_n "(cached) " >&6
28763else
28764  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28765  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28766else
28767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28768for as_dir in $PATH
28769do
28770  IFS=$as_save_IFS
28771  test -z "$as_dir" && as_dir=.
28772    for ac_exec_ext in '' $ac_executable_extensions; do
28773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28774    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28776    break 2
28777  fi
28778done
28779  done
28780IFS=$as_save_IFS
28781
28782fi
28783fi
28784ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28785if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28787$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28788else
28789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28790$as_echo "no" >&6; }
28791fi
28792
28793
28794  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28795done
28796
28797  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28798    PROPER_COMPILER_CC=""
28799  else
28800    case $cross_compiling:$ac_tool_warned in
28801yes:)
28802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28804ac_tool_warned=yes ;;
28805esac
28806    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28807  fi
28808fi
28809
28810
28811  # Only process if variable expands to non-empty
28812
28813  if test "x$PROPER_COMPILER_CC" != x; then
28814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28815
28816  # First separate the path from the arguments. This will split at the first
28817  # space.
28818  complete="$PROPER_COMPILER_CC"
28819  path="${complete%% *}"
28820  tmp="$complete EOL"
28821  arguments="${tmp#* }"
28822
28823  # Input might be given as Windows format, start by converting to
28824  # unix format.
28825  new_path=`$CYGPATH -u "$path"`
28826
28827  # Now try to locate executable using which
28828  new_path=`$WHICH "$new_path" 2> /dev/null`
28829  # bat and cmd files are not always considered executable in cygwin causing which
28830  # to not find them
28831  if test "x$new_path" = x \
28832      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28833      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28834    new_path=`$CYGPATH -u "$path"`
28835  fi
28836  if test "x$new_path" = x; then
28837    # Oops. Which didn't find the executable.
28838    # The splitting of arguments from the executable at a space might have been incorrect,
28839    # since paths with space are more likely in Windows. Give it another try with the whole
28840    # argument.
28841    path="$complete"
28842    arguments="EOL"
28843    new_path=`$CYGPATH -u "$path"`
28844    new_path=`$WHICH "$new_path" 2> /dev/null`
28845    # bat and cmd files are not always considered executable in cygwin causing which
28846    # to not find them
28847    if test "x$new_path" = x \
28848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28850      new_path=`$CYGPATH -u "$path"`
28851    fi
28852    if test "x$new_path" = x; then
28853      # It's still not found. Now this is an unrecoverable error.
28854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28855$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28856      has_space=`$ECHO "$complete" | $GREP " "`
28857      if test "x$has_space" != x; then
28858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28860      fi
28861      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28862    fi
28863  fi
28864
28865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28868  # "foo.exe" is OK but "foo" is an error.
28869  #
28870  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28871  # It is also a way to make sure we got the proper file name for the real test later on.
28872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28873  if test "x$test_shortpath" = x; then
28874    # Short path failed, file does not exist as specified.
28875    # Try adding .exe or .cmd
28876    if test -f "${new_path}.exe"; then
28877      input_to_shortpath="${new_path}.exe"
28878    elif test -f "${new_path}.cmd"; then
28879      input_to_shortpath="${new_path}.cmd"
28880    else
28881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28882$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28883      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28884$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28885      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28886    fi
28887  else
28888    input_to_shortpath="$new_path"
28889  fi
28890
28891  # Call helper function which possibly converts this using DOS-style short mode.
28892  # If so, the updated path is stored in $new_path.
28893  new_path="$input_to_shortpath"
28894
28895  input_path="$input_to_shortpath"
28896  # Check if we need to convert this using DOS-style short mode. If the path
28897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28898  # take no chances and rewrite it.
28899  # Note: m4 eats our [], so we need to use [ and ] instead.
28900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28901  if test "x$has_forbidden_chars" != x; then
28902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28906      # Going to short mode and back again did indeed matter. Since short mode is
28907      # case insensitive, let's make it lowercase to improve readability.
28908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28909      # Now convert it back to Unix-style (cygpath)
28910      input_path=`$CYGPATH -u "$shortmode_path"`
28911      new_path="$input_path"
28912    fi
28913  fi
28914
28915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28916  if test "x$test_cygdrive_prefix" = x; then
28917    # As a simple fix, exclude /usr/bin since it's not a real path.
28918    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28920      # a path prefixed by /cygdrive for fixpath to work.
28921      new_path="$CYGWIN_ROOT_PATH$input_path"
28922    fi
28923  fi
28924
28925  # remove trailing .exe if any
28926  new_path="${new_path/%.exe/}"
28927
28928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28929
28930  # First separate the path from the arguments. This will split at the first
28931  # space.
28932  complete="$PROPER_COMPILER_CC"
28933  path="${complete%% *}"
28934  tmp="$complete EOL"
28935  arguments="${tmp#* }"
28936
28937  # Input might be given as Windows format, start by converting to
28938  # unix format.
28939  new_path="$path"
28940
28941  windows_path="$new_path"
28942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28943    unix_path=`$CYGPATH -u "$windows_path"`
28944    new_path="$unix_path"
28945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28947    new_path="$unix_path"
28948  fi
28949
28950
28951  # Now try to locate executable using which
28952  new_path=`$WHICH "$new_path" 2> /dev/null`
28953
28954  if test "x$new_path" = x; then
28955    # Oops. Which didn't find the executable.
28956    # The splitting of arguments from the executable at a space might have been incorrect,
28957    # since paths with space are more likely in Windows. Give it another try with the whole
28958    # argument.
28959    path="$complete"
28960    arguments="EOL"
28961    new_path="$path"
28962
28963  windows_path="$new_path"
28964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28965    unix_path=`$CYGPATH -u "$windows_path"`
28966    new_path="$unix_path"
28967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28969    new_path="$unix_path"
28970  fi
28971
28972
28973    new_path=`$WHICH "$new_path" 2> /dev/null`
28974    # bat and cmd files are not always considered executable in MSYS causing which
28975    # to not find them
28976    if test "x$new_path" = x \
28977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28979      new_path="$path"
28980
28981  windows_path="$new_path"
28982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28983    unix_path=`$CYGPATH -u "$windows_path"`
28984    new_path="$unix_path"
28985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28987    new_path="$unix_path"
28988  fi
28989
28990    fi
28991
28992    if test "x$new_path" = x; then
28993      # It's still not found. Now this is an unrecoverable error.
28994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28995$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28996      has_space=`$ECHO "$complete" | $GREP " "`
28997      if test "x$has_space" != x; then
28998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29000      fi
29001      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29002    fi
29003  fi
29004
29005  # Now new_path has a complete unix path to the binary
29006  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29007    # Keep paths in /bin as-is, but remove trailing .exe if any
29008    new_path="${new_path/%.exe/}"
29009    # Do not save /bin paths to all_fixpath_prefixes!
29010  else
29011    # Not in mixed or Windows style, start by that.
29012    new_path=`cmd //c echo $new_path`
29013
29014  input_path="$new_path"
29015  # Check if we need to convert this using DOS-style short mode. If the path
29016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29017  # take no chances and rewrite it.
29018  # Note: m4 eats our [], so we need to use [ and ] instead.
29019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29020  if test "x$has_forbidden_chars" != x; then
29021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29023  fi
29024
29025    # Output is in $new_path
29026
29027  windows_path="$new_path"
29028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29029    unix_path=`$CYGPATH -u "$windows_path"`
29030    new_path="$unix_path"
29031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29033    new_path="$unix_path"
29034  fi
29035
29036    # remove trailing .exe if any
29037    new_path="${new_path/%.exe/}"
29038
29039    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29040    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29041  fi
29042
29043    else
29044      # We're on a unix platform. Hooray! :)
29045      # First separate the path from the arguments. This will split at the first
29046      # space.
29047      complete="$PROPER_COMPILER_CC"
29048      path="${complete%% *}"
29049      tmp="$complete EOL"
29050      arguments="${tmp#* }"
29051
29052      # Cannot rely on the command "which" here since it doesn't always work.
29053      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29054      if test -z "$is_absolute_path"; then
29055        # Path to executable is not absolute. Find it.
29056        IFS_save="$IFS"
29057        IFS=:
29058        for p in $PATH; do
29059          if test -f "$p/$path" && test -x "$p/$path"; then
29060            new_path="$p/$path"
29061            break
29062          fi
29063        done
29064        IFS="$IFS_save"
29065      else
29066        # This is an absolute path, we can use it without further modifications.
29067        new_path="$path"
29068      fi
29069
29070      if test "x$new_path" = x; then
29071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29072$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29073        has_space=`$ECHO "$complete" | $GREP " "`
29074        if test "x$has_space" != x; then
29075          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29076$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29077        fi
29078        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29079      fi
29080    fi
29081
29082    # Now join together the path and the arguments once again
29083    if test "x$arguments" != xEOL; then
29084      new_complete="$new_path ${arguments% *}"
29085    else
29086      new_complete="$new_path"
29087    fi
29088
29089    if test "x$complete" != "x$new_complete"; then
29090      PROPER_COMPILER_CC="$new_complete"
29091      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29092$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29093    fi
29094  fi
29095
29096    PATH="$RETRY_COMPILER_SAVED_PATH"
29097
29098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29099$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29100
29101  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29102    # Follow a chain of symbolic links. Use readlink
29103    # where it exists, else fall back to horribly
29104    # complicated shell code.
29105    if test "x$READLINK_TESTED" != yes; then
29106      # On MacOSX there is a readlink tool with a different
29107      # purpose than the GNU readlink tool. Check the found readlink.
29108      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29109      if test "x$ISGNU" = x; then
29110        # A readlink that we do not know how to use.
29111        # Are there other non-GNU readlinks out there?
29112        READLINK_TESTED=yes
29113        READLINK=
29114      fi
29115    fi
29116
29117    if test "x$READLINK" != x; then
29118      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29119    else
29120      # Save the current directory for restoring afterwards
29121      STARTDIR=$PWD
29122      COUNTER=0
29123      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29124      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29125      cd $sym_link_dir
29126      # Use -P flag to resolve symlinks in directories.
29127      cd `$THEPWDCMD -P`
29128      sym_link_dir=`$THEPWDCMD -P`
29129      # Resolve file symlinks
29130      while test $COUNTER -lt 20; do
29131        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29132        if test "x$ISLINK" == x; then
29133          # This is not a symbolic link! We are done!
29134          break
29135        fi
29136        # Again resolve directory symlinks since the target of the just found
29137        # link could be in a different directory
29138        cd `$DIRNAME $ISLINK`
29139        sym_link_dir=`$THEPWDCMD -P`
29140        sym_link_file=`$BASENAME $ISLINK`
29141        let COUNTER=COUNTER+1
29142      done
29143      cd $STARTDIR
29144      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29145    fi
29146  fi
29147
29148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29149$as_echo "$PROPER_COMPILER_CC" >&6; }
29150    CC="$PROPER_COMPILER_CC"
29151  else
29152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29153$as_echo "no, keeping CC" >&6; }
29154  fi
29155
29156
29157  COMPILER=$CC
29158  COMPILER_NAME=$COMPILER_NAME
29159
29160  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29161    # cc -V output typically looks like
29162    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29163    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29164    # Check that this is likely to be the Solaris Studio cc.
29165    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29166    if test $? -ne 0; then
29167      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29168      { $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
29169$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29170      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29171$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29172      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29173$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29174      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29175    fi
29176    # Remove usage instructions (if present), and
29177    # collapse compiler output into a single line
29178    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29179        $SED -e 's/ *[Uu]sage:.*//'`
29180    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29181        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29182  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29183    # xlc -qversion output typically looks like
29184    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29185    #     Version: 11.01.0000.0015
29186    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29187    # Check that this is likely to be the IBM XL C compiler.
29188    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29189    if test $? -ne 0; then
29190      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29191      { $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
29192$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29193      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29194$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29195      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29196$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29197      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29198    fi
29199    # Collapse compiler output into a single line
29200    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29201    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29202        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29203  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29204    # There is no specific version flag, but all output starts with a version string.
29205    # First line typically looks something like:
29206    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29207    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29208    # Check that this is likely to be Microsoft CL.EXE.
29209    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29210    if test $? -ne 0; then
29211      { $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
29212$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29213      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29214$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29215      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29216    fi
29217    # Collapse compiler output into a single line
29218    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29219    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29220        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29221  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29222    # gcc --version output typically looks like
29223    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29224    #     Copyright (C) 2013 Free Software Foundation, Inc.
29225    #     This is free software; see the source for copying conditions.  There is NO
29226    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29227    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29228    # Check that this is likely to be GCC.
29229    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29230    if test $? -ne 0; then
29231      { $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
29232$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29233      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29234$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29235      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29236    fi
29237    # Remove Copyright and legalese from version string, and
29238    # collapse into a single line
29239    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29240        $SED -e 's/ *Copyright .*//'`
29241    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29242        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29243  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29244    # clang --version output typically looks like
29245    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29246    #    clang version 3.3 (tags/RELEASE_33/final)
29247    # or
29248    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29249    #    Target: x86_64-pc-linux-gnu
29250    #    Thread model: posix
29251    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29252    # Check that this is likely to be clang
29253    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29254    if test $? -ne 0; then
29255      { $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
29256$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29257      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29258$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29259      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29260    fi
29261    # Collapse compiler output into a single line
29262    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29263    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29264        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29265  else
29266      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29267  fi
29268  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29269  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29270  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29271  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29272
29273  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29274$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29275
29276
29277  # Now that we have resolved CC ourself, let autoconf have its go at it
29278  ac_ext=c
29279ac_cpp='$CPP $CPPFLAGS'
29280ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29281ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29282ac_compiler_gnu=$ac_cv_c_compiler_gnu
29283if test -n "$ac_tool_prefix"; then
29284  for ac_prog in $CC
29285  do
29286    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29287set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29289$as_echo_n "checking for $ac_word... " >&6; }
29290if ${ac_cv_prog_CC+:} false; then :
29291  $as_echo_n "(cached) " >&6
29292else
29293  if test -n "$CC"; then
29294  ac_cv_prog_CC="$CC" # Let the user override the test.
29295else
29296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29297for as_dir in $PATH
29298do
29299  IFS=$as_save_IFS
29300  test -z "$as_dir" && as_dir=.
29301    for ac_exec_ext in '' $ac_executable_extensions; do
29302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29303    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29305    break 2
29306  fi
29307done
29308  done
29309IFS=$as_save_IFS
29310
29311fi
29312fi
29313CC=$ac_cv_prog_CC
29314if test -n "$CC"; then
29315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29316$as_echo "$CC" >&6; }
29317else
29318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29319$as_echo "no" >&6; }
29320fi
29321
29322
29323    test -n "$CC" && break
29324  done
29325fi
29326if test -z "$CC"; then
29327  ac_ct_CC=$CC
29328  for ac_prog in $CC
29329do
29330  # Extract the first word of "$ac_prog", so it can be a program name with args.
29331set dummy $ac_prog; ac_word=$2
29332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29333$as_echo_n "checking for $ac_word... " >&6; }
29334if ${ac_cv_prog_ac_ct_CC+:} false; then :
29335  $as_echo_n "(cached) " >&6
29336else
29337  if test -n "$ac_ct_CC"; then
29338  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29339else
29340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29341for as_dir in $PATH
29342do
29343  IFS=$as_save_IFS
29344  test -z "$as_dir" && as_dir=.
29345    for ac_exec_ext in '' $ac_executable_extensions; do
29346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29347    ac_cv_prog_ac_ct_CC="$ac_prog"
29348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29349    break 2
29350  fi
29351done
29352  done
29353IFS=$as_save_IFS
29354
29355fi
29356fi
29357ac_ct_CC=$ac_cv_prog_ac_ct_CC
29358if test -n "$ac_ct_CC"; then
29359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29360$as_echo "$ac_ct_CC" >&6; }
29361else
29362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29363$as_echo "no" >&6; }
29364fi
29365
29366
29367  test -n "$ac_ct_CC" && break
29368done
29369
29370  if test "x$ac_ct_CC" = x; then
29371    CC=""
29372  else
29373    case $cross_compiling:$ac_tool_warned in
29374yes:)
29375{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29376$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29377ac_tool_warned=yes ;;
29378esac
29379    CC=$ac_ct_CC
29380  fi
29381fi
29382
29383
29384test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29386as_fn_error $? "no acceptable C compiler found in \$PATH
29387See \`config.log' for more details" "$LINENO" 5; }
29388
29389# Provide some information about the compiler.
29390$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29391set X $ac_compile
29392ac_compiler=$2
29393for ac_option in --version -v -V -qversion; do
29394  { { ac_try="$ac_compiler $ac_option >&5"
29395case "(($ac_try" in
29396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29397  *) ac_try_echo=$ac_try;;
29398esac
29399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29400$as_echo "$ac_try_echo"; } >&5
29401  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29402  ac_status=$?
29403  if test -s conftest.err; then
29404    sed '10a\
29405... rest of stderr output deleted ...
29406         10q' conftest.err >conftest.er1
29407    cat conftest.er1 >&5
29408  fi
29409  rm -f conftest.er1 conftest.err
29410  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29411  test $ac_status = 0; }
29412done
29413
29414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29415/* end confdefs.h.  */
29416
29417int
29418main ()
29419{
29420
29421  ;
29422  return 0;
29423}
29424_ACEOF
29425ac_clean_files_save=$ac_clean_files
29426ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29427# Try to create an executable without -o first, disregard a.out.
29428# It will help us diagnose broken compilers, and finding out an intuition
29429# of exeext.
29430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29431$as_echo_n "checking whether the C compiler works... " >&6; }
29432ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29433
29434# The possible output files:
29435ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29436
29437ac_rmfiles=
29438for ac_file in $ac_files
29439do
29440  case $ac_file in
29441    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29442    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29443  esac
29444done
29445rm -f $ac_rmfiles
29446
29447if { { ac_try="$ac_link_default"
29448case "(($ac_try" in
29449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29450  *) ac_try_echo=$ac_try;;
29451esac
29452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29453$as_echo "$ac_try_echo"; } >&5
29454  (eval "$ac_link_default") 2>&5
29455  ac_status=$?
29456  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29457  test $ac_status = 0; }; then :
29458  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29459# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29460# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29461# so that the user can short-circuit this test for compilers unknown to
29462# Autoconf.
29463for ac_file in $ac_files ''
29464do
29465  test -f "$ac_file" || continue
29466  case $ac_file in
29467    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29468	;;
29469    [ab].out )
29470	# We found the default executable, but exeext='' is most
29471	# certainly right.
29472	break;;
29473    *.* )
29474	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29475	then :; else
29476	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29477	fi
29478	# We set ac_cv_exeext here because the later test for it is not
29479	# safe: cross compilers may not add the suffix if given an `-o'
29480	# argument, so we may need to know it at that point already.
29481	# Even if this section looks crufty: it has the advantage of
29482	# actually working.
29483	break;;
29484    * )
29485	break;;
29486  esac
29487done
29488test "$ac_cv_exeext" = no && ac_cv_exeext=
29489
29490else
29491  ac_file=''
29492fi
29493if test -z "$ac_file"; then :
29494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29495$as_echo "no" >&6; }
29496$as_echo "$as_me: failed program was:" >&5
29497sed 's/^/| /' conftest.$ac_ext >&5
29498
29499{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29501as_fn_error 77 "C compiler cannot create executables
29502See \`config.log' for more details" "$LINENO" 5; }
29503else
29504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29505$as_echo "yes" >&6; }
29506fi
29507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29508$as_echo_n "checking for C compiler default output file name... " >&6; }
29509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29510$as_echo "$ac_file" >&6; }
29511ac_exeext=$ac_cv_exeext
29512
29513rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29514ac_clean_files=$ac_clean_files_save
29515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29516$as_echo_n "checking for suffix of executables... " >&6; }
29517if { { ac_try="$ac_link"
29518case "(($ac_try" in
29519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29520  *) ac_try_echo=$ac_try;;
29521esac
29522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29523$as_echo "$ac_try_echo"; } >&5
29524  (eval "$ac_link") 2>&5
29525  ac_status=$?
29526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29527  test $ac_status = 0; }; then :
29528  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29529# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29530# work properly (i.e., refer to `conftest.exe'), while it won't with
29531# `rm'.
29532for ac_file in conftest.exe conftest conftest.*; do
29533  test -f "$ac_file" || continue
29534  case $ac_file in
29535    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29536    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29537	  break;;
29538    * ) break;;
29539  esac
29540done
29541else
29542  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29544as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29545See \`config.log' for more details" "$LINENO" 5; }
29546fi
29547rm -f conftest conftest$ac_cv_exeext
29548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29549$as_echo "$ac_cv_exeext" >&6; }
29550
29551rm -f conftest.$ac_ext
29552EXEEXT=$ac_cv_exeext
29553ac_exeext=$EXEEXT
29554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29555/* end confdefs.h.  */
29556#include <stdio.h>
29557int
29558main ()
29559{
29560FILE *f = fopen ("conftest.out", "w");
29561 return ferror (f) || fclose (f) != 0;
29562
29563  ;
29564  return 0;
29565}
29566_ACEOF
29567ac_clean_files="$ac_clean_files conftest.out"
29568# Check that the compiler produces executables we can run.  If not, either
29569# the compiler is broken, or we cross compile.
29570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29571$as_echo_n "checking whether we are cross compiling... " >&6; }
29572if test "$cross_compiling" != yes; then
29573  { { ac_try="$ac_link"
29574case "(($ac_try" in
29575  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29576  *) ac_try_echo=$ac_try;;
29577esac
29578eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29579$as_echo "$ac_try_echo"; } >&5
29580  (eval "$ac_link") 2>&5
29581  ac_status=$?
29582  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29583  test $ac_status = 0; }
29584  if { ac_try='./conftest$ac_cv_exeext'
29585  { { case "(($ac_try" in
29586  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29587  *) ac_try_echo=$ac_try;;
29588esac
29589eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29590$as_echo "$ac_try_echo"; } >&5
29591  (eval "$ac_try") 2>&5
29592  ac_status=$?
29593  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29594  test $ac_status = 0; }; }; then
29595    cross_compiling=no
29596  else
29597    if test "$cross_compiling" = maybe; then
29598	cross_compiling=yes
29599    else
29600	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29602as_fn_error $? "cannot run C compiled programs.
29603If you meant to cross compile, use \`--host'.
29604See \`config.log' for more details" "$LINENO" 5; }
29605    fi
29606  fi
29607fi
29608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29609$as_echo "$cross_compiling" >&6; }
29610
29611rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29612ac_clean_files=$ac_clean_files_save
29613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29614$as_echo_n "checking for suffix of object files... " >&6; }
29615if ${ac_cv_objext+:} false; then :
29616  $as_echo_n "(cached) " >&6
29617else
29618  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29619/* end confdefs.h.  */
29620
29621int
29622main ()
29623{
29624
29625  ;
29626  return 0;
29627}
29628_ACEOF
29629rm -f conftest.o conftest.obj
29630if { { ac_try="$ac_compile"
29631case "(($ac_try" in
29632  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29633  *) ac_try_echo=$ac_try;;
29634esac
29635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29636$as_echo "$ac_try_echo"; } >&5
29637  (eval "$ac_compile") 2>&5
29638  ac_status=$?
29639  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29640  test $ac_status = 0; }; then :
29641  for ac_file in conftest.o conftest.obj conftest.*; do
29642  test -f "$ac_file" || continue;
29643  case $ac_file in
29644    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29645    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29646       break;;
29647  esac
29648done
29649else
29650  $as_echo "$as_me: failed program was:" >&5
29651sed 's/^/| /' conftest.$ac_ext >&5
29652
29653{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29655as_fn_error $? "cannot compute suffix of object files: cannot compile
29656See \`config.log' for more details" "$LINENO" 5; }
29657fi
29658rm -f conftest.$ac_cv_objext conftest.$ac_ext
29659fi
29660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29661$as_echo "$ac_cv_objext" >&6; }
29662OBJEXT=$ac_cv_objext
29663ac_objext=$OBJEXT
29664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29665$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29666if ${ac_cv_c_compiler_gnu+:} false; then :
29667  $as_echo_n "(cached) " >&6
29668else
29669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29670/* end confdefs.h.  */
29671
29672int
29673main ()
29674{
29675#ifndef __GNUC__
29676       choke me
29677#endif
29678
29679  ;
29680  return 0;
29681}
29682_ACEOF
29683if ac_fn_c_try_compile "$LINENO"; then :
29684  ac_compiler_gnu=yes
29685else
29686  ac_compiler_gnu=no
29687fi
29688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29689ac_cv_c_compiler_gnu=$ac_compiler_gnu
29690
29691fi
29692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29693$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29694if test $ac_compiler_gnu = yes; then
29695  GCC=yes
29696else
29697  GCC=
29698fi
29699ac_test_CFLAGS=${CFLAGS+set}
29700ac_save_CFLAGS=$CFLAGS
29701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29702$as_echo_n "checking whether $CC accepts -g... " >&6; }
29703if ${ac_cv_prog_cc_g+:} false; then :
29704  $as_echo_n "(cached) " >&6
29705else
29706  ac_save_c_werror_flag=$ac_c_werror_flag
29707   ac_c_werror_flag=yes
29708   ac_cv_prog_cc_g=no
29709   CFLAGS="-g"
29710   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29711/* end confdefs.h.  */
29712
29713int
29714main ()
29715{
29716
29717  ;
29718  return 0;
29719}
29720_ACEOF
29721if ac_fn_c_try_compile "$LINENO"; then :
29722  ac_cv_prog_cc_g=yes
29723else
29724  CFLAGS=""
29725      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29726/* end confdefs.h.  */
29727
29728int
29729main ()
29730{
29731
29732  ;
29733  return 0;
29734}
29735_ACEOF
29736if ac_fn_c_try_compile "$LINENO"; then :
29737
29738else
29739  ac_c_werror_flag=$ac_save_c_werror_flag
29740	 CFLAGS="-g"
29741	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29742/* end confdefs.h.  */
29743
29744int
29745main ()
29746{
29747
29748  ;
29749  return 0;
29750}
29751_ACEOF
29752if ac_fn_c_try_compile "$LINENO"; then :
29753  ac_cv_prog_cc_g=yes
29754fi
29755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29756fi
29757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29758fi
29759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29760   ac_c_werror_flag=$ac_save_c_werror_flag
29761fi
29762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29763$as_echo "$ac_cv_prog_cc_g" >&6; }
29764if test "$ac_test_CFLAGS" = set; then
29765  CFLAGS=$ac_save_CFLAGS
29766elif test $ac_cv_prog_cc_g = yes; then
29767  if test "$GCC" = yes; then
29768    CFLAGS="-g -O2"
29769  else
29770    CFLAGS="-g"
29771  fi
29772else
29773  if test "$GCC" = yes; then
29774    CFLAGS="-O2"
29775  else
29776    CFLAGS=
29777  fi
29778fi
29779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29780$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29781if ${ac_cv_prog_cc_c89+:} false; then :
29782  $as_echo_n "(cached) " >&6
29783else
29784  ac_cv_prog_cc_c89=no
29785ac_save_CC=$CC
29786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29787/* end confdefs.h.  */
29788#include <stdarg.h>
29789#include <stdio.h>
29790struct stat;
29791/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29792struct buf { int x; };
29793FILE * (*rcsopen) (struct buf *, struct stat *, int);
29794static char *e (p, i)
29795     char **p;
29796     int i;
29797{
29798  return p[i];
29799}
29800static char *f (char * (*g) (char **, int), char **p, ...)
29801{
29802  char *s;
29803  va_list v;
29804  va_start (v,p);
29805  s = g (p, va_arg (v,int));
29806  va_end (v);
29807  return s;
29808}
29809
29810/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29811   function prototypes and stuff, but not '\xHH' hex character constants.
29812   These don't provoke an error unfortunately, instead are silently treated
29813   as 'x'.  The following induces an error, until -std is added to get
29814   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29815   array size at least.  It's necessary to write '\x00'==0 to get something
29816   that's true only with -std.  */
29817int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29818
29819/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29820   inside strings and character constants.  */
29821#define FOO(x) 'x'
29822int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29823
29824int test (int i, double x);
29825struct s1 {int (*f) (int a);};
29826struct s2 {int (*f) (double a);};
29827int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29828int argc;
29829char **argv;
29830int
29831main ()
29832{
29833return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29834  ;
29835  return 0;
29836}
29837_ACEOF
29838for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29839	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29840do
29841  CC="$ac_save_CC $ac_arg"
29842  if ac_fn_c_try_compile "$LINENO"; then :
29843  ac_cv_prog_cc_c89=$ac_arg
29844fi
29845rm -f core conftest.err conftest.$ac_objext
29846  test "x$ac_cv_prog_cc_c89" != "xno" && break
29847done
29848rm -f conftest.$ac_ext
29849CC=$ac_save_CC
29850
29851fi
29852# AC_CACHE_VAL
29853case "x$ac_cv_prog_cc_c89" in
29854  x)
29855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29856$as_echo "none needed" >&6; } ;;
29857  xno)
29858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29859$as_echo "unsupported" >&6; } ;;
29860  *)
29861    CC="$CC $ac_cv_prog_cc_c89"
29862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29863$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29864esac
29865if test "x$ac_cv_prog_cc_c89" != xno; then :
29866
29867fi
29868
29869ac_ext=cpp
29870ac_cpp='$CXXCPP $CPPFLAGS'
29871ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29872ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29873ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29874
29875
29876
29877  COMPILER_NAME=C++
29878  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29879
29880  if test "x$CXX" != x; then
29881    # User has supplied compiler name already, always let that override.
29882    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29883$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29884    if test "x`basename $CXX`" = "x$CXX"; then
29885      # A command without a complete path is provided, search $PATH.
29886
29887      for ac_prog in $CXX
29888do
29889  # Extract the first word of "$ac_prog", so it can be a program name with args.
29890set dummy $ac_prog; ac_word=$2
29891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29892$as_echo_n "checking for $ac_word... " >&6; }
29893if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29894  $as_echo_n "(cached) " >&6
29895else
29896  case $POTENTIAL_CXX in
29897  [\\/]* | ?:[\\/]*)
29898  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29899  ;;
29900  *)
29901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29902for as_dir in $PATH
29903do
29904  IFS=$as_save_IFS
29905  test -z "$as_dir" && as_dir=.
29906    for ac_exec_ext in '' $ac_executable_extensions; do
29907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29908    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29910    break 2
29911  fi
29912done
29913  done
29914IFS=$as_save_IFS
29915
29916  ;;
29917esac
29918fi
29919POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29920if test -n "$POTENTIAL_CXX"; then
29921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29922$as_echo "$POTENTIAL_CXX" >&6; }
29923else
29924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29925$as_echo "no" >&6; }
29926fi
29927
29928
29929  test -n "$POTENTIAL_CXX" && break
29930done
29931
29932      if test "x$POTENTIAL_CXX" != x; then
29933        CXX=$POTENTIAL_CXX
29934      else
29935        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29936      fi
29937    else
29938      # Otherwise it might already be a complete path
29939      if test ! -x "$CXX"; then
29940        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29941      fi
29942    fi
29943  else
29944    # No user supplied value. Locate compiler ourselves.
29945
29946    # If we are cross compiling, assume cross compilation tools follows the
29947    # cross compilation standard where they are prefixed with the autoconf
29948    # standard name for the target. For example the binary
29949    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29950    # If we are not cross compiling, then the default compiler name will be
29951    # used.
29952
29953    CXX=
29954    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29955    # before checking the rest of the PATH.
29956    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29957    # step, this should not be necessary.
29958    if test -n "$TOOLCHAIN_PATH"; then
29959      PATH_save="$PATH"
29960      PATH="$TOOLCHAIN_PATH"
29961      for ac_prog in $SEARCH_LIST
29962do
29963  # Extract the first word of "$ac_prog", so it can be a program name with args.
29964set dummy $ac_prog; ac_word=$2
29965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29966$as_echo_n "checking for $ac_word... " >&6; }
29967if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29968  $as_echo_n "(cached) " >&6
29969else
29970  case $TOOLCHAIN_PATH_CXX in
29971  [\\/]* | ?:[\\/]*)
29972  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29973  ;;
29974  *)
29975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29976for as_dir in $PATH
29977do
29978  IFS=$as_save_IFS
29979  test -z "$as_dir" && as_dir=.
29980    for ac_exec_ext in '' $ac_executable_extensions; do
29981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29982    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29984    break 2
29985  fi
29986done
29987  done
29988IFS=$as_save_IFS
29989
29990  ;;
29991esac
29992fi
29993TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29994if test -n "$TOOLCHAIN_PATH_CXX"; then
29995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29996$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29997else
29998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29999$as_echo "no" >&6; }
30000fi
30001
30002
30003  test -n "$TOOLCHAIN_PATH_CXX" && break
30004done
30005
30006      CXX=$TOOLCHAIN_PATH_CXX
30007      PATH="$PATH_save"
30008    fi
30009
30010    # AC_PATH_PROGS can't be run multiple times with the same variable,
30011    # so create a new name for this run.
30012    if test "x$CXX" = x; then
30013      for ac_prog in $SEARCH_LIST
30014do
30015  # Extract the first word of "$ac_prog", so it can be a program name with args.
30016set dummy $ac_prog; ac_word=$2
30017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30018$as_echo_n "checking for $ac_word... " >&6; }
30019if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30020  $as_echo_n "(cached) " >&6
30021else
30022  case $POTENTIAL_CXX in
30023  [\\/]* | ?:[\\/]*)
30024  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30025  ;;
30026  *)
30027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30028for as_dir in $PATH
30029do
30030  IFS=$as_save_IFS
30031  test -z "$as_dir" && as_dir=.
30032    for ac_exec_ext in '' $ac_executable_extensions; do
30033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30034    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30036    break 2
30037  fi
30038done
30039  done
30040IFS=$as_save_IFS
30041
30042  ;;
30043esac
30044fi
30045POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30046if test -n "$POTENTIAL_CXX"; then
30047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30048$as_echo "$POTENTIAL_CXX" >&6; }
30049else
30050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30051$as_echo "no" >&6; }
30052fi
30053
30054
30055  test -n "$POTENTIAL_CXX" && break
30056done
30057
30058      CXX=$POTENTIAL_CXX
30059    fi
30060
30061    if test "x$CXX" = x; then
30062
30063  # Print a helpful message on how to acquire the necessary build dependency.
30064  # devkit is the help tag: freetype, cups, pulse, alsa etc
30065  MISSING_DEPENDENCY=devkit
30066
30067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30068    cygwin_help $MISSING_DEPENDENCY
30069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30070    msys_help $MISSING_DEPENDENCY
30071  else
30072    PKGHANDLER_COMMAND=
30073
30074    case $PKGHANDLER in
30075      apt-get)
30076        apt_help     $MISSING_DEPENDENCY ;;
30077      yum)
30078        yum_help     $MISSING_DEPENDENCY ;;
30079      port)
30080        port_help    $MISSING_DEPENDENCY ;;
30081      pkgutil)
30082        pkgutil_help $MISSING_DEPENDENCY ;;
30083      pkgadd)
30084        pkgadd_help  $MISSING_DEPENDENCY ;;
30085    esac
30086
30087    if test "x$PKGHANDLER_COMMAND" != x; then
30088      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30089    fi
30090  fi
30091
30092      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30093    fi
30094  fi
30095
30096  # Now we have a compiler binary in CXX. Make sure it's okay.
30097
30098  # Only process if variable expands to non-empty
30099
30100  if test "x$CXX" != x; then
30101    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30102
30103  # First separate the path from the arguments. This will split at the first
30104  # space.
30105  complete="$CXX"
30106  path="${complete%% *}"
30107  tmp="$complete EOL"
30108  arguments="${tmp#* }"
30109
30110  # Input might be given as Windows format, start by converting to
30111  # unix format.
30112  new_path=`$CYGPATH -u "$path"`
30113
30114  # Now try to locate executable using which
30115  new_path=`$WHICH "$new_path" 2> /dev/null`
30116  # bat and cmd files are not always considered executable in cygwin causing which
30117  # to not find them
30118  if test "x$new_path" = x \
30119      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30120      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30121    new_path=`$CYGPATH -u "$path"`
30122  fi
30123  if test "x$new_path" = x; then
30124    # Oops. Which didn't find the executable.
30125    # The splitting of arguments from the executable at a space might have been incorrect,
30126    # since paths with space are more likely in Windows. Give it another try with the whole
30127    # argument.
30128    path="$complete"
30129    arguments="EOL"
30130    new_path=`$CYGPATH -u "$path"`
30131    new_path=`$WHICH "$new_path" 2> /dev/null`
30132    # bat and cmd files are not always considered executable in cygwin causing which
30133    # to not find them
30134    if test "x$new_path" = x \
30135        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30136        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30137      new_path=`$CYGPATH -u "$path"`
30138    fi
30139    if test "x$new_path" = x; then
30140      # It's still not found. Now this is an unrecoverable error.
30141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30142$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30143      has_space=`$ECHO "$complete" | $GREP " "`
30144      if test "x$has_space" != x; then
30145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30147      fi
30148      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30149    fi
30150  fi
30151
30152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30155  # "foo.exe" is OK but "foo" is an error.
30156  #
30157  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30158  # It is also a way to make sure we got the proper file name for the real test later on.
30159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30160  if test "x$test_shortpath" = x; then
30161    # Short path failed, file does not exist as specified.
30162    # Try adding .exe or .cmd
30163    if test -f "${new_path}.exe"; then
30164      input_to_shortpath="${new_path}.exe"
30165    elif test -f "${new_path}.cmd"; then
30166      input_to_shortpath="${new_path}.cmd"
30167    else
30168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30169$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30170      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30171$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30172      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30173    fi
30174  else
30175    input_to_shortpath="$new_path"
30176  fi
30177
30178  # Call helper function which possibly converts this using DOS-style short mode.
30179  # If so, the updated path is stored in $new_path.
30180  new_path="$input_to_shortpath"
30181
30182  input_path="$input_to_shortpath"
30183  # Check if we need to convert this using DOS-style short mode. If the path
30184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30185  # take no chances and rewrite it.
30186  # Note: m4 eats our [], so we need to use [ and ] instead.
30187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30188  if test "x$has_forbidden_chars" != x; then
30189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30193      # Going to short mode and back again did indeed matter. Since short mode is
30194      # case insensitive, let's make it lowercase to improve readability.
30195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30196      # Now convert it back to Unix-style (cygpath)
30197      input_path=`$CYGPATH -u "$shortmode_path"`
30198      new_path="$input_path"
30199    fi
30200  fi
30201
30202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30203  if test "x$test_cygdrive_prefix" = x; then
30204    # As a simple fix, exclude /usr/bin since it's not a real path.
30205    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30207      # a path prefixed by /cygdrive for fixpath to work.
30208      new_path="$CYGWIN_ROOT_PATH$input_path"
30209    fi
30210  fi
30211
30212  # remove trailing .exe if any
30213  new_path="${new_path/%.exe/}"
30214
30215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30216
30217  # First separate the path from the arguments. This will split at the first
30218  # space.
30219  complete="$CXX"
30220  path="${complete%% *}"
30221  tmp="$complete EOL"
30222  arguments="${tmp#* }"
30223
30224  # Input might be given as Windows format, start by converting to
30225  # unix format.
30226  new_path="$path"
30227
30228  windows_path="$new_path"
30229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30230    unix_path=`$CYGPATH -u "$windows_path"`
30231    new_path="$unix_path"
30232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30234    new_path="$unix_path"
30235  fi
30236
30237
30238  # Now try to locate executable using which
30239  new_path=`$WHICH "$new_path" 2> /dev/null`
30240
30241  if test "x$new_path" = x; then
30242    # Oops. Which didn't find the executable.
30243    # The splitting of arguments from the executable at a space might have been incorrect,
30244    # since paths with space are more likely in Windows. Give it another try with the whole
30245    # argument.
30246    path="$complete"
30247    arguments="EOL"
30248    new_path="$path"
30249
30250  windows_path="$new_path"
30251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30252    unix_path=`$CYGPATH -u "$windows_path"`
30253    new_path="$unix_path"
30254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30256    new_path="$unix_path"
30257  fi
30258
30259
30260    new_path=`$WHICH "$new_path" 2> /dev/null`
30261    # bat and cmd files are not always considered executable in MSYS causing which
30262    # to not find them
30263    if test "x$new_path" = x \
30264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30266      new_path="$path"
30267
30268  windows_path="$new_path"
30269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30270    unix_path=`$CYGPATH -u "$windows_path"`
30271    new_path="$unix_path"
30272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30274    new_path="$unix_path"
30275  fi
30276
30277    fi
30278
30279    if test "x$new_path" = x; then
30280      # It's still not found. Now this is an unrecoverable error.
30281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30282$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30283      has_space=`$ECHO "$complete" | $GREP " "`
30284      if test "x$has_space" != x; then
30285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30287      fi
30288      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30289    fi
30290  fi
30291
30292  # Now new_path has a complete unix path to the binary
30293  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30294    # Keep paths in /bin as-is, but remove trailing .exe if any
30295    new_path="${new_path/%.exe/}"
30296    # Do not save /bin paths to all_fixpath_prefixes!
30297  else
30298    # Not in mixed or Windows style, start by that.
30299    new_path=`cmd //c echo $new_path`
30300
30301  input_path="$new_path"
30302  # Check if we need to convert this using DOS-style short mode. If the path
30303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30304  # take no chances and rewrite it.
30305  # Note: m4 eats our [], so we need to use [ and ] instead.
30306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30307  if test "x$has_forbidden_chars" != x; then
30308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30310  fi
30311
30312    # Output is in $new_path
30313
30314  windows_path="$new_path"
30315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30316    unix_path=`$CYGPATH -u "$windows_path"`
30317    new_path="$unix_path"
30318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30320    new_path="$unix_path"
30321  fi
30322
30323    # remove trailing .exe if any
30324    new_path="${new_path/%.exe/}"
30325
30326    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30327    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30328  fi
30329
30330    else
30331      # We're on a unix platform. Hooray! :)
30332      # First separate the path from the arguments. This will split at the first
30333      # space.
30334      complete="$CXX"
30335      path="${complete%% *}"
30336      tmp="$complete EOL"
30337      arguments="${tmp#* }"
30338
30339      # Cannot rely on the command "which" here since it doesn't always work.
30340      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30341      if test -z "$is_absolute_path"; then
30342        # Path to executable is not absolute. Find it.
30343        IFS_save="$IFS"
30344        IFS=:
30345        for p in $PATH; do
30346          if test -f "$p/$path" && test -x "$p/$path"; then
30347            new_path="$p/$path"
30348            break
30349          fi
30350        done
30351        IFS="$IFS_save"
30352      else
30353        # This is an absolute path, we can use it without further modifications.
30354        new_path="$path"
30355      fi
30356
30357      if test "x$new_path" = x; then
30358        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30359$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30360        has_space=`$ECHO "$complete" | $GREP " "`
30361        if test "x$has_space" != x; then
30362          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30363$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30364        fi
30365        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30366      fi
30367    fi
30368
30369    # Now join together the path and the arguments once again
30370    if test "x$arguments" != xEOL; then
30371      new_complete="$new_path ${arguments% *}"
30372    else
30373      new_complete="$new_path"
30374    fi
30375
30376    if test "x$complete" != "x$new_complete"; then
30377      CXX="$new_complete"
30378      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30379$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30380    fi
30381  fi
30382
30383  TEST_COMPILER="$CXX"
30384  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30385  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30386  if test "x$OPENJDK_BUILD_OS" != xaix; then
30387    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30389$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30390
30391  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30392    # Follow a chain of symbolic links. Use readlink
30393    # where it exists, else fall back to horribly
30394    # complicated shell code.
30395    if test "x$READLINK_TESTED" != yes; then
30396      # On MacOSX there is a readlink tool with a different
30397      # purpose than the GNU readlink tool. Check the found readlink.
30398      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30399      if test "x$ISGNU" = x; then
30400        # A readlink that we do not know how to use.
30401        # Are there other non-GNU readlinks out there?
30402        READLINK_TESTED=yes
30403        READLINK=
30404      fi
30405    fi
30406
30407    if test "x$READLINK" != x; then
30408      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30409    else
30410      # Save the current directory for restoring afterwards
30411      STARTDIR=$PWD
30412      COUNTER=0
30413      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30414      sym_link_file=`$BASENAME $TEST_COMPILER`
30415      cd $sym_link_dir
30416      # Use -P flag to resolve symlinks in directories.
30417      cd `$THEPWDCMD -P`
30418      sym_link_dir=`$THEPWDCMD -P`
30419      # Resolve file symlinks
30420      while test $COUNTER -lt 20; do
30421        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30422        if test "x$ISLINK" == x; then
30423          # This is not a symbolic link! We are done!
30424          break
30425        fi
30426        # Again resolve directory symlinks since the target of the just found
30427        # link could be in a different directory
30428        cd `$DIRNAME $ISLINK`
30429        sym_link_dir=`$THEPWDCMD -P`
30430        sym_link_file=`$BASENAME $ISLINK`
30431        let COUNTER=COUNTER+1
30432      done
30433      cd $STARTDIR
30434      TEST_COMPILER=$sym_link_dir/$sym_link_file
30435    fi
30436  fi
30437
30438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30439$as_echo "$TEST_COMPILER" >&6; }
30440  fi
30441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30442$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30443
30444  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30445  if test "x$COMPILER_BASENAME" = "xccache"; then
30446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30447$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30448    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30449    # We want to control ccache invocation ourselves, so ignore this cc and try
30450    # searching again.
30451
30452    # Remove the path to the fake ccache cc from the PATH
30453    RETRY_COMPILER_SAVED_PATH="$PATH"
30454    COMPILER_DIRNAME=`$DIRNAME $CXX`
30455    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30456
30457    # Try again looking for our compiler
30458    if test -n "$ac_tool_prefix"; then
30459  for ac_prog in $TOOLCHAIN_CXX_BINARY
30460  do
30461    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30462set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30464$as_echo_n "checking for $ac_word... " >&6; }
30465if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30466  $as_echo_n "(cached) " >&6
30467else
30468  if test -n "$PROPER_COMPILER_CXX"; then
30469  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30470else
30471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30472for as_dir in $PATH
30473do
30474  IFS=$as_save_IFS
30475  test -z "$as_dir" && as_dir=.
30476    for ac_exec_ext in '' $ac_executable_extensions; do
30477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30478    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30480    break 2
30481  fi
30482done
30483  done
30484IFS=$as_save_IFS
30485
30486fi
30487fi
30488PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30489if test -n "$PROPER_COMPILER_CXX"; then
30490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30491$as_echo "$PROPER_COMPILER_CXX" >&6; }
30492else
30493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30494$as_echo "no" >&6; }
30495fi
30496
30497
30498    test -n "$PROPER_COMPILER_CXX" && break
30499  done
30500fi
30501if test -z "$PROPER_COMPILER_CXX"; then
30502  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30503  for ac_prog in $TOOLCHAIN_CXX_BINARY
30504do
30505  # Extract the first word of "$ac_prog", so it can be a program name with args.
30506set dummy $ac_prog; ac_word=$2
30507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30508$as_echo_n "checking for $ac_word... " >&6; }
30509if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30510  $as_echo_n "(cached) " >&6
30511else
30512  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30513  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30514else
30515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30516for as_dir in $PATH
30517do
30518  IFS=$as_save_IFS
30519  test -z "$as_dir" && as_dir=.
30520    for ac_exec_ext in '' $ac_executable_extensions; do
30521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30522    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30524    break 2
30525  fi
30526done
30527  done
30528IFS=$as_save_IFS
30529
30530fi
30531fi
30532ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30533if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30535$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30536else
30537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30538$as_echo "no" >&6; }
30539fi
30540
30541
30542  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30543done
30544
30545  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30546    PROPER_COMPILER_CXX=""
30547  else
30548    case $cross_compiling:$ac_tool_warned in
30549yes:)
30550{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30551$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30552ac_tool_warned=yes ;;
30553esac
30554    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30555  fi
30556fi
30557
30558
30559  # Only process if variable expands to non-empty
30560
30561  if test "x$PROPER_COMPILER_CXX" != x; then
30562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30563
30564  # First separate the path from the arguments. This will split at the first
30565  # space.
30566  complete="$PROPER_COMPILER_CXX"
30567  path="${complete%% *}"
30568  tmp="$complete EOL"
30569  arguments="${tmp#* }"
30570
30571  # Input might be given as Windows format, start by converting to
30572  # unix format.
30573  new_path=`$CYGPATH -u "$path"`
30574
30575  # Now try to locate executable using which
30576  new_path=`$WHICH "$new_path" 2> /dev/null`
30577  # bat and cmd files are not always considered executable in cygwin causing which
30578  # to not find them
30579  if test "x$new_path" = x \
30580      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30581      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30582    new_path=`$CYGPATH -u "$path"`
30583  fi
30584  if test "x$new_path" = x; then
30585    # Oops. Which didn't find the executable.
30586    # The splitting of arguments from the executable at a space might have been incorrect,
30587    # since paths with space are more likely in Windows. Give it another try with the whole
30588    # argument.
30589    path="$complete"
30590    arguments="EOL"
30591    new_path=`$CYGPATH -u "$path"`
30592    new_path=`$WHICH "$new_path" 2> /dev/null`
30593    # bat and cmd files are not always considered executable in cygwin causing which
30594    # to not find them
30595    if test "x$new_path" = x \
30596        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30597        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30598      new_path=`$CYGPATH -u "$path"`
30599    fi
30600    if test "x$new_path" = x; then
30601      # It's still not found. Now this is an unrecoverable error.
30602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30603$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30604      has_space=`$ECHO "$complete" | $GREP " "`
30605      if test "x$has_space" != x; then
30606        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30607$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30608      fi
30609      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30610    fi
30611  fi
30612
30613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30616  # "foo.exe" is OK but "foo" is an error.
30617  #
30618  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30619  # It is also a way to make sure we got the proper file name for the real test later on.
30620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30621  if test "x$test_shortpath" = x; then
30622    # Short path failed, file does not exist as specified.
30623    # Try adding .exe or .cmd
30624    if test -f "${new_path}.exe"; then
30625      input_to_shortpath="${new_path}.exe"
30626    elif test -f "${new_path}.cmd"; then
30627      input_to_shortpath="${new_path}.cmd"
30628    else
30629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30630$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30631      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30632$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30633      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30634    fi
30635  else
30636    input_to_shortpath="$new_path"
30637  fi
30638
30639  # Call helper function which possibly converts this using DOS-style short mode.
30640  # If so, the updated path is stored in $new_path.
30641  new_path="$input_to_shortpath"
30642
30643  input_path="$input_to_shortpath"
30644  # Check if we need to convert this using DOS-style short mode. If the path
30645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30646  # take no chances and rewrite it.
30647  # Note: m4 eats our [], so we need to use [ and ] instead.
30648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30649  if test "x$has_forbidden_chars" != x; then
30650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30654      # Going to short mode and back again did indeed matter. Since short mode is
30655      # case insensitive, let's make it lowercase to improve readability.
30656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30657      # Now convert it back to Unix-style (cygpath)
30658      input_path=`$CYGPATH -u "$shortmode_path"`
30659      new_path="$input_path"
30660    fi
30661  fi
30662
30663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30664  if test "x$test_cygdrive_prefix" = x; then
30665    # As a simple fix, exclude /usr/bin since it's not a real path.
30666    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30668      # a path prefixed by /cygdrive for fixpath to work.
30669      new_path="$CYGWIN_ROOT_PATH$input_path"
30670    fi
30671  fi
30672
30673  # remove trailing .exe if any
30674  new_path="${new_path/%.exe/}"
30675
30676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30677
30678  # First separate the path from the arguments. This will split at the first
30679  # space.
30680  complete="$PROPER_COMPILER_CXX"
30681  path="${complete%% *}"
30682  tmp="$complete EOL"
30683  arguments="${tmp#* }"
30684
30685  # Input might be given as Windows format, start by converting to
30686  # unix format.
30687  new_path="$path"
30688
30689  windows_path="$new_path"
30690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30691    unix_path=`$CYGPATH -u "$windows_path"`
30692    new_path="$unix_path"
30693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30695    new_path="$unix_path"
30696  fi
30697
30698
30699  # Now try to locate executable using which
30700  new_path=`$WHICH "$new_path" 2> /dev/null`
30701
30702  if test "x$new_path" = x; then
30703    # Oops. Which didn't find the executable.
30704    # The splitting of arguments from the executable at a space might have been incorrect,
30705    # since paths with space are more likely in Windows. Give it another try with the whole
30706    # argument.
30707    path="$complete"
30708    arguments="EOL"
30709    new_path="$path"
30710
30711  windows_path="$new_path"
30712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30713    unix_path=`$CYGPATH -u "$windows_path"`
30714    new_path="$unix_path"
30715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30717    new_path="$unix_path"
30718  fi
30719
30720
30721    new_path=`$WHICH "$new_path" 2> /dev/null`
30722    # bat and cmd files are not always considered executable in MSYS causing which
30723    # to not find them
30724    if test "x$new_path" = x \
30725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30727      new_path="$path"
30728
30729  windows_path="$new_path"
30730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30731    unix_path=`$CYGPATH -u "$windows_path"`
30732    new_path="$unix_path"
30733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30735    new_path="$unix_path"
30736  fi
30737
30738    fi
30739
30740    if test "x$new_path" = x; then
30741      # It's still not found. Now this is an unrecoverable error.
30742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30743$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30744      has_space=`$ECHO "$complete" | $GREP " "`
30745      if test "x$has_space" != x; then
30746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30748      fi
30749      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30750    fi
30751  fi
30752
30753  # Now new_path has a complete unix path to the binary
30754  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30755    # Keep paths in /bin as-is, but remove trailing .exe if any
30756    new_path="${new_path/%.exe/}"
30757    # Do not save /bin paths to all_fixpath_prefixes!
30758  else
30759    # Not in mixed or Windows style, start by that.
30760    new_path=`cmd //c echo $new_path`
30761
30762  input_path="$new_path"
30763  # Check if we need to convert this using DOS-style short mode. If the path
30764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30765  # take no chances and rewrite it.
30766  # Note: m4 eats our [], so we need to use [ and ] instead.
30767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30768  if test "x$has_forbidden_chars" != x; then
30769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30771  fi
30772
30773    # Output is in $new_path
30774
30775  windows_path="$new_path"
30776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30777    unix_path=`$CYGPATH -u "$windows_path"`
30778    new_path="$unix_path"
30779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30781    new_path="$unix_path"
30782  fi
30783
30784    # remove trailing .exe if any
30785    new_path="${new_path/%.exe/}"
30786
30787    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30788    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30789  fi
30790
30791    else
30792      # We're on a unix platform. Hooray! :)
30793      # First separate the path from the arguments. This will split at the first
30794      # space.
30795      complete="$PROPER_COMPILER_CXX"
30796      path="${complete%% *}"
30797      tmp="$complete EOL"
30798      arguments="${tmp#* }"
30799
30800      # Cannot rely on the command "which" here since it doesn't always work.
30801      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30802      if test -z "$is_absolute_path"; then
30803        # Path to executable is not absolute. Find it.
30804        IFS_save="$IFS"
30805        IFS=:
30806        for p in $PATH; do
30807          if test -f "$p/$path" && test -x "$p/$path"; then
30808            new_path="$p/$path"
30809            break
30810          fi
30811        done
30812        IFS="$IFS_save"
30813      else
30814        # This is an absolute path, we can use it without further modifications.
30815        new_path="$path"
30816      fi
30817
30818      if test "x$new_path" = x; then
30819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30820$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30821        has_space=`$ECHO "$complete" | $GREP " "`
30822        if test "x$has_space" != x; then
30823          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30824$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30825        fi
30826        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30827      fi
30828    fi
30829
30830    # Now join together the path and the arguments once again
30831    if test "x$arguments" != xEOL; then
30832      new_complete="$new_path ${arguments% *}"
30833    else
30834      new_complete="$new_path"
30835    fi
30836
30837    if test "x$complete" != "x$new_complete"; then
30838      PROPER_COMPILER_CXX="$new_complete"
30839      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30840$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30841    fi
30842  fi
30843
30844    PATH="$RETRY_COMPILER_SAVED_PATH"
30845
30846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30847$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30848
30849  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30850    # Follow a chain of symbolic links. Use readlink
30851    # where it exists, else fall back to horribly
30852    # complicated shell code.
30853    if test "x$READLINK_TESTED" != yes; then
30854      # On MacOSX there is a readlink tool with a different
30855      # purpose than the GNU readlink tool. Check the found readlink.
30856      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30857      if test "x$ISGNU" = x; then
30858        # A readlink that we do not know how to use.
30859        # Are there other non-GNU readlinks out there?
30860        READLINK_TESTED=yes
30861        READLINK=
30862      fi
30863    fi
30864
30865    if test "x$READLINK" != x; then
30866      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30867    else
30868      # Save the current directory for restoring afterwards
30869      STARTDIR=$PWD
30870      COUNTER=0
30871      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30872      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30873      cd $sym_link_dir
30874      # Use -P flag to resolve symlinks in directories.
30875      cd `$THEPWDCMD -P`
30876      sym_link_dir=`$THEPWDCMD -P`
30877      # Resolve file symlinks
30878      while test $COUNTER -lt 20; do
30879        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30880        if test "x$ISLINK" == x; then
30881          # This is not a symbolic link! We are done!
30882          break
30883        fi
30884        # Again resolve directory symlinks since the target of the just found
30885        # link could be in a different directory
30886        cd `$DIRNAME $ISLINK`
30887        sym_link_dir=`$THEPWDCMD -P`
30888        sym_link_file=`$BASENAME $ISLINK`
30889        let COUNTER=COUNTER+1
30890      done
30891      cd $STARTDIR
30892      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30893    fi
30894  fi
30895
30896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30897$as_echo "$PROPER_COMPILER_CXX" >&6; }
30898    CXX="$PROPER_COMPILER_CXX"
30899  else
30900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30901$as_echo "no, keeping CXX" >&6; }
30902  fi
30903
30904
30905  COMPILER=$CXX
30906  COMPILER_NAME=$COMPILER_NAME
30907
30908  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30909    # cc -V output typically looks like
30910    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30911    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30912    # Check that this is likely to be the Solaris Studio cc.
30913    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30914    if test $? -ne 0; then
30915      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30916      { $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
30917$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30918      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30919$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30921$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30922      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30923    fi
30924    # Remove usage instructions (if present), and
30925    # collapse compiler output into a single line
30926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30927        $SED -e 's/ *[Uu]sage:.*//'`
30928    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30929        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30930  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30931    # xlc -qversion output typically looks like
30932    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30933    #     Version: 11.01.0000.0015
30934    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30935    # Check that this is likely to be the IBM XL C compiler.
30936    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30937    if test $? -ne 0; then
30938      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30939      { $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
30940$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30941      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30942$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30943      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30944$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30945      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30946    fi
30947    # Collapse compiler output into a single line
30948    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30949    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30950        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30951  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30952    # There is no specific version flag, but all output starts with a version string.
30953    # First line typically looks something like:
30954    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30955    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30956    # Check that this is likely to be Microsoft CL.EXE.
30957    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30958    if test $? -ne 0; then
30959      { $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
30960$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30961      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30962$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30963      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30964    fi
30965    # Collapse compiler output into a single line
30966    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30968        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30969  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30970    # gcc --version output typically looks like
30971    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30972    #     Copyright (C) 2013 Free Software Foundation, Inc.
30973    #     This is free software; see the source for copying conditions.  There is NO
30974    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30975    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30976    # Check that this is likely to be GCC.
30977    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30978    if test $? -ne 0; then
30979      { $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
30980$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30981      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30982$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30983      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30984    fi
30985    # Remove Copyright and legalese from version string, and
30986    # collapse into a single line
30987    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30988        $SED -e 's/ *Copyright .*//'`
30989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30990        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30991  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30992    # clang --version output typically looks like
30993    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30994    #    clang version 3.3 (tags/RELEASE_33/final)
30995    # or
30996    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30997    #    Target: x86_64-pc-linux-gnu
30998    #    Thread model: posix
30999    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31000    # Check that this is likely to be clang
31001    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31002    if test $? -ne 0; then
31003      { $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
31004$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31005      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31006$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31007      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31008    fi
31009    # Collapse compiler output into a single line
31010    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31011    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31012        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31013  else
31014      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31015  fi
31016  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31017  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31018  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31019  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31020
31021  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31022$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31023
31024
31025  # Now that we have resolved CXX ourself, let autoconf have its go at it
31026  ac_ext=cpp
31027ac_cpp='$CXXCPP $CPPFLAGS'
31028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31031if test -z "$CXX"; then
31032  if test -n "$CCC"; then
31033    CXX=$CCC
31034  else
31035    if test -n "$ac_tool_prefix"; then
31036  for ac_prog in $CXX
31037  do
31038    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31041$as_echo_n "checking for $ac_word... " >&6; }
31042if ${ac_cv_prog_CXX+:} false; then :
31043  $as_echo_n "(cached) " >&6
31044else
31045  if test -n "$CXX"; then
31046  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31047else
31048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31049for as_dir in $PATH
31050do
31051  IFS=$as_save_IFS
31052  test -z "$as_dir" && as_dir=.
31053    for ac_exec_ext in '' $ac_executable_extensions; do
31054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31055    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31057    break 2
31058  fi
31059done
31060  done
31061IFS=$as_save_IFS
31062
31063fi
31064fi
31065CXX=$ac_cv_prog_CXX
31066if test -n "$CXX"; then
31067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31068$as_echo "$CXX" >&6; }
31069else
31070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31071$as_echo "no" >&6; }
31072fi
31073
31074
31075    test -n "$CXX" && break
31076  done
31077fi
31078if test -z "$CXX"; then
31079  ac_ct_CXX=$CXX
31080  for ac_prog in $CXX
31081do
31082  # Extract the first word of "$ac_prog", so it can be a program name with args.
31083set dummy $ac_prog; ac_word=$2
31084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31085$as_echo_n "checking for $ac_word... " >&6; }
31086if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31087  $as_echo_n "(cached) " >&6
31088else
31089  if test -n "$ac_ct_CXX"; then
31090  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31091else
31092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31093for as_dir in $PATH
31094do
31095  IFS=$as_save_IFS
31096  test -z "$as_dir" && as_dir=.
31097    for ac_exec_ext in '' $ac_executable_extensions; do
31098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31099    ac_cv_prog_ac_ct_CXX="$ac_prog"
31100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31101    break 2
31102  fi
31103done
31104  done
31105IFS=$as_save_IFS
31106
31107fi
31108fi
31109ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31110if test -n "$ac_ct_CXX"; then
31111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31112$as_echo "$ac_ct_CXX" >&6; }
31113else
31114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31115$as_echo "no" >&6; }
31116fi
31117
31118
31119  test -n "$ac_ct_CXX" && break
31120done
31121
31122  if test "x$ac_ct_CXX" = x; then
31123    CXX="g++"
31124  else
31125    case $cross_compiling:$ac_tool_warned in
31126yes:)
31127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31129ac_tool_warned=yes ;;
31130esac
31131    CXX=$ac_ct_CXX
31132  fi
31133fi
31134
31135  fi
31136fi
31137# Provide some information about the compiler.
31138$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31139set X $ac_compile
31140ac_compiler=$2
31141for ac_option in --version -v -V -qversion; do
31142  { { ac_try="$ac_compiler $ac_option >&5"
31143case "(($ac_try" in
31144  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31145  *) ac_try_echo=$ac_try;;
31146esac
31147eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31148$as_echo "$ac_try_echo"; } >&5
31149  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31150  ac_status=$?
31151  if test -s conftest.err; then
31152    sed '10a\
31153... rest of stderr output deleted ...
31154         10q' conftest.err >conftest.er1
31155    cat conftest.er1 >&5
31156  fi
31157  rm -f conftest.er1 conftest.err
31158  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31159  test $ac_status = 0; }
31160done
31161
31162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31163$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31164if ${ac_cv_cxx_compiler_gnu+:} false; then :
31165  $as_echo_n "(cached) " >&6
31166else
31167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31168/* end confdefs.h.  */
31169
31170int
31171main ()
31172{
31173#ifndef __GNUC__
31174       choke me
31175#endif
31176
31177  ;
31178  return 0;
31179}
31180_ACEOF
31181if ac_fn_cxx_try_compile "$LINENO"; then :
31182  ac_compiler_gnu=yes
31183else
31184  ac_compiler_gnu=no
31185fi
31186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31187ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31188
31189fi
31190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31191$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31192if test $ac_compiler_gnu = yes; then
31193  GXX=yes
31194else
31195  GXX=
31196fi
31197ac_test_CXXFLAGS=${CXXFLAGS+set}
31198ac_save_CXXFLAGS=$CXXFLAGS
31199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31200$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31201if ${ac_cv_prog_cxx_g+:} false; then :
31202  $as_echo_n "(cached) " >&6
31203else
31204  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31205   ac_cxx_werror_flag=yes
31206   ac_cv_prog_cxx_g=no
31207   CXXFLAGS="-g"
31208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31209/* end confdefs.h.  */
31210
31211int
31212main ()
31213{
31214
31215  ;
31216  return 0;
31217}
31218_ACEOF
31219if ac_fn_cxx_try_compile "$LINENO"; then :
31220  ac_cv_prog_cxx_g=yes
31221else
31222  CXXFLAGS=""
31223      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31224/* end confdefs.h.  */
31225
31226int
31227main ()
31228{
31229
31230  ;
31231  return 0;
31232}
31233_ACEOF
31234if ac_fn_cxx_try_compile "$LINENO"; then :
31235
31236else
31237  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31238	 CXXFLAGS="-g"
31239	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31240/* end confdefs.h.  */
31241
31242int
31243main ()
31244{
31245
31246  ;
31247  return 0;
31248}
31249_ACEOF
31250if ac_fn_cxx_try_compile "$LINENO"; then :
31251  ac_cv_prog_cxx_g=yes
31252fi
31253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31254fi
31255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31256fi
31257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31258   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31259fi
31260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31261$as_echo "$ac_cv_prog_cxx_g" >&6; }
31262if test "$ac_test_CXXFLAGS" = set; then
31263  CXXFLAGS=$ac_save_CXXFLAGS
31264elif test $ac_cv_prog_cxx_g = yes; then
31265  if test "$GXX" = yes; then
31266    CXXFLAGS="-g -O2"
31267  else
31268    CXXFLAGS="-g"
31269  fi
31270else
31271  if test "$GXX" = yes; then
31272    CXXFLAGS="-O2"
31273  else
31274    CXXFLAGS=
31275  fi
31276fi
31277ac_ext=cpp
31278ac_cpp='$CXXCPP $CPPFLAGS'
31279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31282
31283
31284  #
31285  # Setup the preprocessor (CPP and CXXCPP)
31286  #
31287  ac_ext=c
31288ac_cpp='$CPP $CPPFLAGS'
31289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31291ac_compiler_gnu=$ac_cv_c_compiler_gnu
31292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31293$as_echo_n "checking how to run the C preprocessor... " >&6; }
31294# On Suns, sometimes $CPP names a directory.
31295if test -n "$CPP" && test -d "$CPP"; then
31296  CPP=
31297fi
31298if test -z "$CPP"; then
31299  if ${ac_cv_prog_CPP+:} false; then :
31300  $as_echo_n "(cached) " >&6
31301else
31302      # Double quotes because CPP needs to be expanded
31303    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31304    do
31305      ac_preproc_ok=false
31306for ac_c_preproc_warn_flag in '' yes
31307do
31308  # Use a header file that comes with gcc, so configuring glibc
31309  # with a fresh cross-compiler works.
31310  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31311  # <limits.h> exists even on freestanding compilers.
31312  # On the NeXT, cc -E runs the code through the compiler's parser,
31313  # not just through cpp. "Syntax error" is here to catch this case.
31314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31315/* end confdefs.h.  */
31316#ifdef __STDC__
31317# include <limits.h>
31318#else
31319# include <assert.h>
31320#endif
31321		     Syntax error
31322_ACEOF
31323if ac_fn_c_try_cpp "$LINENO"; then :
31324
31325else
31326  # Broken: fails on valid input.
31327continue
31328fi
31329rm -f conftest.err conftest.i conftest.$ac_ext
31330
31331  # OK, works on sane cases.  Now check whether nonexistent headers
31332  # can be detected and how.
31333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31334/* end confdefs.h.  */
31335#include <ac_nonexistent.h>
31336_ACEOF
31337if ac_fn_c_try_cpp "$LINENO"; then :
31338  # Broken: success on invalid input.
31339continue
31340else
31341  # Passes both tests.
31342ac_preproc_ok=:
31343break
31344fi
31345rm -f conftest.err conftest.i conftest.$ac_ext
31346
31347done
31348# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31349rm -f conftest.i conftest.err conftest.$ac_ext
31350if $ac_preproc_ok; then :
31351  break
31352fi
31353
31354    done
31355    ac_cv_prog_CPP=$CPP
31356
31357fi
31358  CPP=$ac_cv_prog_CPP
31359else
31360  ac_cv_prog_CPP=$CPP
31361fi
31362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31363$as_echo "$CPP" >&6; }
31364ac_preproc_ok=false
31365for ac_c_preproc_warn_flag in '' yes
31366do
31367  # Use a header file that comes with gcc, so configuring glibc
31368  # with a fresh cross-compiler works.
31369  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31370  # <limits.h> exists even on freestanding compilers.
31371  # On the NeXT, cc -E runs the code through the compiler's parser,
31372  # not just through cpp. "Syntax error" is here to catch this case.
31373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31374/* end confdefs.h.  */
31375#ifdef __STDC__
31376# include <limits.h>
31377#else
31378# include <assert.h>
31379#endif
31380		     Syntax error
31381_ACEOF
31382if ac_fn_c_try_cpp "$LINENO"; then :
31383
31384else
31385  # Broken: fails on valid input.
31386continue
31387fi
31388rm -f conftest.err conftest.i conftest.$ac_ext
31389
31390  # OK, works on sane cases.  Now check whether nonexistent headers
31391  # can be detected and how.
31392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31393/* end confdefs.h.  */
31394#include <ac_nonexistent.h>
31395_ACEOF
31396if ac_fn_c_try_cpp "$LINENO"; then :
31397  # Broken: success on invalid input.
31398continue
31399else
31400  # Passes both tests.
31401ac_preproc_ok=:
31402break
31403fi
31404rm -f conftest.err conftest.i conftest.$ac_ext
31405
31406done
31407# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31408rm -f conftest.i conftest.err conftest.$ac_ext
31409if $ac_preproc_ok; then :
31410
31411else
31412  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31414as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31415See \`config.log' for more details" "$LINENO" 5; }
31416fi
31417
31418ac_ext=cpp
31419ac_cpp='$CXXCPP $CPPFLAGS'
31420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31423
31424
31425  # Only process if variable expands to non-empty
31426
31427  if test "x$CPP" != x; then
31428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31429
31430  # First separate the path from the arguments. This will split at the first
31431  # space.
31432  complete="$CPP"
31433  path="${complete%% *}"
31434  tmp="$complete EOL"
31435  arguments="${tmp#* }"
31436
31437  # Input might be given as Windows format, start by converting to
31438  # unix format.
31439  new_path=`$CYGPATH -u "$path"`
31440
31441  # Now try to locate executable using which
31442  new_path=`$WHICH "$new_path" 2> /dev/null`
31443  # bat and cmd files are not always considered executable in cygwin causing which
31444  # to not find them
31445  if test "x$new_path" = x \
31446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31448    new_path=`$CYGPATH -u "$path"`
31449  fi
31450  if test "x$new_path" = x; then
31451    # Oops. Which didn't find the executable.
31452    # The splitting of arguments from the executable at a space might have been incorrect,
31453    # since paths with space are more likely in Windows. Give it another try with the whole
31454    # argument.
31455    path="$complete"
31456    arguments="EOL"
31457    new_path=`$CYGPATH -u "$path"`
31458    new_path=`$WHICH "$new_path" 2> /dev/null`
31459    # bat and cmd files are not always considered executable in cygwin causing which
31460    # to not find them
31461    if test "x$new_path" = x \
31462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31464      new_path=`$CYGPATH -u "$path"`
31465    fi
31466    if test "x$new_path" = x; then
31467      # It's still not found. Now this is an unrecoverable error.
31468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31469$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31470      has_space=`$ECHO "$complete" | $GREP " "`
31471      if test "x$has_space" != x; then
31472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31474      fi
31475      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31476    fi
31477  fi
31478
31479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31482  # "foo.exe" is OK but "foo" is an error.
31483  #
31484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31485  # It is also a way to make sure we got the proper file name for the real test later on.
31486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31487  if test "x$test_shortpath" = x; then
31488    # Short path failed, file does not exist as specified.
31489    # Try adding .exe or .cmd
31490    if test -f "${new_path}.exe"; then
31491      input_to_shortpath="${new_path}.exe"
31492    elif test -f "${new_path}.cmd"; then
31493      input_to_shortpath="${new_path}.cmd"
31494    else
31495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31496$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31499      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31500    fi
31501  else
31502    input_to_shortpath="$new_path"
31503  fi
31504
31505  # Call helper function which possibly converts this using DOS-style short mode.
31506  # If so, the updated path is stored in $new_path.
31507  new_path="$input_to_shortpath"
31508
31509  input_path="$input_to_shortpath"
31510  # Check if we need to convert this using DOS-style short mode. If the path
31511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31512  # take no chances and rewrite it.
31513  # Note: m4 eats our [], so we need to use [ and ] instead.
31514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31515  if test "x$has_forbidden_chars" != x; then
31516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31520      # Going to short mode and back again did indeed matter. Since short mode is
31521      # case insensitive, let's make it lowercase to improve readability.
31522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31523      # Now convert it back to Unix-style (cygpath)
31524      input_path=`$CYGPATH -u "$shortmode_path"`
31525      new_path="$input_path"
31526    fi
31527  fi
31528
31529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31530  if test "x$test_cygdrive_prefix" = x; then
31531    # As a simple fix, exclude /usr/bin since it's not a real path.
31532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31534      # a path prefixed by /cygdrive for fixpath to work.
31535      new_path="$CYGWIN_ROOT_PATH$input_path"
31536    fi
31537  fi
31538
31539  # remove trailing .exe if any
31540  new_path="${new_path/%.exe/}"
31541
31542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31543
31544  # First separate the path from the arguments. This will split at the first
31545  # space.
31546  complete="$CPP"
31547  path="${complete%% *}"
31548  tmp="$complete EOL"
31549  arguments="${tmp#* }"
31550
31551  # Input might be given as Windows format, start by converting to
31552  # unix format.
31553  new_path="$path"
31554
31555  windows_path="$new_path"
31556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31557    unix_path=`$CYGPATH -u "$windows_path"`
31558    new_path="$unix_path"
31559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31561    new_path="$unix_path"
31562  fi
31563
31564
31565  # Now try to locate executable using which
31566  new_path=`$WHICH "$new_path" 2> /dev/null`
31567
31568  if test "x$new_path" = x; then
31569    # Oops. Which didn't find the executable.
31570    # The splitting of arguments from the executable at a space might have been incorrect,
31571    # since paths with space are more likely in Windows. Give it another try with the whole
31572    # argument.
31573    path="$complete"
31574    arguments="EOL"
31575    new_path="$path"
31576
31577  windows_path="$new_path"
31578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31579    unix_path=`$CYGPATH -u "$windows_path"`
31580    new_path="$unix_path"
31581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31583    new_path="$unix_path"
31584  fi
31585
31586
31587    new_path=`$WHICH "$new_path" 2> /dev/null`
31588    # bat and cmd files are not always considered executable in MSYS causing which
31589    # to not find them
31590    if test "x$new_path" = x \
31591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31593      new_path="$path"
31594
31595  windows_path="$new_path"
31596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31597    unix_path=`$CYGPATH -u "$windows_path"`
31598    new_path="$unix_path"
31599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31601    new_path="$unix_path"
31602  fi
31603
31604    fi
31605
31606    if test "x$new_path" = x; then
31607      # It's still not found. Now this is an unrecoverable error.
31608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31609$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31610      has_space=`$ECHO "$complete" | $GREP " "`
31611      if test "x$has_space" != x; then
31612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31614      fi
31615      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31616    fi
31617  fi
31618
31619  # Now new_path has a complete unix path to the binary
31620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31621    # Keep paths in /bin as-is, but remove trailing .exe if any
31622    new_path="${new_path/%.exe/}"
31623    # Do not save /bin paths to all_fixpath_prefixes!
31624  else
31625    # Not in mixed or Windows style, start by that.
31626    new_path=`cmd //c echo $new_path`
31627
31628  input_path="$new_path"
31629  # Check if we need to convert this using DOS-style short mode. If the path
31630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31631  # take no chances and rewrite it.
31632  # Note: m4 eats our [], so we need to use [ and ] instead.
31633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31634  if test "x$has_forbidden_chars" != x; then
31635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31637  fi
31638
31639    # Output is in $new_path
31640
31641  windows_path="$new_path"
31642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31643    unix_path=`$CYGPATH -u "$windows_path"`
31644    new_path="$unix_path"
31645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31647    new_path="$unix_path"
31648  fi
31649
31650    # remove trailing .exe if any
31651    new_path="${new_path/%.exe/}"
31652
31653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31655  fi
31656
31657    else
31658      # We're on a unix platform. Hooray! :)
31659      # First separate the path from the arguments. This will split at the first
31660      # space.
31661      complete="$CPP"
31662      path="${complete%% *}"
31663      tmp="$complete EOL"
31664      arguments="${tmp#* }"
31665
31666      # Cannot rely on the command "which" here since it doesn't always work.
31667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31668      if test -z "$is_absolute_path"; then
31669        # Path to executable is not absolute. Find it.
31670        IFS_save="$IFS"
31671        IFS=:
31672        for p in $PATH; do
31673          if test -f "$p/$path" && test -x "$p/$path"; then
31674            new_path="$p/$path"
31675            break
31676          fi
31677        done
31678        IFS="$IFS_save"
31679      else
31680        # This is an absolute path, we can use it without further modifications.
31681        new_path="$path"
31682      fi
31683
31684      if test "x$new_path" = x; then
31685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31686$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31687        has_space=`$ECHO "$complete" | $GREP " "`
31688        if test "x$has_space" != x; then
31689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31691        fi
31692        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31693      fi
31694    fi
31695
31696    # Now join together the path and the arguments once again
31697    if test "x$arguments" != xEOL; then
31698      new_complete="$new_path ${arguments% *}"
31699    else
31700      new_complete="$new_path"
31701    fi
31702
31703    if test "x$complete" != "x$new_complete"; then
31704      CPP="$new_complete"
31705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31706$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31707    fi
31708  fi
31709
31710  ac_ext=cpp
31711ac_cpp='$CXXCPP $CPPFLAGS'
31712ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31713ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31714ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31716$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31717if test -z "$CXXCPP"; then
31718  if ${ac_cv_prog_CXXCPP+:} false; then :
31719  $as_echo_n "(cached) " >&6
31720else
31721      # Double quotes because CXXCPP needs to be expanded
31722    for CXXCPP in "$CXX -E" "/lib/cpp"
31723    do
31724      ac_preproc_ok=false
31725for ac_cxx_preproc_warn_flag in '' yes
31726do
31727  # Use a header file that comes with gcc, so configuring glibc
31728  # with a fresh cross-compiler works.
31729  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31730  # <limits.h> exists even on freestanding compilers.
31731  # On the NeXT, cc -E runs the code through the compiler's parser,
31732  # not just through cpp. "Syntax error" is here to catch this case.
31733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31734/* end confdefs.h.  */
31735#ifdef __STDC__
31736# include <limits.h>
31737#else
31738# include <assert.h>
31739#endif
31740		     Syntax error
31741_ACEOF
31742if ac_fn_cxx_try_cpp "$LINENO"; then :
31743
31744else
31745  # Broken: fails on valid input.
31746continue
31747fi
31748rm -f conftest.err conftest.i conftest.$ac_ext
31749
31750  # OK, works on sane cases.  Now check whether nonexistent headers
31751  # can be detected and how.
31752  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31753/* end confdefs.h.  */
31754#include <ac_nonexistent.h>
31755_ACEOF
31756if ac_fn_cxx_try_cpp "$LINENO"; then :
31757  # Broken: success on invalid input.
31758continue
31759else
31760  # Passes both tests.
31761ac_preproc_ok=:
31762break
31763fi
31764rm -f conftest.err conftest.i conftest.$ac_ext
31765
31766done
31767# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31768rm -f conftest.i conftest.err conftest.$ac_ext
31769if $ac_preproc_ok; then :
31770  break
31771fi
31772
31773    done
31774    ac_cv_prog_CXXCPP=$CXXCPP
31775
31776fi
31777  CXXCPP=$ac_cv_prog_CXXCPP
31778else
31779  ac_cv_prog_CXXCPP=$CXXCPP
31780fi
31781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31782$as_echo "$CXXCPP" >&6; }
31783ac_preproc_ok=false
31784for ac_cxx_preproc_warn_flag in '' yes
31785do
31786  # Use a header file that comes with gcc, so configuring glibc
31787  # with a fresh cross-compiler works.
31788  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31789  # <limits.h> exists even on freestanding compilers.
31790  # On the NeXT, cc -E runs the code through the compiler's parser,
31791  # not just through cpp. "Syntax error" is here to catch this case.
31792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31793/* end confdefs.h.  */
31794#ifdef __STDC__
31795# include <limits.h>
31796#else
31797# include <assert.h>
31798#endif
31799		     Syntax error
31800_ACEOF
31801if ac_fn_cxx_try_cpp "$LINENO"; then :
31802
31803else
31804  # Broken: fails on valid input.
31805continue
31806fi
31807rm -f conftest.err conftest.i conftest.$ac_ext
31808
31809  # OK, works on sane cases.  Now check whether nonexistent headers
31810  # can be detected and how.
31811  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31812/* end confdefs.h.  */
31813#include <ac_nonexistent.h>
31814_ACEOF
31815if ac_fn_cxx_try_cpp "$LINENO"; then :
31816  # Broken: success on invalid input.
31817continue
31818else
31819  # Passes both tests.
31820ac_preproc_ok=:
31821break
31822fi
31823rm -f conftest.err conftest.i conftest.$ac_ext
31824
31825done
31826# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31827rm -f conftest.i conftest.err conftest.$ac_ext
31828if $ac_preproc_ok; then :
31829
31830else
31831  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31833as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31834See \`config.log' for more details" "$LINENO" 5; }
31835fi
31836
31837ac_ext=cpp
31838ac_cpp='$CXXCPP $CPPFLAGS'
31839ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31840ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31841ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31842
31843
31844  # Only process if variable expands to non-empty
31845
31846  if test "x$CXXCPP" != x; then
31847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31848
31849  # First separate the path from the arguments. This will split at the first
31850  # space.
31851  complete="$CXXCPP"
31852  path="${complete%% *}"
31853  tmp="$complete EOL"
31854  arguments="${tmp#* }"
31855
31856  # Input might be given as Windows format, start by converting to
31857  # unix format.
31858  new_path=`$CYGPATH -u "$path"`
31859
31860  # Now try to locate executable using which
31861  new_path=`$WHICH "$new_path" 2> /dev/null`
31862  # bat and cmd files are not always considered executable in cygwin causing which
31863  # to not find them
31864  if test "x$new_path" = x \
31865      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31866      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31867    new_path=`$CYGPATH -u "$path"`
31868  fi
31869  if test "x$new_path" = x; then
31870    # Oops. Which didn't find the executable.
31871    # The splitting of arguments from the executable at a space might have been incorrect,
31872    # since paths with space are more likely in Windows. Give it another try with the whole
31873    # argument.
31874    path="$complete"
31875    arguments="EOL"
31876    new_path=`$CYGPATH -u "$path"`
31877    new_path=`$WHICH "$new_path" 2> /dev/null`
31878    # bat and cmd files are not always considered executable in cygwin causing which
31879    # to not find them
31880    if test "x$new_path" = x \
31881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31883      new_path=`$CYGPATH -u "$path"`
31884    fi
31885    if test "x$new_path" = x; then
31886      # It's still not found. Now this is an unrecoverable error.
31887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31888$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31889      has_space=`$ECHO "$complete" | $GREP " "`
31890      if test "x$has_space" != x; then
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31893      fi
31894      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31895    fi
31896  fi
31897
31898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31901  # "foo.exe" is OK but "foo" is an error.
31902  #
31903  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31904  # It is also a way to make sure we got the proper file name for the real test later on.
31905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31906  if test "x$test_shortpath" = x; then
31907    # Short path failed, file does not exist as specified.
31908    # Try adding .exe or .cmd
31909    if test -f "${new_path}.exe"; then
31910      input_to_shortpath="${new_path}.exe"
31911    elif test -f "${new_path}.cmd"; then
31912      input_to_shortpath="${new_path}.cmd"
31913    else
31914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31915$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31916      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31917$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31918      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31919    fi
31920  else
31921    input_to_shortpath="$new_path"
31922  fi
31923
31924  # Call helper function which possibly converts this using DOS-style short mode.
31925  # If so, the updated path is stored in $new_path.
31926  new_path="$input_to_shortpath"
31927
31928  input_path="$input_to_shortpath"
31929  # Check if we need to convert this using DOS-style short mode. If the path
31930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31931  # take no chances and rewrite it.
31932  # Note: m4 eats our [], so we need to use [ and ] instead.
31933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31934  if test "x$has_forbidden_chars" != x; then
31935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31939      # Going to short mode and back again did indeed matter. Since short mode is
31940      # case insensitive, let's make it lowercase to improve readability.
31941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31942      # Now convert it back to Unix-style (cygpath)
31943      input_path=`$CYGPATH -u "$shortmode_path"`
31944      new_path="$input_path"
31945    fi
31946  fi
31947
31948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31949  if test "x$test_cygdrive_prefix" = x; then
31950    # As a simple fix, exclude /usr/bin since it's not a real path.
31951    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31953      # a path prefixed by /cygdrive for fixpath to work.
31954      new_path="$CYGWIN_ROOT_PATH$input_path"
31955    fi
31956  fi
31957
31958  # remove trailing .exe if any
31959  new_path="${new_path/%.exe/}"
31960
31961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31962
31963  # First separate the path from the arguments. This will split at the first
31964  # space.
31965  complete="$CXXCPP"
31966  path="${complete%% *}"
31967  tmp="$complete EOL"
31968  arguments="${tmp#* }"
31969
31970  # Input might be given as Windows format, start by converting to
31971  # unix format.
31972  new_path="$path"
31973
31974  windows_path="$new_path"
31975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31976    unix_path=`$CYGPATH -u "$windows_path"`
31977    new_path="$unix_path"
31978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31980    new_path="$unix_path"
31981  fi
31982
31983
31984  # Now try to locate executable using which
31985  new_path=`$WHICH "$new_path" 2> /dev/null`
31986
31987  if test "x$new_path" = x; then
31988    # Oops. Which didn't find the executable.
31989    # The splitting of arguments from the executable at a space might have been incorrect,
31990    # since paths with space are more likely in Windows. Give it another try with the whole
31991    # argument.
31992    path="$complete"
31993    arguments="EOL"
31994    new_path="$path"
31995
31996  windows_path="$new_path"
31997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31998    unix_path=`$CYGPATH -u "$windows_path"`
31999    new_path="$unix_path"
32000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32002    new_path="$unix_path"
32003  fi
32004
32005
32006    new_path=`$WHICH "$new_path" 2> /dev/null`
32007    # bat and cmd files are not always considered executable in MSYS causing which
32008    # to not find them
32009    if test "x$new_path" = x \
32010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32012      new_path="$path"
32013
32014  windows_path="$new_path"
32015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32016    unix_path=`$CYGPATH -u "$windows_path"`
32017    new_path="$unix_path"
32018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32020    new_path="$unix_path"
32021  fi
32022
32023    fi
32024
32025    if test "x$new_path" = x; then
32026      # It's still not found. Now this is an unrecoverable error.
32027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32028$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32029      has_space=`$ECHO "$complete" | $GREP " "`
32030      if test "x$has_space" != x; then
32031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32033      fi
32034      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32035    fi
32036  fi
32037
32038  # Now new_path has a complete unix path to the binary
32039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32040    # Keep paths in /bin as-is, but remove trailing .exe if any
32041    new_path="${new_path/%.exe/}"
32042    # Do not save /bin paths to all_fixpath_prefixes!
32043  else
32044    # Not in mixed or Windows style, start by that.
32045    new_path=`cmd //c echo $new_path`
32046
32047  input_path="$new_path"
32048  # Check if we need to convert this using DOS-style short mode. If the path
32049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32050  # take no chances and rewrite it.
32051  # Note: m4 eats our [], so we need to use [ and ] instead.
32052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32053  if test "x$has_forbidden_chars" != x; then
32054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32056  fi
32057
32058    # Output is in $new_path
32059
32060  windows_path="$new_path"
32061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32062    unix_path=`$CYGPATH -u "$windows_path"`
32063    new_path="$unix_path"
32064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32066    new_path="$unix_path"
32067  fi
32068
32069    # remove trailing .exe if any
32070    new_path="${new_path/%.exe/}"
32071
32072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32074  fi
32075
32076    else
32077      # We're on a unix platform. Hooray! :)
32078      # First separate the path from the arguments. This will split at the first
32079      # space.
32080      complete="$CXXCPP"
32081      path="${complete%% *}"
32082      tmp="$complete EOL"
32083      arguments="${tmp#* }"
32084
32085      # Cannot rely on the command "which" here since it doesn't always work.
32086      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32087      if test -z "$is_absolute_path"; then
32088        # Path to executable is not absolute. Find it.
32089        IFS_save="$IFS"
32090        IFS=:
32091        for p in $PATH; do
32092          if test -f "$p/$path" && test -x "$p/$path"; then
32093            new_path="$p/$path"
32094            break
32095          fi
32096        done
32097        IFS="$IFS_save"
32098      else
32099        # This is an absolute path, we can use it without further modifications.
32100        new_path="$path"
32101      fi
32102
32103      if test "x$new_path" = x; then
32104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32105$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32106        has_space=`$ECHO "$complete" | $GREP " "`
32107        if test "x$has_space" != x; then
32108          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32109$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32110        fi
32111        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32112      fi
32113    fi
32114
32115    # Now join together the path and the arguments once again
32116    if test "x$arguments" != xEOL; then
32117      new_complete="$new_path ${arguments% *}"
32118    else
32119      new_complete="$new_path"
32120    fi
32121
32122    if test "x$complete" != "x$new_complete"; then
32123      CXXCPP="$new_complete"
32124      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32125$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32126    fi
32127  fi
32128
32129
32130  #
32131  # Setup the linker (LD)
32132  #
32133  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32134    # In the Microsoft toolchain we have a separate LD command "link".
32135    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32136    # a cygwin program for something completely different.
32137    # Extract the first word of "link", so it can be a program name with args.
32138set dummy link; ac_word=$2
32139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32140$as_echo_n "checking for $ac_word... " >&6; }
32141if ${ac_cv_prog_LD+:} false; then :
32142  $as_echo_n "(cached) " >&6
32143else
32144  if test -n "$LD"; then
32145  ac_cv_prog_LD="$LD" # Let the user override the test.
32146else
32147  ac_prog_rejected=no
32148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32149for as_dir in $PATH
32150do
32151  IFS=$as_save_IFS
32152  test -z "$as_dir" && as_dir=.
32153    for ac_exec_ext in '' $ac_executable_extensions; do
32154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32155    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32156       ac_prog_rejected=yes
32157       continue
32158     fi
32159    ac_cv_prog_LD="link"
32160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32161    break 2
32162  fi
32163done
32164  done
32165IFS=$as_save_IFS
32166
32167if test $ac_prog_rejected = yes; then
32168  # We found a bogon in the path, so make sure we never use it.
32169  set dummy $ac_cv_prog_LD
32170  shift
32171  if test $# != 0; then
32172    # We chose a different compiler from the bogus one.
32173    # However, it has the same basename, so the bogon will be chosen
32174    # first if we set LD to just the basename; use the full file name.
32175    shift
32176    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32177  fi
32178fi
32179fi
32180fi
32181LD=$ac_cv_prog_LD
32182if test -n "$LD"; then
32183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32184$as_echo "$LD" >&6; }
32185else
32186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32187$as_echo "no" >&6; }
32188fi
32189
32190
32191
32192  # Only process if variable expands to non-empty
32193
32194  if test "x$LD" != x; then
32195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32196
32197  # First separate the path from the arguments. This will split at the first
32198  # space.
32199  complete="$LD"
32200  path="${complete%% *}"
32201  tmp="$complete EOL"
32202  arguments="${tmp#* }"
32203
32204  # Input might be given as Windows format, start by converting to
32205  # unix format.
32206  new_path=`$CYGPATH -u "$path"`
32207
32208  # Now try to locate executable using which
32209  new_path=`$WHICH "$new_path" 2> /dev/null`
32210  # bat and cmd files are not always considered executable in cygwin causing which
32211  # to not find them
32212  if test "x$new_path" = x \
32213      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32214      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32215    new_path=`$CYGPATH -u "$path"`
32216  fi
32217  if test "x$new_path" = x; then
32218    # Oops. Which didn't find the executable.
32219    # The splitting of arguments from the executable at a space might have been incorrect,
32220    # since paths with space are more likely in Windows. Give it another try with the whole
32221    # argument.
32222    path="$complete"
32223    arguments="EOL"
32224    new_path=`$CYGPATH -u "$path"`
32225    new_path=`$WHICH "$new_path" 2> /dev/null`
32226    # bat and cmd files are not always considered executable in cygwin causing which
32227    # to not find them
32228    if test "x$new_path" = x \
32229        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32230        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32231      new_path=`$CYGPATH -u "$path"`
32232    fi
32233    if test "x$new_path" = x; then
32234      # It's still not found. Now this is an unrecoverable error.
32235      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32236$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32237      has_space=`$ECHO "$complete" | $GREP " "`
32238      if test "x$has_space" != x; then
32239        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32240$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32241      fi
32242      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32243    fi
32244  fi
32245
32246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32249  # "foo.exe" is OK but "foo" is an error.
32250  #
32251  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32252  # It is also a way to make sure we got the proper file name for the real test later on.
32253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32254  if test "x$test_shortpath" = x; then
32255    # Short path failed, file does not exist as specified.
32256    # Try adding .exe or .cmd
32257    if test -f "${new_path}.exe"; then
32258      input_to_shortpath="${new_path}.exe"
32259    elif test -f "${new_path}.cmd"; then
32260      input_to_shortpath="${new_path}.cmd"
32261    else
32262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32263$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32264      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32265$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32266      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32267    fi
32268  else
32269    input_to_shortpath="$new_path"
32270  fi
32271
32272  # Call helper function which possibly converts this using DOS-style short mode.
32273  # If so, the updated path is stored in $new_path.
32274  new_path="$input_to_shortpath"
32275
32276  input_path="$input_to_shortpath"
32277  # Check if we need to convert this using DOS-style short mode. If the path
32278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32279  # take no chances and rewrite it.
32280  # Note: m4 eats our [], so we need to use [ and ] instead.
32281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32282  if test "x$has_forbidden_chars" != x; then
32283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32287      # Going to short mode and back again did indeed matter. Since short mode is
32288      # case insensitive, let's make it lowercase to improve readability.
32289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32290      # Now convert it back to Unix-style (cygpath)
32291      input_path=`$CYGPATH -u "$shortmode_path"`
32292      new_path="$input_path"
32293    fi
32294  fi
32295
32296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32297  if test "x$test_cygdrive_prefix" = x; then
32298    # As a simple fix, exclude /usr/bin since it's not a real path.
32299    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32301      # a path prefixed by /cygdrive for fixpath to work.
32302      new_path="$CYGWIN_ROOT_PATH$input_path"
32303    fi
32304  fi
32305
32306  # remove trailing .exe if any
32307  new_path="${new_path/%.exe/}"
32308
32309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32310
32311  # First separate the path from the arguments. This will split at the first
32312  # space.
32313  complete="$LD"
32314  path="${complete%% *}"
32315  tmp="$complete EOL"
32316  arguments="${tmp#* }"
32317
32318  # Input might be given as Windows format, start by converting to
32319  # unix format.
32320  new_path="$path"
32321
32322  windows_path="$new_path"
32323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32324    unix_path=`$CYGPATH -u "$windows_path"`
32325    new_path="$unix_path"
32326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32328    new_path="$unix_path"
32329  fi
32330
32331
32332  # Now try to locate executable using which
32333  new_path=`$WHICH "$new_path" 2> /dev/null`
32334
32335  if test "x$new_path" = x; then
32336    # Oops. Which didn't find the executable.
32337    # The splitting of arguments from the executable at a space might have been incorrect,
32338    # since paths with space are more likely in Windows. Give it another try with the whole
32339    # argument.
32340    path="$complete"
32341    arguments="EOL"
32342    new_path="$path"
32343
32344  windows_path="$new_path"
32345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32346    unix_path=`$CYGPATH -u "$windows_path"`
32347    new_path="$unix_path"
32348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32350    new_path="$unix_path"
32351  fi
32352
32353
32354    new_path=`$WHICH "$new_path" 2> /dev/null`
32355    # bat and cmd files are not always considered executable in MSYS causing which
32356    # to not find them
32357    if test "x$new_path" = x \
32358        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32359        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32360      new_path="$path"
32361
32362  windows_path="$new_path"
32363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32364    unix_path=`$CYGPATH -u "$windows_path"`
32365    new_path="$unix_path"
32366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32368    new_path="$unix_path"
32369  fi
32370
32371    fi
32372
32373    if test "x$new_path" = x; then
32374      # It's still not found. Now this is an unrecoverable error.
32375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32376$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32377      has_space=`$ECHO "$complete" | $GREP " "`
32378      if test "x$has_space" != x; then
32379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32381      fi
32382      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32383    fi
32384  fi
32385
32386  # Now new_path has a complete unix path to the binary
32387  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32388    # Keep paths in /bin as-is, but remove trailing .exe if any
32389    new_path="${new_path/%.exe/}"
32390    # Do not save /bin paths to all_fixpath_prefixes!
32391  else
32392    # Not in mixed or Windows style, start by that.
32393    new_path=`cmd //c echo $new_path`
32394
32395  input_path="$new_path"
32396  # Check if we need to convert this using DOS-style short mode. If the path
32397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32398  # take no chances and rewrite it.
32399  # Note: m4 eats our [], so we need to use [ and ] instead.
32400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32401  if test "x$has_forbidden_chars" != x; then
32402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32403    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32404  fi
32405
32406    # Output is in $new_path
32407
32408  windows_path="$new_path"
32409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32410    unix_path=`$CYGPATH -u "$windows_path"`
32411    new_path="$unix_path"
32412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32414    new_path="$unix_path"
32415  fi
32416
32417    # remove trailing .exe if any
32418    new_path="${new_path/%.exe/}"
32419
32420    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32421    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32422  fi
32423
32424    else
32425      # We're on a unix platform. Hooray! :)
32426      # First separate the path from the arguments. This will split at the first
32427      # space.
32428      complete="$LD"
32429      path="${complete%% *}"
32430      tmp="$complete EOL"
32431      arguments="${tmp#* }"
32432
32433      # Cannot rely on the command "which" here since it doesn't always work.
32434      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32435      if test -z "$is_absolute_path"; then
32436        # Path to executable is not absolute. Find it.
32437        IFS_save="$IFS"
32438        IFS=:
32439        for p in $PATH; do
32440          if test -f "$p/$path" && test -x "$p/$path"; then
32441            new_path="$p/$path"
32442            break
32443          fi
32444        done
32445        IFS="$IFS_save"
32446      else
32447        # This is an absolute path, we can use it without further modifications.
32448        new_path="$path"
32449      fi
32450
32451      if test "x$new_path" = x; then
32452        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32453$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32454        has_space=`$ECHO "$complete" | $GREP " "`
32455        if test "x$has_space" != x; then
32456          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32457$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32458        fi
32459        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32460      fi
32461    fi
32462
32463    # Now join together the path and the arguments once again
32464    if test "x$arguments" != xEOL; then
32465      new_complete="$new_path ${arguments% *}"
32466    else
32467      new_complete="$new_path"
32468    fi
32469
32470    if test "x$complete" != "x$new_complete"; then
32471      LD="$new_complete"
32472      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32473$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32474    fi
32475  fi
32476
32477    # Verify that we indeed succeeded with this trick.
32478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32479$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32480    "$LD" --version > /dev/null
32481    if test $? -eq 0 ; then
32482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32483$as_echo "no" >&6; }
32484      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32485    else
32486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32487$as_echo "yes" >&6; }
32488    fi
32489    LDCXX="$LD"
32490  else
32491    # All other toolchains use the compiler to link.
32492    LD="$CC"
32493    LDCXX="$CXX"
32494  fi
32495
32496  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32497
32498
32499  #
32500  # Setup the assembler (AS)
32501  #
32502  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32503    # FIXME: should this really be solaris, or solstudio?
32504
32505
32506  # Publish this variable in the help.
32507
32508
32509  if test "x$AS" = x; then
32510    # The variable is not set by user, try to locate tool using the code snippet
32511    for ac_prog in as
32512do
32513  # Extract the first word of "$ac_prog", so it can be a program name with args.
32514set dummy $ac_prog; ac_word=$2
32515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32516$as_echo_n "checking for $ac_word... " >&6; }
32517if ${ac_cv_path_AS+:} false; then :
32518  $as_echo_n "(cached) " >&6
32519else
32520  case $AS in
32521  [\\/]* | ?:[\\/]*)
32522  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32523  ;;
32524  *)
32525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32526for as_dir in $PATH
32527do
32528  IFS=$as_save_IFS
32529  test -z "$as_dir" && as_dir=.
32530    for ac_exec_ext in '' $ac_executable_extensions; do
32531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32532    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32534    break 2
32535  fi
32536done
32537  done
32538IFS=$as_save_IFS
32539
32540  ;;
32541esac
32542fi
32543AS=$ac_cv_path_AS
32544if test -n "$AS"; then
32545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32546$as_echo "$AS" >&6; }
32547else
32548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32549$as_echo "no" >&6; }
32550fi
32551
32552
32553  test -n "$AS" && break
32554done
32555
32556  else
32557    # The variable is set, but is it from the command line or the environment?
32558
32559    # Try to remove the string !AS! from our list.
32560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32562      # If it failed, the variable was not from the command line. Ignore it,
32563      # but warn the user (except for BASH, which is always set by the calling BASH).
32564      if test "xAS" != xBASH; then
32565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32566$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32567      fi
32568      # Try to locate tool using the code snippet
32569      for ac_prog in as
32570do
32571  # Extract the first word of "$ac_prog", so it can be a program name with args.
32572set dummy $ac_prog; ac_word=$2
32573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32574$as_echo_n "checking for $ac_word... " >&6; }
32575if ${ac_cv_path_AS+:} false; then :
32576  $as_echo_n "(cached) " >&6
32577else
32578  case $AS in
32579  [\\/]* | ?:[\\/]*)
32580  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32581  ;;
32582  *)
32583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32584for as_dir in $PATH
32585do
32586  IFS=$as_save_IFS
32587  test -z "$as_dir" && as_dir=.
32588    for ac_exec_ext in '' $ac_executable_extensions; do
32589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32590    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32592    break 2
32593  fi
32594done
32595  done
32596IFS=$as_save_IFS
32597
32598  ;;
32599esac
32600fi
32601AS=$ac_cv_path_AS
32602if test -n "$AS"; then
32603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32604$as_echo "$AS" >&6; }
32605else
32606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32607$as_echo "no" >&6; }
32608fi
32609
32610
32611  test -n "$AS" && break
32612done
32613
32614    else
32615      # If it succeeded, then it was overridden by the user. We will use it
32616      # for the tool.
32617
32618      # First remove it from the list of overridden variables, so we can test
32619      # for unknown variables in the end.
32620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32621
32622      # Check if the provided tool contains a complete path.
32623      tool_specified="$AS"
32624      tool_basename="${tool_specified##*/}"
32625      if test "x$tool_basename" = "x$tool_specified"; then
32626        # A command without a complete path is provided, search $PATH.
32627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32628$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32629        # Extract the first word of "$tool_basename", so it can be a program name with args.
32630set dummy $tool_basename; ac_word=$2
32631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32632$as_echo_n "checking for $ac_word... " >&6; }
32633if ${ac_cv_path_AS+:} false; then :
32634  $as_echo_n "(cached) " >&6
32635else
32636  case $AS in
32637  [\\/]* | ?:[\\/]*)
32638  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32639  ;;
32640  *)
32641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32642for as_dir in $PATH
32643do
32644  IFS=$as_save_IFS
32645  test -z "$as_dir" && as_dir=.
32646    for ac_exec_ext in '' $ac_executable_extensions; do
32647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32648    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32650    break 2
32651  fi
32652done
32653  done
32654IFS=$as_save_IFS
32655
32656  ;;
32657esac
32658fi
32659AS=$ac_cv_path_AS
32660if test -n "$AS"; then
32661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32662$as_echo "$AS" >&6; }
32663else
32664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32665$as_echo "no" >&6; }
32666fi
32667
32668
32669        if test "x$AS" = x; then
32670          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32671        fi
32672      else
32673        # Otherwise we believe it is a complete path. Use it as it is.
32674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32675$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32676        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32677$as_echo_n "checking for AS... " >&6; }
32678        if test ! -x "$tool_specified"; then
32679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32680$as_echo "not found" >&6; }
32681          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32682        fi
32683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32684$as_echo "$tool_specified" >&6; }
32685      fi
32686    fi
32687  fi
32688
32689
32690
32691  # Only process if variable expands to non-empty
32692
32693  if test "x$AS" != x; then
32694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32695
32696  # First separate the path from the arguments. This will split at the first
32697  # space.
32698  complete="$AS"
32699  path="${complete%% *}"
32700  tmp="$complete EOL"
32701  arguments="${tmp#* }"
32702
32703  # Input might be given as Windows format, start by converting to
32704  # unix format.
32705  new_path=`$CYGPATH -u "$path"`
32706
32707  # Now try to locate executable using which
32708  new_path=`$WHICH "$new_path" 2> /dev/null`
32709  # bat and cmd files are not always considered executable in cygwin causing which
32710  # to not find them
32711  if test "x$new_path" = x \
32712      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32713      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32714    new_path=`$CYGPATH -u "$path"`
32715  fi
32716  if test "x$new_path" = x; then
32717    # Oops. Which didn't find the executable.
32718    # The splitting of arguments from the executable at a space might have been incorrect,
32719    # since paths with space are more likely in Windows. Give it another try with the whole
32720    # argument.
32721    path="$complete"
32722    arguments="EOL"
32723    new_path=`$CYGPATH -u "$path"`
32724    new_path=`$WHICH "$new_path" 2> /dev/null`
32725    # bat and cmd files are not always considered executable in cygwin causing which
32726    # to not find them
32727    if test "x$new_path" = x \
32728        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32729        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32730      new_path=`$CYGPATH -u "$path"`
32731    fi
32732    if test "x$new_path" = x; then
32733      # It's still not found. Now this is an unrecoverable error.
32734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32735$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32736      has_space=`$ECHO "$complete" | $GREP " "`
32737      if test "x$has_space" != x; then
32738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32740      fi
32741      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32742    fi
32743  fi
32744
32745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32748  # "foo.exe" is OK but "foo" is an error.
32749  #
32750  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32751  # It is also a way to make sure we got the proper file name for the real test later on.
32752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32753  if test "x$test_shortpath" = x; then
32754    # Short path failed, file does not exist as specified.
32755    # Try adding .exe or .cmd
32756    if test -f "${new_path}.exe"; then
32757      input_to_shortpath="${new_path}.exe"
32758    elif test -f "${new_path}.cmd"; then
32759      input_to_shortpath="${new_path}.cmd"
32760    else
32761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32762$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32763      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32764$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32765      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32766    fi
32767  else
32768    input_to_shortpath="$new_path"
32769  fi
32770
32771  # Call helper function which possibly converts this using DOS-style short mode.
32772  # If so, the updated path is stored in $new_path.
32773  new_path="$input_to_shortpath"
32774
32775  input_path="$input_to_shortpath"
32776  # Check if we need to convert this using DOS-style short mode. If the path
32777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32778  # take no chances and rewrite it.
32779  # Note: m4 eats our [], so we need to use [ and ] instead.
32780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32781  if test "x$has_forbidden_chars" != x; then
32782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32786      # Going to short mode and back again did indeed matter. Since short mode is
32787      # case insensitive, let's make it lowercase to improve readability.
32788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32789      # Now convert it back to Unix-style (cygpath)
32790      input_path=`$CYGPATH -u "$shortmode_path"`
32791      new_path="$input_path"
32792    fi
32793  fi
32794
32795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32796  if test "x$test_cygdrive_prefix" = x; then
32797    # As a simple fix, exclude /usr/bin since it's not a real path.
32798    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32800      # a path prefixed by /cygdrive for fixpath to work.
32801      new_path="$CYGWIN_ROOT_PATH$input_path"
32802    fi
32803  fi
32804
32805  # remove trailing .exe if any
32806  new_path="${new_path/%.exe/}"
32807
32808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32809
32810  # First separate the path from the arguments. This will split at the first
32811  # space.
32812  complete="$AS"
32813  path="${complete%% *}"
32814  tmp="$complete EOL"
32815  arguments="${tmp#* }"
32816
32817  # Input might be given as Windows format, start by converting to
32818  # unix format.
32819  new_path="$path"
32820
32821  windows_path="$new_path"
32822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32823    unix_path=`$CYGPATH -u "$windows_path"`
32824    new_path="$unix_path"
32825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32827    new_path="$unix_path"
32828  fi
32829
32830
32831  # Now try to locate executable using which
32832  new_path=`$WHICH "$new_path" 2> /dev/null`
32833
32834  if test "x$new_path" = x; then
32835    # Oops. Which didn't find the executable.
32836    # The splitting of arguments from the executable at a space might have been incorrect,
32837    # since paths with space are more likely in Windows. Give it another try with the whole
32838    # argument.
32839    path="$complete"
32840    arguments="EOL"
32841    new_path="$path"
32842
32843  windows_path="$new_path"
32844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32845    unix_path=`$CYGPATH -u "$windows_path"`
32846    new_path="$unix_path"
32847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32849    new_path="$unix_path"
32850  fi
32851
32852
32853    new_path=`$WHICH "$new_path" 2> /dev/null`
32854    # bat and cmd files are not always considered executable in MSYS causing which
32855    # to not find them
32856    if test "x$new_path" = x \
32857        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32858        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32859      new_path="$path"
32860
32861  windows_path="$new_path"
32862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32863    unix_path=`$CYGPATH -u "$windows_path"`
32864    new_path="$unix_path"
32865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32867    new_path="$unix_path"
32868  fi
32869
32870    fi
32871
32872    if test "x$new_path" = x; then
32873      # It's still not found. Now this is an unrecoverable error.
32874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32875$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32876      has_space=`$ECHO "$complete" | $GREP " "`
32877      if test "x$has_space" != x; then
32878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32880      fi
32881      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32882    fi
32883  fi
32884
32885  # Now new_path has a complete unix path to the binary
32886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32887    # Keep paths in /bin as-is, but remove trailing .exe if any
32888    new_path="${new_path/%.exe/}"
32889    # Do not save /bin paths to all_fixpath_prefixes!
32890  else
32891    # Not in mixed or Windows style, start by that.
32892    new_path=`cmd //c echo $new_path`
32893
32894  input_path="$new_path"
32895  # Check if we need to convert this using DOS-style short mode. If the path
32896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32897  # take no chances and rewrite it.
32898  # Note: m4 eats our [], so we need to use [ and ] instead.
32899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32900  if test "x$has_forbidden_chars" != x; then
32901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32903  fi
32904
32905    # Output is in $new_path
32906
32907  windows_path="$new_path"
32908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32909    unix_path=`$CYGPATH -u "$windows_path"`
32910    new_path="$unix_path"
32911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32913    new_path="$unix_path"
32914  fi
32915
32916    # remove trailing .exe if any
32917    new_path="${new_path/%.exe/}"
32918
32919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32921  fi
32922
32923    else
32924      # We're on a unix platform. Hooray! :)
32925      # First separate the path from the arguments. This will split at the first
32926      # space.
32927      complete="$AS"
32928      path="${complete%% *}"
32929      tmp="$complete EOL"
32930      arguments="${tmp#* }"
32931
32932      # Cannot rely on the command "which" here since it doesn't always work.
32933      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32934      if test -z "$is_absolute_path"; then
32935        # Path to executable is not absolute. Find it.
32936        IFS_save="$IFS"
32937        IFS=:
32938        for p in $PATH; do
32939          if test -f "$p/$path" && test -x "$p/$path"; then
32940            new_path="$p/$path"
32941            break
32942          fi
32943        done
32944        IFS="$IFS_save"
32945      else
32946        # This is an absolute path, we can use it without further modifications.
32947        new_path="$path"
32948      fi
32949
32950      if test "x$new_path" = x; then
32951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32952$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32953        has_space=`$ECHO "$complete" | $GREP " "`
32954        if test "x$has_space" != x; then
32955          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32957        fi
32958        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32959      fi
32960    fi
32961
32962    # Now join together the path and the arguments once again
32963    if test "x$arguments" != xEOL; then
32964      new_complete="$new_path ${arguments% *}"
32965    else
32966      new_complete="$new_path"
32967    fi
32968
32969    if test "x$complete" != "x$new_complete"; then
32970      AS="$new_complete"
32971      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32972$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32973    fi
32974  fi
32975
32976  else
32977    # FIXME: is this correct for microsoft?
32978    AS="$CC -c"
32979  fi
32980
32981
32982  #
32983  # Setup the archiver (AR)
32984  #
32985  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32986    # The corresponding ar tool is lib.exe (used to create static libraries)
32987    # Extract the first word of "lib", so it can be a program name with args.
32988set dummy lib; ac_word=$2
32989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32990$as_echo_n "checking for $ac_word... " >&6; }
32991if ${ac_cv_prog_AR+:} false; then :
32992  $as_echo_n "(cached) " >&6
32993else
32994  if test -n "$AR"; then
32995  ac_cv_prog_AR="$AR" # Let the user override the test.
32996else
32997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32998for as_dir in $PATH
32999do
33000  IFS=$as_save_IFS
33001  test -z "$as_dir" && as_dir=.
33002    for ac_exec_ext in '' $ac_executable_extensions; do
33003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33004    ac_cv_prog_AR="lib"
33005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33006    break 2
33007  fi
33008done
33009  done
33010IFS=$as_save_IFS
33011
33012fi
33013fi
33014AR=$ac_cv_prog_AR
33015if test -n "$AR"; then
33016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33017$as_echo "$AR" >&6; }
33018else
33019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33020$as_echo "no" >&6; }
33021fi
33022
33023
33024  else
33025
33026
33027  # Publish this variable in the help.
33028
33029
33030  if test "x$AR" = x; then
33031    # The variable is not set by user, try to locate tool using the code snippet
33032    if test -n "$ac_tool_prefix"; then
33033  for ac_prog in ar
33034  do
33035    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33036set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33038$as_echo_n "checking for $ac_word... " >&6; }
33039if ${ac_cv_prog_AR+:} false; then :
33040  $as_echo_n "(cached) " >&6
33041else
33042  if test -n "$AR"; then
33043  ac_cv_prog_AR="$AR" # Let the user override the test.
33044else
33045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33046for as_dir in $PATH
33047do
33048  IFS=$as_save_IFS
33049  test -z "$as_dir" && as_dir=.
33050    for ac_exec_ext in '' $ac_executable_extensions; do
33051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33052    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33054    break 2
33055  fi
33056done
33057  done
33058IFS=$as_save_IFS
33059
33060fi
33061fi
33062AR=$ac_cv_prog_AR
33063if test -n "$AR"; then
33064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33065$as_echo "$AR" >&6; }
33066else
33067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33068$as_echo "no" >&6; }
33069fi
33070
33071
33072    test -n "$AR" && break
33073  done
33074fi
33075if test -z "$AR"; then
33076  ac_ct_AR=$AR
33077  for ac_prog in ar
33078do
33079  # Extract the first word of "$ac_prog", so it can be a program name with args.
33080set dummy $ac_prog; ac_word=$2
33081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33082$as_echo_n "checking for $ac_word... " >&6; }
33083if ${ac_cv_prog_ac_ct_AR+:} false; then :
33084  $as_echo_n "(cached) " >&6
33085else
33086  if test -n "$ac_ct_AR"; then
33087  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33088else
33089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33090for as_dir in $PATH
33091do
33092  IFS=$as_save_IFS
33093  test -z "$as_dir" && as_dir=.
33094    for ac_exec_ext in '' $ac_executable_extensions; do
33095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33096    ac_cv_prog_ac_ct_AR="$ac_prog"
33097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33098    break 2
33099  fi
33100done
33101  done
33102IFS=$as_save_IFS
33103
33104fi
33105fi
33106ac_ct_AR=$ac_cv_prog_ac_ct_AR
33107if test -n "$ac_ct_AR"; then
33108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33109$as_echo "$ac_ct_AR" >&6; }
33110else
33111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33112$as_echo "no" >&6; }
33113fi
33114
33115
33116  test -n "$ac_ct_AR" && break
33117done
33118
33119  if test "x$ac_ct_AR" = x; then
33120    AR=""
33121  else
33122    case $cross_compiling:$ac_tool_warned in
33123yes:)
33124{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33125$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33126ac_tool_warned=yes ;;
33127esac
33128    AR=$ac_ct_AR
33129  fi
33130fi
33131
33132  else
33133    # The variable is set, but is it from the command line or the environment?
33134
33135    # Try to remove the string !AR! from our list.
33136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33138      # If it failed, the variable was not from the command line. Ignore it,
33139      # but warn the user (except for BASH, which is always set by the calling BASH).
33140      if test "xAR" != xBASH; then
33141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33142$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33143      fi
33144      # Try to locate tool using the code snippet
33145      if test -n "$ac_tool_prefix"; then
33146  for ac_prog in ar
33147  do
33148    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33149set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33151$as_echo_n "checking for $ac_word... " >&6; }
33152if ${ac_cv_prog_AR+:} false; then :
33153  $as_echo_n "(cached) " >&6
33154else
33155  if test -n "$AR"; then
33156  ac_cv_prog_AR="$AR" # Let the user override the test.
33157else
33158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33159for as_dir in $PATH
33160do
33161  IFS=$as_save_IFS
33162  test -z "$as_dir" && as_dir=.
33163    for ac_exec_ext in '' $ac_executable_extensions; do
33164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33165    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33167    break 2
33168  fi
33169done
33170  done
33171IFS=$as_save_IFS
33172
33173fi
33174fi
33175AR=$ac_cv_prog_AR
33176if test -n "$AR"; then
33177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33178$as_echo "$AR" >&6; }
33179else
33180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33181$as_echo "no" >&6; }
33182fi
33183
33184
33185    test -n "$AR" && break
33186  done
33187fi
33188if test -z "$AR"; then
33189  ac_ct_AR=$AR
33190  for ac_prog in ar
33191do
33192  # Extract the first word of "$ac_prog", so it can be a program name with args.
33193set dummy $ac_prog; ac_word=$2
33194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33195$as_echo_n "checking for $ac_word... " >&6; }
33196if ${ac_cv_prog_ac_ct_AR+:} false; then :
33197  $as_echo_n "(cached) " >&6
33198else
33199  if test -n "$ac_ct_AR"; then
33200  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33201else
33202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33203for as_dir in $PATH
33204do
33205  IFS=$as_save_IFS
33206  test -z "$as_dir" && as_dir=.
33207    for ac_exec_ext in '' $ac_executable_extensions; do
33208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33209    ac_cv_prog_ac_ct_AR="$ac_prog"
33210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33211    break 2
33212  fi
33213done
33214  done
33215IFS=$as_save_IFS
33216
33217fi
33218fi
33219ac_ct_AR=$ac_cv_prog_ac_ct_AR
33220if test -n "$ac_ct_AR"; then
33221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33222$as_echo "$ac_ct_AR" >&6; }
33223else
33224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33225$as_echo "no" >&6; }
33226fi
33227
33228
33229  test -n "$ac_ct_AR" && break
33230done
33231
33232  if test "x$ac_ct_AR" = x; then
33233    AR=""
33234  else
33235    case $cross_compiling:$ac_tool_warned in
33236yes:)
33237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33239ac_tool_warned=yes ;;
33240esac
33241    AR=$ac_ct_AR
33242  fi
33243fi
33244
33245    else
33246      # If it succeeded, then it was overridden by the user. We will use it
33247      # for the tool.
33248
33249      # First remove it from the list of overridden variables, so we can test
33250      # for unknown variables in the end.
33251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33252
33253      # Check if the provided tool contains a complete path.
33254      tool_specified="$AR"
33255      tool_basename="${tool_specified##*/}"
33256      if test "x$tool_basename" = "x$tool_specified"; then
33257        # A command without a complete path is provided, search $PATH.
33258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33259$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33260        # Extract the first word of "$tool_basename", so it can be a program name with args.
33261set dummy $tool_basename; ac_word=$2
33262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33263$as_echo_n "checking for $ac_word... " >&6; }
33264if ${ac_cv_path_AR+:} false; then :
33265  $as_echo_n "(cached) " >&6
33266else
33267  case $AR in
33268  [\\/]* | ?:[\\/]*)
33269  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33270  ;;
33271  *)
33272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33273for as_dir in $PATH
33274do
33275  IFS=$as_save_IFS
33276  test -z "$as_dir" && as_dir=.
33277    for ac_exec_ext in '' $ac_executable_extensions; do
33278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33279    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33281    break 2
33282  fi
33283done
33284  done
33285IFS=$as_save_IFS
33286
33287  ;;
33288esac
33289fi
33290AR=$ac_cv_path_AR
33291if test -n "$AR"; then
33292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33293$as_echo "$AR" >&6; }
33294else
33295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33296$as_echo "no" >&6; }
33297fi
33298
33299
33300        if test "x$AR" = x; then
33301          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33302        fi
33303      else
33304        # Otherwise we believe it is a complete path. Use it as it is.
33305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33306$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33308$as_echo_n "checking for AR... " >&6; }
33309        if test ! -x "$tool_specified"; then
33310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33311$as_echo "not found" >&6; }
33312          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33313        fi
33314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33315$as_echo "$tool_specified" >&6; }
33316      fi
33317    fi
33318  fi
33319
33320
33321  fi
33322
33323  # Only process if variable expands to non-empty
33324
33325  if test "x$AR" != x; then
33326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33327
33328  # First separate the path from the arguments. This will split at the first
33329  # space.
33330  complete="$AR"
33331  path="${complete%% *}"
33332  tmp="$complete EOL"
33333  arguments="${tmp#* }"
33334
33335  # Input might be given as Windows format, start by converting to
33336  # unix format.
33337  new_path=`$CYGPATH -u "$path"`
33338
33339  # Now try to locate executable using which
33340  new_path=`$WHICH "$new_path" 2> /dev/null`
33341  # bat and cmd files are not always considered executable in cygwin causing which
33342  # to not find them
33343  if test "x$new_path" = x \
33344      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33345      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33346    new_path=`$CYGPATH -u "$path"`
33347  fi
33348  if test "x$new_path" = x; then
33349    # Oops. Which didn't find the executable.
33350    # The splitting of arguments from the executable at a space might have been incorrect,
33351    # since paths with space are more likely in Windows. Give it another try with the whole
33352    # argument.
33353    path="$complete"
33354    arguments="EOL"
33355    new_path=`$CYGPATH -u "$path"`
33356    new_path=`$WHICH "$new_path" 2> /dev/null`
33357    # bat and cmd files are not always considered executable in cygwin causing which
33358    # to not find them
33359    if test "x$new_path" = x \
33360        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33361        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33362      new_path=`$CYGPATH -u "$path"`
33363    fi
33364    if test "x$new_path" = x; then
33365      # It's still not found. Now this is an unrecoverable error.
33366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33367$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33368      has_space=`$ECHO "$complete" | $GREP " "`
33369      if test "x$has_space" != x; then
33370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33372      fi
33373      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33374    fi
33375  fi
33376
33377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33380  # "foo.exe" is OK but "foo" is an error.
33381  #
33382  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33383  # It is also a way to make sure we got the proper file name for the real test later on.
33384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33385  if test "x$test_shortpath" = x; then
33386    # Short path failed, file does not exist as specified.
33387    # Try adding .exe or .cmd
33388    if test -f "${new_path}.exe"; then
33389      input_to_shortpath="${new_path}.exe"
33390    elif test -f "${new_path}.cmd"; then
33391      input_to_shortpath="${new_path}.cmd"
33392    else
33393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33394$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33395      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33396$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33397      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33398    fi
33399  else
33400    input_to_shortpath="$new_path"
33401  fi
33402
33403  # Call helper function which possibly converts this using DOS-style short mode.
33404  # If so, the updated path is stored in $new_path.
33405  new_path="$input_to_shortpath"
33406
33407  input_path="$input_to_shortpath"
33408  # Check if we need to convert this using DOS-style short mode. If the path
33409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33410  # take no chances and rewrite it.
33411  # Note: m4 eats our [], so we need to use [ and ] instead.
33412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33413  if test "x$has_forbidden_chars" != x; then
33414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33418      # Going to short mode and back again did indeed matter. Since short mode is
33419      # case insensitive, let's make it lowercase to improve readability.
33420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33421      # Now convert it back to Unix-style (cygpath)
33422      input_path=`$CYGPATH -u "$shortmode_path"`
33423      new_path="$input_path"
33424    fi
33425  fi
33426
33427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33428  if test "x$test_cygdrive_prefix" = x; then
33429    # As a simple fix, exclude /usr/bin since it's not a real path.
33430    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33432      # a path prefixed by /cygdrive for fixpath to work.
33433      new_path="$CYGWIN_ROOT_PATH$input_path"
33434    fi
33435  fi
33436
33437  # remove trailing .exe if any
33438  new_path="${new_path/%.exe/}"
33439
33440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33441
33442  # First separate the path from the arguments. This will split at the first
33443  # space.
33444  complete="$AR"
33445  path="${complete%% *}"
33446  tmp="$complete EOL"
33447  arguments="${tmp#* }"
33448
33449  # Input might be given as Windows format, start by converting to
33450  # unix format.
33451  new_path="$path"
33452
33453  windows_path="$new_path"
33454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33455    unix_path=`$CYGPATH -u "$windows_path"`
33456    new_path="$unix_path"
33457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33459    new_path="$unix_path"
33460  fi
33461
33462
33463  # Now try to locate executable using which
33464  new_path=`$WHICH "$new_path" 2> /dev/null`
33465
33466  if test "x$new_path" = x; then
33467    # Oops. Which didn't find the executable.
33468    # The splitting of arguments from the executable at a space might have been incorrect,
33469    # since paths with space are more likely in Windows. Give it another try with the whole
33470    # argument.
33471    path="$complete"
33472    arguments="EOL"
33473    new_path="$path"
33474
33475  windows_path="$new_path"
33476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33477    unix_path=`$CYGPATH -u "$windows_path"`
33478    new_path="$unix_path"
33479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33481    new_path="$unix_path"
33482  fi
33483
33484
33485    new_path=`$WHICH "$new_path" 2> /dev/null`
33486    # bat and cmd files are not always considered executable in MSYS causing which
33487    # to not find them
33488    if test "x$new_path" = x \
33489        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33490        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33491      new_path="$path"
33492
33493  windows_path="$new_path"
33494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33495    unix_path=`$CYGPATH -u "$windows_path"`
33496    new_path="$unix_path"
33497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33499    new_path="$unix_path"
33500  fi
33501
33502    fi
33503
33504    if test "x$new_path" = x; then
33505      # It's still not found. Now this is an unrecoverable error.
33506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33507$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33508      has_space=`$ECHO "$complete" | $GREP " "`
33509      if test "x$has_space" != x; then
33510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33512      fi
33513      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33514    fi
33515  fi
33516
33517  # Now new_path has a complete unix path to the binary
33518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33519    # Keep paths in /bin as-is, but remove trailing .exe if any
33520    new_path="${new_path/%.exe/}"
33521    # Do not save /bin paths to all_fixpath_prefixes!
33522  else
33523    # Not in mixed or Windows style, start by that.
33524    new_path=`cmd //c echo $new_path`
33525
33526  input_path="$new_path"
33527  # Check if we need to convert this using DOS-style short mode. If the path
33528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33529  # take no chances and rewrite it.
33530  # Note: m4 eats our [], so we need to use [ and ] instead.
33531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33532  if test "x$has_forbidden_chars" != x; then
33533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33535  fi
33536
33537    # Output is in $new_path
33538
33539  windows_path="$new_path"
33540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33541    unix_path=`$CYGPATH -u "$windows_path"`
33542    new_path="$unix_path"
33543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33545    new_path="$unix_path"
33546  fi
33547
33548    # remove trailing .exe if any
33549    new_path="${new_path/%.exe/}"
33550
33551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33553  fi
33554
33555    else
33556      # We're on a unix platform. Hooray! :)
33557      # First separate the path from the arguments. This will split at the first
33558      # space.
33559      complete="$AR"
33560      path="${complete%% *}"
33561      tmp="$complete EOL"
33562      arguments="${tmp#* }"
33563
33564      # Cannot rely on the command "which" here since it doesn't always work.
33565      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33566      if test -z "$is_absolute_path"; then
33567        # Path to executable is not absolute. Find it.
33568        IFS_save="$IFS"
33569        IFS=:
33570        for p in $PATH; do
33571          if test -f "$p/$path" && test -x "$p/$path"; then
33572            new_path="$p/$path"
33573            break
33574          fi
33575        done
33576        IFS="$IFS_save"
33577      else
33578        # This is an absolute path, we can use it without further modifications.
33579        new_path="$path"
33580      fi
33581
33582      if test "x$new_path" = x; then
33583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33584$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33585        has_space=`$ECHO "$complete" | $GREP " "`
33586        if test "x$has_space" != x; then
33587          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33589        fi
33590        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33591      fi
33592    fi
33593
33594    # Now join together the path and the arguments once again
33595    if test "x$arguments" != xEOL; then
33596      new_complete="$new_path ${arguments% *}"
33597    else
33598      new_complete="$new_path"
33599    fi
33600
33601    if test "x$complete" != "x$new_complete"; then
33602      AR="$new_complete"
33603      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33604$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33605    fi
33606  fi
33607
33608
33609
33610  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33611
33612
33613  # Publish this variable in the help.
33614
33615
33616  if test "x$LIPO" = x; then
33617    # The variable is not set by user, try to locate tool using the code snippet
33618    for ac_prog in lipo
33619do
33620  # Extract the first word of "$ac_prog", so it can be a program name with args.
33621set dummy $ac_prog; ac_word=$2
33622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33623$as_echo_n "checking for $ac_word... " >&6; }
33624if ${ac_cv_path_LIPO+:} false; then :
33625  $as_echo_n "(cached) " >&6
33626else
33627  case $LIPO in
33628  [\\/]* | ?:[\\/]*)
33629  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33630  ;;
33631  *)
33632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33633for as_dir in $PATH
33634do
33635  IFS=$as_save_IFS
33636  test -z "$as_dir" && as_dir=.
33637    for ac_exec_ext in '' $ac_executable_extensions; do
33638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33639    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33641    break 2
33642  fi
33643done
33644  done
33645IFS=$as_save_IFS
33646
33647  ;;
33648esac
33649fi
33650LIPO=$ac_cv_path_LIPO
33651if test -n "$LIPO"; then
33652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33653$as_echo "$LIPO" >&6; }
33654else
33655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33656$as_echo "no" >&6; }
33657fi
33658
33659
33660  test -n "$LIPO" && break
33661done
33662
33663  else
33664    # The variable is set, but is it from the command line or the environment?
33665
33666    # Try to remove the string !LIPO! from our list.
33667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33669      # If it failed, the variable was not from the command line. Ignore it,
33670      # but warn the user (except for BASH, which is always set by the calling BASH).
33671      if test "xLIPO" != xBASH; then
33672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33673$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33674      fi
33675      # Try to locate tool using the code snippet
33676      for ac_prog in lipo
33677do
33678  # Extract the first word of "$ac_prog", so it can be a program name with args.
33679set dummy $ac_prog; ac_word=$2
33680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33681$as_echo_n "checking for $ac_word... " >&6; }
33682if ${ac_cv_path_LIPO+:} false; then :
33683  $as_echo_n "(cached) " >&6
33684else
33685  case $LIPO in
33686  [\\/]* | ?:[\\/]*)
33687  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33688  ;;
33689  *)
33690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33691for as_dir in $PATH
33692do
33693  IFS=$as_save_IFS
33694  test -z "$as_dir" && as_dir=.
33695    for ac_exec_ext in '' $ac_executable_extensions; do
33696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33697    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33699    break 2
33700  fi
33701done
33702  done
33703IFS=$as_save_IFS
33704
33705  ;;
33706esac
33707fi
33708LIPO=$ac_cv_path_LIPO
33709if test -n "$LIPO"; then
33710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33711$as_echo "$LIPO" >&6; }
33712else
33713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33714$as_echo "no" >&6; }
33715fi
33716
33717
33718  test -n "$LIPO" && break
33719done
33720
33721    else
33722      # If it succeeded, then it was overridden by the user. We will use it
33723      # for the tool.
33724
33725      # First remove it from the list of overridden variables, so we can test
33726      # for unknown variables in the end.
33727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33728
33729      # Check if the provided tool contains a complete path.
33730      tool_specified="$LIPO"
33731      tool_basename="${tool_specified##*/}"
33732      if test "x$tool_basename" = "x$tool_specified"; then
33733        # A command without a complete path is provided, search $PATH.
33734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33735$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33736        # Extract the first word of "$tool_basename", so it can be a program name with args.
33737set dummy $tool_basename; ac_word=$2
33738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33739$as_echo_n "checking for $ac_word... " >&6; }
33740if ${ac_cv_path_LIPO+:} false; then :
33741  $as_echo_n "(cached) " >&6
33742else
33743  case $LIPO in
33744  [\\/]* | ?:[\\/]*)
33745  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33746  ;;
33747  *)
33748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33749for as_dir in $PATH
33750do
33751  IFS=$as_save_IFS
33752  test -z "$as_dir" && as_dir=.
33753    for ac_exec_ext in '' $ac_executable_extensions; do
33754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33755    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33757    break 2
33758  fi
33759done
33760  done
33761IFS=$as_save_IFS
33762
33763  ;;
33764esac
33765fi
33766LIPO=$ac_cv_path_LIPO
33767if test -n "$LIPO"; then
33768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33769$as_echo "$LIPO" >&6; }
33770else
33771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33772$as_echo "no" >&6; }
33773fi
33774
33775
33776        if test "x$LIPO" = x; then
33777          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33778        fi
33779      else
33780        # Otherwise we believe it is a complete path. Use it as it is.
33781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33782$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33784$as_echo_n "checking for LIPO... " >&6; }
33785        if test ! -x "$tool_specified"; then
33786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33787$as_echo "not found" >&6; }
33788          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33789        fi
33790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33791$as_echo "$tool_specified" >&6; }
33792      fi
33793    fi
33794  fi
33795
33796
33797
33798  # Only process if variable expands to non-empty
33799
33800  if test "x$LIPO" != x; then
33801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33802
33803  # First separate the path from the arguments. This will split at the first
33804  # space.
33805  complete="$LIPO"
33806  path="${complete%% *}"
33807  tmp="$complete EOL"
33808  arguments="${tmp#* }"
33809
33810  # Input might be given as Windows format, start by converting to
33811  # unix format.
33812  new_path=`$CYGPATH -u "$path"`
33813
33814  # Now try to locate executable using which
33815  new_path=`$WHICH "$new_path" 2> /dev/null`
33816  # bat and cmd files are not always considered executable in cygwin causing which
33817  # to not find them
33818  if test "x$new_path" = x \
33819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33821    new_path=`$CYGPATH -u "$path"`
33822  fi
33823  if test "x$new_path" = x; then
33824    # Oops. Which didn't find the executable.
33825    # The splitting of arguments from the executable at a space might have been incorrect,
33826    # since paths with space are more likely in Windows. Give it another try with the whole
33827    # argument.
33828    path="$complete"
33829    arguments="EOL"
33830    new_path=`$CYGPATH -u "$path"`
33831    new_path=`$WHICH "$new_path" 2> /dev/null`
33832    # bat and cmd files are not always considered executable in cygwin causing which
33833    # to not find them
33834    if test "x$new_path" = x \
33835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33837      new_path=`$CYGPATH -u "$path"`
33838    fi
33839    if test "x$new_path" = x; then
33840      # It's still not found. Now this is an unrecoverable error.
33841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33842$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33843      has_space=`$ECHO "$complete" | $GREP " "`
33844      if test "x$has_space" != x; then
33845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33847      fi
33848      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33849    fi
33850  fi
33851
33852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33855  # "foo.exe" is OK but "foo" is an error.
33856  #
33857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33858  # It is also a way to make sure we got the proper file name for the real test later on.
33859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33860  if test "x$test_shortpath" = x; then
33861    # Short path failed, file does not exist as specified.
33862    # Try adding .exe or .cmd
33863    if test -f "${new_path}.exe"; then
33864      input_to_shortpath="${new_path}.exe"
33865    elif test -f "${new_path}.cmd"; then
33866      input_to_shortpath="${new_path}.cmd"
33867    else
33868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33869$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33872      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33873    fi
33874  else
33875    input_to_shortpath="$new_path"
33876  fi
33877
33878  # Call helper function which possibly converts this using DOS-style short mode.
33879  # If so, the updated path is stored in $new_path.
33880  new_path="$input_to_shortpath"
33881
33882  input_path="$input_to_shortpath"
33883  # Check if we need to convert this using DOS-style short mode. If the path
33884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33885  # take no chances and rewrite it.
33886  # Note: m4 eats our [], so we need to use [ and ] instead.
33887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33888  if test "x$has_forbidden_chars" != x; then
33889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33893      # Going to short mode and back again did indeed matter. Since short mode is
33894      # case insensitive, let's make it lowercase to improve readability.
33895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33896      # Now convert it back to Unix-style (cygpath)
33897      input_path=`$CYGPATH -u "$shortmode_path"`
33898      new_path="$input_path"
33899    fi
33900  fi
33901
33902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33903  if test "x$test_cygdrive_prefix" = x; then
33904    # As a simple fix, exclude /usr/bin since it's not a real path.
33905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33907      # a path prefixed by /cygdrive for fixpath to work.
33908      new_path="$CYGWIN_ROOT_PATH$input_path"
33909    fi
33910  fi
33911
33912  # remove trailing .exe if any
33913  new_path="${new_path/%.exe/}"
33914
33915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33916
33917  # First separate the path from the arguments. This will split at the first
33918  # space.
33919  complete="$LIPO"
33920  path="${complete%% *}"
33921  tmp="$complete EOL"
33922  arguments="${tmp#* }"
33923
33924  # Input might be given as Windows format, start by converting to
33925  # unix format.
33926  new_path="$path"
33927
33928  windows_path="$new_path"
33929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33930    unix_path=`$CYGPATH -u "$windows_path"`
33931    new_path="$unix_path"
33932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33934    new_path="$unix_path"
33935  fi
33936
33937
33938  # Now try to locate executable using which
33939  new_path=`$WHICH "$new_path" 2> /dev/null`
33940
33941  if test "x$new_path" = x; then
33942    # Oops. Which didn't find the executable.
33943    # The splitting of arguments from the executable at a space might have been incorrect,
33944    # since paths with space are more likely in Windows. Give it another try with the whole
33945    # argument.
33946    path="$complete"
33947    arguments="EOL"
33948    new_path="$path"
33949
33950  windows_path="$new_path"
33951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33952    unix_path=`$CYGPATH -u "$windows_path"`
33953    new_path="$unix_path"
33954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33956    new_path="$unix_path"
33957  fi
33958
33959
33960    new_path=`$WHICH "$new_path" 2> /dev/null`
33961    # bat and cmd files are not always considered executable in MSYS causing which
33962    # to not find them
33963    if test "x$new_path" = x \
33964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33966      new_path="$path"
33967
33968  windows_path="$new_path"
33969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33970    unix_path=`$CYGPATH -u "$windows_path"`
33971    new_path="$unix_path"
33972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33974    new_path="$unix_path"
33975  fi
33976
33977    fi
33978
33979    if test "x$new_path" = x; then
33980      # It's still not found. Now this is an unrecoverable error.
33981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33982$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33983      has_space=`$ECHO "$complete" | $GREP " "`
33984      if test "x$has_space" != x; then
33985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33987      fi
33988      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33989    fi
33990  fi
33991
33992  # Now new_path has a complete unix path to the binary
33993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33994    # Keep paths in /bin as-is, but remove trailing .exe if any
33995    new_path="${new_path/%.exe/}"
33996    # Do not save /bin paths to all_fixpath_prefixes!
33997  else
33998    # Not in mixed or Windows style, start by that.
33999    new_path=`cmd //c echo $new_path`
34000
34001  input_path="$new_path"
34002  # Check if we need to convert this using DOS-style short mode. If the path
34003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34004  # take no chances and rewrite it.
34005  # Note: m4 eats our [], so we need to use [ and ] instead.
34006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34007  if test "x$has_forbidden_chars" != x; then
34008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34010  fi
34011
34012    # Output is in $new_path
34013
34014  windows_path="$new_path"
34015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34016    unix_path=`$CYGPATH -u "$windows_path"`
34017    new_path="$unix_path"
34018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34020    new_path="$unix_path"
34021  fi
34022
34023    # remove trailing .exe if any
34024    new_path="${new_path/%.exe/}"
34025
34026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34028  fi
34029
34030    else
34031      # We're on a unix platform. Hooray! :)
34032      # First separate the path from the arguments. This will split at the first
34033      # space.
34034      complete="$LIPO"
34035      path="${complete%% *}"
34036      tmp="$complete EOL"
34037      arguments="${tmp#* }"
34038
34039      # Cannot rely on the command "which" here since it doesn't always work.
34040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34041      if test -z "$is_absolute_path"; then
34042        # Path to executable is not absolute. Find it.
34043        IFS_save="$IFS"
34044        IFS=:
34045        for p in $PATH; do
34046          if test -f "$p/$path" && test -x "$p/$path"; then
34047            new_path="$p/$path"
34048            break
34049          fi
34050        done
34051        IFS="$IFS_save"
34052      else
34053        # This is an absolute path, we can use it without further modifications.
34054        new_path="$path"
34055      fi
34056
34057      if test "x$new_path" = x; then
34058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34059$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34060        has_space=`$ECHO "$complete" | $GREP " "`
34061        if test "x$has_space" != x; then
34062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34064        fi
34065        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34066      fi
34067    fi
34068
34069    # Now join together the path and the arguments once again
34070    if test "x$arguments" != xEOL; then
34071      new_complete="$new_path ${arguments% *}"
34072    else
34073      new_complete="$new_path"
34074    fi
34075
34076    if test "x$complete" != "x$new_complete"; then
34077      LIPO="$new_complete"
34078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34079$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34080    fi
34081  fi
34082
34083  fi
34084
34085  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34086    # Extract the first word of "mt", so it can be a program name with args.
34087set dummy mt; ac_word=$2
34088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34089$as_echo_n "checking for $ac_word... " >&6; }
34090if ${ac_cv_prog_MT+:} false; then :
34091  $as_echo_n "(cached) " >&6
34092else
34093  if test -n "$MT"; then
34094  ac_cv_prog_MT="$MT" # Let the user override the test.
34095else
34096  ac_prog_rejected=no
34097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34098for as_dir in $PATH
34099do
34100  IFS=$as_save_IFS
34101  test -z "$as_dir" && as_dir=.
34102    for ac_exec_ext in '' $ac_executable_extensions; do
34103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34104    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34105       ac_prog_rejected=yes
34106       continue
34107     fi
34108    ac_cv_prog_MT="mt"
34109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34110    break 2
34111  fi
34112done
34113  done
34114IFS=$as_save_IFS
34115
34116if test $ac_prog_rejected = yes; then
34117  # We found a bogon in the path, so make sure we never use it.
34118  set dummy $ac_cv_prog_MT
34119  shift
34120  if test $# != 0; then
34121    # We chose a different compiler from the bogus one.
34122    # However, it has the same basename, so the bogon will be chosen
34123    # first if we set MT to just the basename; use the full file name.
34124    shift
34125    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34126  fi
34127fi
34128fi
34129fi
34130MT=$ac_cv_prog_MT
34131if test -n "$MT"; then
34132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34133$as_echo "$MT" >&6; }
34134else
34135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34136$as_echo "no" >&6; }
34137fi
34138
34139
34140
34141  # Only process if variable expands to non-empty
34142
34143  if test "x$MT" != x; then
34144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34145
34146  # First separate the path from the arguments. This will split at the first
34147  # space.
34148  complete="$MT"
34149  path="${complete%% *}"
34150  tmp="$complete EOL"
34151  arguments="${tmp#* }"
34152
34153  # Input might be given as Windows format, start by converting to
34154  # unix format.
34155  new_path=`$CYGPATH -u "$path"`
34156
34157  # Now try to locate executable using which
34158  new_path=`$WHICH "$new_path" 2> /dev/null`
34159  # bat and cmd files are not always considered executable in cygwin causing which
34160  # to not find them
34161  if test "x$new_path" = x \
34162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34164    new_path=`$CYGPATH -u "$path"`
34165  fi
34166  if test "x$new_path" = x; then
34167    # Oops. Which didn't find the executable.
34168    # The splitting of arguments from the executable at a space might have been incorrect,
34169    # since paths with space are more likely in Windows. Give it another try with the whole
34170    # argument.
34171    path="$complete"
34172    arguments="EOL"
34173    new_path=`$CYGPATH -u "$path"`
34174    new_path=`$WHICH "$new_path" 2> /dev/null`
34175    # bat and cmd files are not always considered executable in cygwin causing which
34176    # to not find them
34177    if test "x$new_path" = x \
34178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34180      new_path=`$CYGPATH -u "$path"`
34181    fi
34182    if test "x$new_path" = x; then
34183      # It's still not found. Now this is an unrecoverable error.
34184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34185$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34186      has_space=`$ECHO "$complete" | $GREP " "`
34187      if test "x$has_space" != x; then
34188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34190      fi
34191      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34192    fi
34193  fi
34194
34195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34198  # "foo.exe" is OK but "foo" is an error.
34199  #
34200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34201  # It is also a way to make sure we got the proper file name for the real test later on.
34202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34203  if test "x$test_shortpath" = x; then
34204    # Short path failed, file does not exist as specified.
34205    # Try adding .exe or .cmd
34206    if test -f "${new_path}.exe"; then
34207      input_to_shortpath="${new_path}.exe"
34208    elif test -f "${new_path}.cmd"; then
34209      input_to_shortpath="${new_path}.cmd"
34210    else
34211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34212$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34215      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34216    fi
34217  else
34218    input_to_shortpath="$new_path"
34219  fi
34220
34221  # Call helper function which possibly converts this using DOS-style short mode.
34222  # If so, the updated path is stored in $new_path.
34223  new_path="$input_to_shortpath"
34224
34225  input_path="$input_to_shortpath"
34226  # Check if we need to convert this using DOS-style short mode. If the path
34227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34228  # take no chances and rewrite it.
34229  # Note: m4 eats our [], so we need to use [ and ] instead.
34230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34231  if test "x$has_forbidden_chars" != x; then
34232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34236      # Going to short mode and back again did indeed matter. Since short mode is
34237      # case insensitive, let's make it lowercase to improve readability.
34238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34239      # Now convert it back to Unix-style (cygpath)
34240      input_path=`$CYGPATH -u "$shortmode_path"`
34241      new_path="$input_path"
34242    fi
34243  fi
34244
34245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34246  if test "x$test_cygdrive_prefix" = x; then
34247    # As a simple fix, exclude /usr/bin since it's not a real path.
34248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34250      # a path prefixed by /cygdrive for fixpath to work.
34251      new_path="$CYGWIN_ROOT_PATH$input_path"
34252    fi
34253  fi
34254
34255  # remove trailing .exe if any
34256  new_path="${new_path/%.exe/}"
34257
34258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34259
34260  # First separate the path from the arguments. This will split at the first
34261  # space.
34262  complete="$MT"
34263  path="${complete%% *}"
34264  tmp="$complete EOL"
34265  arguments="${tmp#* }"
34266
34267  # Input might be given as Windows format, start by converting to
34268  # unix format.
34269  new_path="$path"
34270
34271  windows_path="$new_path"
34272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34273    unix_path=`$CYGPATH -u "$windows_path"`
34274    new_path="$unix_path"
34275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34277    new_path="$unix_path"
34278  fi
34279
34280
34281  # Now try to locate executable using which
34282  new_path=`$WHICH "$new_path" 2> /dev/null`
34283
34284  if test "x$new_path" = x; then
34285    # Oops. Which didn't find the executable.
34286    # The splitting of arguments from the executable at a space might have been incorrect,
34287    # since paths with space are more likely in Windows. Give it another try with the whole
34288    # argument.
34289    path="$complete"
34290    arguments="EOL"
34291    new_path="$path"
34292
34293  windows_path="$new_path"
34294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34295    unix_path=`$CYGPATH -u "$windows_path"`
34296    new_path="$unix_path"
34297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34299    new_path="$unix_path"
34300  fi
34301
34302
34303    new_path=`$WHICH "$new_path" 2> /dev/null`
34304    # bat and cmd files are not always considered executable in MSYS causing which
34305    # to not find them
34306    if test "x$new_path" = x \
34307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34309      new_path="$path"
34310
34311  windows_path="$new_path"
34312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34313    unix_path=`$CYGPATH -u "$windows_path"`
34314    new_path="$unix_path"
34315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34317    new_path="$unix_path"
34318  fi
34319
34320    fi
34321
34322    if test "x$new_path" = x; then
34323      # It's still not found. Now this is an unrecoverable error.
34324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34325$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34326      has_space=`$ECHO "$complete" | $GREP " "`
34327      if test "x$has_space" != x; then
34328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34330      fi
34331      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34332    fi
34333  fi
34334
34335  # Now new_path has a complete unix path to the binary
34336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34337    # Keep paths in /bin as-is, but remove trailing .exe if any
34338    new_path="${new_path/%.exe/}"
34339    # Do not save /bin paths to all_fixpath_prefixes!
34340  else
34341    # Not in mixed or Windows style, start by that.
34342    new_path=`cmd //c echo $new_path`
34343
34344  input_path="$new_path"
34345  # Check if we need to convert this using DOS-style short mode. If the path
34346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34347  # take no chances and rewrite it.
34348  # Note: m4 eats our [], so we need to use [ and ] instead.
34349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34350  if test "x$has_forbidden_chars" != x; then
34351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34353  fi
34354
34355    # Output is in $new_path
34356
34357  windows_path="$new_path"
34358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34359    unix_path=`$CYGPATH -u "$windows_path"`
34360    new_path="$unix_path"
34361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34363    new_path="$unix_path"
34364  fi
34365
34366    # remove trailing .exe if any
34367    new_path="${new_path/%.exe/}"
34368
34369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34371  fi
34372
34373    else
34374      # We're on a unix platform. Hooray! :)
34375      # First separate the path from the arguments. This will split at the first
34376      # space.
34377      complete="$MT"
34378      path="${complete%% *}"
34379      tmp="$complete EOL"
34380      arguments="${tmp#* }"
34381
34382      # Cannot rely on the command "which" here since it doesn't always work.
34383      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34384      if test -z "$is_absolute_path"; then
34385        # Path to executable is not absolute. Find it.
34386        IFS_save="$IFS"
34387        IFS=:
34388        for p in $PATH; do
34389          if test -f "$p/$path" && test -x "$p/$path"; then
34390            new_path="$p/$path"
34391            break
34392          fi
34393        done
34394        IFS="$IFS_save"
34395      else
34396        # This is an absolute path, we can use it without further modifications.
34397        new_path="$path"
34398      fi
34399
34400      if test "x$new_path" = x; then
34401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34402$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34403        has_space=`$ECHO "$complete" | $GREP " "`
34404        if test "x$has_space" != x; then
34405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34407        fi
34408        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34409      fi
34410    fi
34411
34412    # Now join together the path and the arguments once again
34413    if test "x$arguments" != xEOL; then
34414      new_complete="$new_path ${arguments% *}"
34415    else
34416      new_complete="$new_path"
34417    fi
34418
34419    if test "x$complete" != "x$new_complete"; then
34420      MT="$new_complete"
34421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34422$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34423    fi
34424  fi
34425
34426    # Setup the resource compiler (RC)
34427    # Extract the first word of "rc", so it can be a program name with args.
34428set dummy rc; ac_word=$2
34429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34430$as_echo_n "checking for $ac_word... " >&6; }
34431if ${ac_cv_prog_RC+:} false; then :
34432  $as_echo_n "(cached) " >&6
34433else
34434  if test -n "$RC"; then
34435  ac_cv_prog_RC="$RC" # Let the user override the test.
34436else
34437  ac_prog_rejected=no
34438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34439for as_dir in $PATH
34440do
34441  IFS=$as_save_IFS
34442  test -z "$as_dir" && as_dir=.
34443    for ac_exec_ext in '' $ac_executable_extensions; do
34444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34445    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34446       ac_prog_rejected=yes
34447       continue
34448     fi
34449    ac_cv_prog_RC="rc"
34450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34451    break 2
34452  fi
34453done
34454  done
34455IFS=$as_save_IFS
34456
34457if test $ac_prog_rejected = yes; then
34458  # We found a bogon in the path, so make sure we never use it.
34459  set dummy $ac_cv_prog_RC
34460  shift
34461  if test $# != 0; then
34462    # We chose a different compiler from the bogus one.
34463    # However, it has the same basename, so the bogon will be chosen
34464    # first if we set RC to just the basename; use the full file name.
34465    shift
34466    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34467  fi
34468fi
34469fi
34470fi
34471RC=$ac_cv_prog_RC
34472if test -n "$RC"; then
34473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34474$as_echo "$RC" >&6; }
34475else
34476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34477$as_echo "no" >&6; }
34478fi
34479
34480
34481
34482  # Only process if variable expands to non-empty
34483
34484  if test "x$RC" != x; then
34485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34486
34487  # First separate the path from the arguments. This will split at the first
34488  # space.
34489  complete="$RC"
34490  path="${complete%% *}"
34491  tmp="$complete EOL"
34492  arguments="${tmp#* }"
34493
34494  # Input might be given as Windows format, start by converting to
34495  # unix format.
34496  new_path=`$CYGPATH -u "$path"`
34497
34498  # Now try to locate executable using which
34499  new_path=`$WHICH "$new_path" 2> /dev/null`
34500  # bat and cmd files are not always considered executable in cygwin causing which
34501  # to not find them
34502  if test "x$new_path" = x \
34503      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34504      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34505    new_path=`$CYGPATH -u "$path"`
34506  fi
34507  if test "x$new_path" = x; then
34508    # Oops. Which didn't find the executable.
34509    # The splitting of arguments from the executable at a space might have been incorrect,
34510    # since paths with space are more likely in Windows. Give it another try with the whole
34511    # argument.
34512    path="$complete"
34513    arguments="EOL"
34514    new_path=`$CYGPATH -u "$path"`
34515    new_path=`$WHICH "$new_path" 2> /dev/null`
34516    # bat and cmd files are not always considered executable in cygwin causing which
34517    # to not find them
34518    if test "x$new_path" = x \
34519        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34520        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34521      new_path=`$CYGPATH -u "$path"`
34522    fi
34523    if test "x$new_path" = x; then
34524      # It's still not found. Now this is an unrecoverable error.
34525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34526$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34527      has_space=`$ECHO "$complete" | $GREP " "`
34528      if test "x$has_space" != x; then
34529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34531      fi
34532      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34533    fi
34534  fi
34535
34536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34539  # "foo.exe" is OK but "foo" is an error.
34540  #
34541  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34542  # It is also a way to make sure we got the proper file name for the real test later on.
34543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34544  if test "x$test_shortpath" = x; then
34545    # Short path failed, file does not exist as specified.
34546    # Try adding .exe or .cmd
34547    if test -f "${new_path}.exe"; then
34548      input_to_shortpath="${new_path}.exe"
34549    elif test -f "${new_path}.cmd"; then
34550      input_to_shortpath="${new_path}.cmd"
34551    else
34552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34553$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34554      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34555$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34556      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34557    fi
34558  else
34559    input_to_shortpath="$new_path"
34560  fi
34561
34562  # Call helper function which possibly converts this using DOS-style short mode.
34563  # If so, the updated path is stored in $new_path.
34564  new_path="$input_to_shortpath"
34565
34566  input_path="$input_to_shortpath"
34567  # Check if we need to convert this using DOS-style short mode. If the path
34568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34569  # take no chances and rewrite it.
34570  # Note: m4 eats our [], so we need to use [ and ] instead.
34571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34572  if test "x$has_forbidden_chars" != x; then
34573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34577      # Going to short mode and back again did indeed matter. Since short mode is
34578      # case insensitive, let's make it lowercase to improve readability.
34579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34580      # Now convert it back to Unix-style (cygpath)
34581      input_path=`$CYGPATH -u "$shortmode_path"`
34582      new_path="$input_path"
34583    fi
34584  fi
34585
34586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34587  if test "x$test_cygdrive_prefix" = x; then
34588    # As a simple fix, exclude /usr/bin since it's not a real path.
34589    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34591      # a path prefixed by /cygdrive for fixpath to work.
34592      new_path="$CYGWIN_ROOT_PATH$input_path"
34593    fi
34594  fi
34595
34596  # remove trailing .exe if any
34597  new_path="${new_path/%.exe/}"
34598
34599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34600
34601  # First separate the path from the arguments. This will split at the first
34602  # space.
34603  complete="$RC"
34604  path="${complete%% *}"
34605  tmp="$complete EOL"
34606  arguments="${tmp#* }"
34607
34608  # Input might be given as Windows format, start by converting to
34609  # unix format.
34610  new_path="$path"
34611
34612  windows_path="$new_path"
34613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34614    unix_path=`$CYGPATH -u "$windows_path"`
34615    new_path="$unix_path"
34616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34618    new_path="$unix_path"
34619  fi
34620
34621
34622  # Now try to locate executable using which
34623  new_path=`$WHICH "$new_path" 2> /dev/null`
34624
34625  if test "x$new_path" = x; then
34626    # Oops. Which didn't find the executable.
34627    # The splitting of arguments from the executable at a space might have been incorrect,
34628    # since paths with space are more likely in Windows. Give it another try with the whole
34629    # argument.
34630    path="$complete"
34631    arguments="EOL"
34632    new_path="$path"
34633
34634  windows_path="$new_path"
34635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34636    unix_path=`$CYGPATH -u "$windows_path"`
34637    new_path="$unix_path"
34638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34640    new_path="$unix_path"
34641  fi
34642
34643
34644    new_path=`$WHICH "$new_path" 2> /dev/null`
34645    # bat and cmd files are not always considered executable in MSYS causing which
34646    # to not find them
34647    if test "x$new_path" = x \
34648        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34649        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34650      new_path="$path"
34651
34652  windows_path="$new_path"
34653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34654    unix_path=`$CYGPATH -u "$windows_path"`
34655    new_path="$unix_path"
34656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34658    new_path="$unix_path"
34659  fi
34660
34661    fi
34662
34663    if test "x$new_path" = x; then
34664      # It's still not found. Now this is an unrecoverable error.
34665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34666$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34667      has_space=`$ECHO "$complete" | $GREP " "`
34668      if test "x$has_space" != x; then
34669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34671      fi
34672      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34673    fi
34674  fi
34675
34676  # Now new_path has a complete unix path to the binary
34677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34678    # Keep paths in /bin as-is, but remove trailing .exe if any
34679    new_path="${new_path/%.exe/}"
34680    # Do not save /bin paths to all_fixpath_prefixes!
34681  else
34682    # Not in mixed or Windows style, start by that.
34683    new_path=`cmd //c echo $new_path`
34684
34685  input_path="$new_path"
34686  # Check if we need to convert this using DOS-style short mode. If the path
34687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34688  # take no chances and rewrite it.
34689  # Note: m4 eats our [], so we need to use [ and ] instead.
34690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34691  if test "x$has_forbidden_chars" != x; then
34692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34694  fi
34695
34696    # Output is in $new_path
34697
34698  windows_path="$new_path"
34699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34700    unix_path=`$CYGPATH -u "$windows_path"`
34701    new_path="$unix_path"
34702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34704    new_path="$unix_path"
34705  fi
34706
34707    # remove trailing .exe if any
34708    new_path="${new_path/%.exe/}"
34709
34710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34712  fi
34713
34714    else
34715      # We're on a unix platform. Hooray! :)
34716      # First separate the path from the arguments. This will split at the first
34717      # space.
34718      complete="$RC"
34719      path="${complete%% *}"
34720      tmp="$complete EOL"
34721      arguments="${tmp#* }"
34722
34723      # Cannot rely on the command "which" here since it doesn't always work.
34724      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34725      if test -z "$is_absolute_path"; then
34726        # Path to executable is not absolute. Find it.
34727        IFS_save="$IFS"
34728        IFS=:
34729        for p in $PATH; do
34730          if test -f "$p/$path" && test -x "$p/$path"; then
34731            new_path="$p/$path"
34732            break
34733          fi
34734        done
34735        IFS="$IFS_save"
34736      else
34737        # This is an absolute path, we can use it without further modifications.
34738        new_path="$path"
34739      fi
34740
34741      if test "x$new_path" = x; then
34742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34743$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34744        has_space=`$ECHO "$complete" | $GREP " "`
34745        if test "x$has_space" != x; then
34746          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34747$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34748        fi
34749        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34750      fi
34751    fi
34752
34753    # Now join together the path and the arguments once again
34754    if test "x$arguments" != xEOL; then
34755      new_complete="$new_path ${arguments% *}"
34756    else
34757      new_complete="$new_path"
34758    fi
34759
34760    if test "x$complete" != "x$new_complete"; then
34761      RC="$new_complete"
34762      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34763$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34764    fi
34765  fi
34766
34767    # Extract the first word of "dumpbin", so it can be a program name with args.
34768set dummy dumpbin; ac_word=$2
34769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34770$as_echo_n "checking for $ac_word... " >&6; }
34771if ${ac_cv_prog_DUMPBIN+:} false; then :
34772  $as_echo_n "(cached) " >&6
34773else
34774  if test -n "$DUMPBIN"; then
34775  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34776else
34777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34778for as_dir in $PATH
34779do
34780  IFS=$as_save_IFS
34781  test -z "$as_dir" && as_dir=.
34782    for ac_exec_ext in '' $ac_executable_extensions; do
34783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34784    ac_cv_prog_DUMPBIN="dumpbin"
34785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34786    break 2
34787  fi
34788done
34789  done
34790IFS=$as_save_IFS
34791
34792fi
34793fi
34794DUMPBIN=$ac_cv_prog_DUMPBIN
34795if test -n "$DUMPBIN"; then
34796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34797$as_echo "$DUMPBIN" >&6; }
34798else
34799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34800$as_echo "no" >&6; }
34801fi
34802
34803
34804
34805  # Only process if variable expands to non-empty
34806
34807  if test "x$DUMPBIN" != x; then
34808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34809
34810  # First separate the path from the arguments. This will split at the first
34811  # space.
34812  complete="$DUMPBIN"
34813  path="${complete%% *}"
34814  tmp="$complete EOL"
34815  arguments="${tmp#* }"
34816
34817  # Input might be given as Windows format, start by converting to
34818  # unix format.
34819  new_path=`$CYGPATH -u "$path"`
34820
34821  # Now try to locate executable using which
34822  new_path=`$WHICH "$new_path" 2> /dev/null`
34823  # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
34829  fi
34830  if test "x$new_path" = x; then
34831    # Oops. Which didn't find the executable.
34832    # The splitting of arguments from the executable at a space might have been incorrect,
34833    # since paths with space are more likely in Windows. Give it another try with the whole
34834    # argument.
34835    path="$complete"
34836    arguments="EOL"
34837    new_path=`$CYGPATH -u "$path"`
34838    new_path=`$WHICH "$new_path" 2> /dev/null`
34839    # bat and cmd files are not always considered executable in cygwin causing which
34840    # to not find them
34841    if test "x$new_path" = x \
34842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34844      new_path=`$CYGPATH -u "$path"`
34845    fi
34846    if test "x$new_path" = x; then
34847      # It's still not found. Now this is an unrecoverable error.
34848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34849$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34850      has_space=`$ECHO "$complete" | $GREP " "`
34851      if test "x$has_space" != x; then
34852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34854      fi
34855      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34856    fi
34857  fi
34858
34859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34862  # "foo.exe" is OK but "foo" is an error.
34863  #
34864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34865  # It is also a way to make sure we got the proper file name for the real test later on.
34866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34867  if test "x$test_shortpath" = x; then
34868    # Short path failed, file does not exist as specified.
34869    # Try adding .exe or .cmd
34870    if test -f "${new_path}.exe"; then
34871      input_to_shortpath="${new_path}.exe"
34872    elif test -f "${new_path}.cmd"; then
34873      input_to_shortpath="${new_path}.cmd"
34874    else
34875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34876$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34879      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34880    fi
34881  else
34882    input_to_shortpath="$new_path"
34883  fi
34884
34885  # Call helper function which possibly converts this using DOS-style short mode.
34886  # If so, the updated path is stored in $new_path.
34887  new_path="$input_to_shortpath"
34888
34889  input_path="$input_to_shortpath"
34890  # Check if we need to convert this using DOS-style short mode. If the path
34891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34892  # take no chances and rewrite it.
34893  # Note: m4 eats our [], so we need to use [ and ] instead.
34894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34895  if test "x$has_forbidden_chars" != x; then
34896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34900      # Going to short mode and back again did indeed matter. Since short mode is
34901      # case insensitive, let's make it lowercase to improve readability.
34902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34903      # Now convert it back to Unix-style (cygpath)
34904      input_path=`$CYGPATH -u "$shortmode_path"`
34905      new_path="$input_path"
34906    fi
34907  fi
34908
34909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34910  if test "x$test_cygdrive_prefix" = x; then
34911    # As a simple fix, exclude /usr/bin since it's not a real path.
34912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34914      # a path prefixed by /cygdrive for fixpath to work.
34915      new_path="$CYGWIN_ROOT_PATH$input_path"
34916    fi
34917  fi
34918
34919  # remove trailing .exe if any
34920  new_path="${new_path/%.exe/}"
34921
34922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34923
34924  # First separate the path from the arguments. This will split at the first
34925  # space.
34926  complete="$DUMPBIN"
34927  path="${complete%% *}"
34928  tmp="$complete EOL"
34929  arguments="${tmp#* }"
34930
34931  # Input might be given as Windows format, start by converting to
34932  # unix format.
34933  new_path="$path"
34934
34935  windows_path="$new_path"
34936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34937    unix_path=`$CYGPATH -u "$windows_path"`
34938    new_path="$unix_path"
34939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34941    new_path="$unix_path"
34942  fi
34943
34944
34945  # Now try to locate executable using which
34946  new_path=`$WHICH "$new_path" 2> /dev/null`
34947
34948  if test "x$new_path" = x; then
34949    # Oops. Which didn't find the executable.
34950    # The splitting of arguments from the executable at a space might have been incorrect,
34951    # since paths with space are more likely in Windows. Give it another try with the whole
34952    # argument.
34953    path="$complete"
34954    arguments="EOL"
34955    new_path="$path"
34956
34957  windows_path="$new_path"
34958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34959    unix_path=`$CYGPATH -u "$windows_path"`
34960    new_path="$unix_path"
34961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34963    new_path="$unix_path"
34964  fi
34965
34966
34967    new_path=`$WHICH "$new_path" 2> /dev/null`
34968    # bat and cmd files are not always considered executable in MSYS causing which
34969    # to not find them
34970    if test "x$new_path" = x \
34971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34973      new_path="$path"
34974
34975  windows_path="$new_path"
34976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34977    unix_path=`$CYGPATH -u "$windows_path"`
34978    new_path="$unix_path"
34979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34981    new_path="$unix_path"
34982  fi
34983
34984    fi
34985
34986    if test "x$new_path" = x; then
34987      # It's still not found. Now this is an unrecoverable error.
34988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34989$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34990      has_space=`$ECHO "$complete" | $GREP " "`
34991      if test "x$has_space" != x; then
34992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34994      fi
34995      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34996    fi
34997  fi
34998
34999  # Now new_path has a complete unix path to the binary
35000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35001    # Keep paths in /bin as-is, but remove trailing .exe if any
35002    new_path="${new_path/%.exe/}"
35003    # Do not save /bin paths to all_fixpath_prefixes!
35004  else
35005    # Not in mixed or Windows style, start by that.
35006    new_path=`cmd //c echo $new_path`
35007
35008  input_path="$new_path"
35009  # Check if we need to convert this using DOS-style short mode. If the path
35010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35011  # take no chances and rewrite it.
35012  # Note: m4 eats our [], so we need to use [ and ] instead.
35013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35014  if test "x$has_forbidden_chars" != x; then
35015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35017  fi
35018
35019    # Output is in $new_path
35020
35021  windows_path="$new_path"
35022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35023    unix_path=`$CYGPATH -u "$windows_path"`
35024    new_path="$unix_path"
35025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35027    new_path="$unix_path"
35028  fi
35029
35030    # remove trailing .exe if any
35031    new_path="${new_path/%.exe/}"
35032
35033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35035  fi
35036
35037    else
35038      # We're on a unix platform. Hooray! :)
35039      # First separate the path from the arguments. This will split at the first
35040      # space.
35041      complete="$DUMPBIN"
35042      path="${complete%% *}"
35043      tmp="$complete EOL"
35044      arguments="${tmp#* }"
35045
35046      # Cannot rely on the command "which" here since it doesn't always work.
35047      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35048      if test -z "$is_absolute_path"; then
35049        # Path to executable is not absolute. Find it.
35050        IFS_save="$IFS"
35051        IFS=:
35052        for p in $PATH; do
35053          if test -f "$p/$path" && test -x "$p/$path"; then
35054            new_path="$p/$path"
35055            break
35056          fi
35057        done
35058        IFS="$IFS_save"
35059      else
35060        # This is an absolute path, we can use it without further modifications.
35061        new_path="$path"
35062      fi
35063
35064      if test "x$new_path" = x; then
35065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35066$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35067        has_space=`$ECHO "$complete" | $GREP " "`
35068        if test "x$has_space" != x; then
35069          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35070$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35071        fi
35072        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35073      fi
35074    fi
35075
35076    # Now join together the path and the arguments once again
35077    if test "x$arguments" != xEOL; then
35078      new_complete="$new_path ${arguments% *}"
35079    else
35080      new_complete="$new_path"
35081    fi
35082
35083    if test "x$complete" != "x$new_complete"; then
35084      DUMPBIN="$new_complete"
35085      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35086$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35087    fi
35088  fi
35089
35090    # We need to check for 'msbuild.exe' because at the place where we expect to
35091    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35092    # won't find the 'msbuild.exe' executable in that case (and the
35093    # 'ac_executable_extensions' is unusable due to performance reasons).
35094    # Notice that we intentionally don't fix up the path to MSBUILD because we
35095    # will call it in a DOS shell during freetype detection on Windows (see
35096    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35097    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35098set dummy msbuild.exe; ac_word=$2
35099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35100$as_echo_n "checking for $ac_word... " >&6; }
35101if ${ac_cv_prog_MSBUILD+:} false; then :
35102  $as_echo_n "(cached) " >&6
35103else
35104  if test -n "$MSBUILD"; then
35105  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35106else
35107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35108for as_dir in $PATH
35109do
35110  IFS=$as_save_IFS
35111  test -z "$as_dir" && as_dir=.
35112    for ac_exec_ext in '' $ac_executable_extensions; do
35113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35114    ac_cv_prog_MSBUILD="msbuild.exe"
35115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35116    break 2
35117  fi
35118done
35119  done
35120IFS=$as_save_IFS
35121
35122fi
35123fi
35124MSBUILD=$ac_cv_prog_MSBUILD
35125if test -n "$MSBUILD"; then
35126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35127$as_echo "$MSBUILD" >&6; }
35128else
35129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35130$as_echo "no" >&6; }
35131fi
35132
35133
35134  fi
35135
35136  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35137
35138
35139  # Publish this variable in the help.
35140
35141
35142  if test "x$STRIP" = x; then
35143    # The variable is not set by user, try to locate tool using the code snippet
35144    for ac_prog in strip
35145do
35146  # Extract the first word of "$ac_prog", so it can be a program name with args.
35147set dummy $ac_prog; ac_word=$2
35148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35149$as_echo_n "checking for $ac_word... " >&6; }
35150if ${ac_cv_path_STRIP+:} false; then :
35151  $as_echo_n "(cached) " >&6
35152else
35153  case $STRIP in
35154  [\\/]* | ?:[\\/]*)
35155  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35156  ;;
35157  *)
35158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35159for as_dir in $PATH
35160do
35161  IFS=$as_save_IFS
35162  test -z "$as_dir" && as_dir=.
35163    for ac_exec_ext in '' $ac_executable_extensions; do
35164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35165    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35167    break 2
35168  fi
35169done
35170  done
35171IFS=$as_save_IFS
35172
35173  ;;
35174esac
35175fi
35176STRIP=$ac_cv_path_STRIP
35177if test -n "$STRIP"; then
35178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35179$as_echo "$STRIP" >&6; }
35180else
35181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35182$as_echo "no" >&6; }
35183fi
35184
35185
35186  test -n "$STRIP" && break
35187done
35188
35189  else
35190    # The variable is set, but is it from the command line or the environment?
35191
35192    # Try to remove the string !STRIP! from our list.
35193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35195      # If it failed, the variable was not from the command line. Ignore it,
35196      # but warn the user (except for BASH, which is always set by the calling BASH).
35197      if test "xSTRIP" != xBASH; then
35198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35199$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35200      fi
35201      # Try to locate tool using the code snippet
35202      for ac_prog in strip
35203do
35204  # Extract the first word of "$ac_prog", so it can be a program name with args.
35205set dummy $ac_prog; ac_word=$2
35206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35207$as_echo_n "checking for $ac_word... " >&6; }
35208if ${ac_cv_path_STRIP+:} false; then :
35209  $as_echo_n "(cached) " >&6
35210else
35211  case $STRIP in
35212  [\\/]* | ?:[\\/]*)
35213  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35214  ;;
35215  *)
35216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35217for as_dir in $PATH
35218do
35219  IFS=$as_save_IFS
35220  test -z "$as_dir" && as_dir=.
35221    for ac_exec_ext in '' $ac_executable_extensions; do
35222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35223    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35225    break 2
35226  fi
35227done
35228  done
35229IFS=$as_save_IFS
35230
35231  ;;
35232esac
35233fi
35234STRIP=$ac_cv_path_STRIP
35235if test -n "$STRIP"; then
35236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35237$as_echo "$STRIP" >&6; }
35238else
35239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35240$as_echo "no" >&6; }
35241fi
35242
35243
35244  test -n "$STRIP" && break
35245done
35246
35247    else
35248      # If it succeeded, then it was overridden by the user. We will use it
35249      # for the tool.
35250
35251      # First remove it from the list of overridden variables, so we can test
35252      # for unknown variables in the end.
35253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35254
35255      # Check if the provided tool contains a complete path.
35256      tool_specified="$STRIP"
35257      tool_basename="${tool_specified##*/}"
35258      if test "x$tool_basename" = "x$tool_specified"; then
35259        # A command without a complete path is provided, search $PATH.
35260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35261$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35262        # Extract the first word of "$tool_basename", so it can be a program name with args.
35263set dummy $tool_basename; ac_word=$2
35264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35265$as_echo_n "checking for $ac_word... " >&6; }
35266if ${ac_cv_path_STRIP+:} false; then :
35267  $as_echo_n "(cached) " >&6
35268else
35269  case $STRIP in
35270  [\\/]* | ?:[\\/]*)
35271  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35272  ;;
35273  *)
35274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35275for as_dir in $PATH
35276do
35277  IFS=$as_save_IFS
35278  test -z "$as_dir" && as_dir=.
35279    for ac_exec_ext in '' $ac_executable_extensions; do
35280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35281    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35283    break 2
35284  fi
35285done
35286  done
35287IFS=$as_save_IFS
35288
35289  ;;
35290esac
35291fi
35292STRIP=$ac_cv_path_STRIP
35293if test -n "$STRIP"; then
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35295$as_echo "$STRIP" >&6; }
35296else
35297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35298$as_echo "no" >&6; }
35299fi
35300
35301
35302        if test "x$STRIP" = x; then
35303          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35304        fi
35305      else
35306        # Otherwise we believe it is a complete path. Use it as it is.
35307        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35308$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35309        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35310$as_echo_n "checking for STRIP... " >&6; }
35311        if test ! -x "$tool_specified"; then
35312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35313$as_echo "not found" >&6; }
35314          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35315        fi
35316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35317$as_echo "$tool_specified" >&6; }
35318      fi
35319    fi
35320  fi
35321
35322
35323
35324  # Only process if variable expands to non-empty
35325
35326  if test "x$STRIP" != x; then
35327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35328
35329  # First separate the path from the arguments. This will split at the first
35330  # space.
35331  complete="$STRIP"
35332  path="${complete%% *}"
35333  tmp="$complete EOL"
35334  arguments="${tmp#* }"
35335
35336  # Input might be given as Windows format, start by converting to
35337  # unix format.
35338  new_path=`$CYGPATH -u "$path"`
35339
35340  # Now try to locate executable using which
35341  new_path=`$WHICH "$new_path" 2> /dev/null`
35342  # bat and cmd files are not always considered executable in cygwin causing which
35343  # to not find them
35344  if test "x$new_path" = x \
35345      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35346      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35347    new_path=`$CYGPATH -u "$path"`
35348  fi
35349  if test "x$new_path" = x; then
35350    # Oops. Which didn't find the executable.
35351    # The splitting of arguments from the executable at a space might have been incorrect,
35352    # since paths with space are more likely in Windows. Give it another try with the whole
35353    # argument.
35354    path="$complete"
35355    arguments="EOL"
35356    new_path=`$CYGPATH -u "$path"`
35357    new_path=`$WHICH "$new_path" 2> /dev/null`
35358    # bat and cmd files are not always considered executable in cygwin causing which
35359    # to not find them
35360    if test "x$new_path" = x \
35361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35363      new_path=`$CYGPATH -u "$path"`
35364    fi
35365    if test "x$new_path" = x; then
35366      # It's still not found. Now this is an unrecoverable error.
35367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35368$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35369      has_space=`$ECHO "$complete" | $GREP " "`
35370      if test "x$has_space" != x; then
35371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35373      fi
35374      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35375    fi
35376  fi
35377
35378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35381  # "foo.exe" is OK but "foo" is an error.
35382  #
35383  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35384  # It is also a way to make sure we got the proper file name for the real test later on.
35385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35386  if test "x$test_shortpath" = x; then
35387    # Short path failed, file does not exist as specified.
35388    # Try adding .exe or .cmd
35389    if test -f "${new_path}.exe"; then
35390      input_to_shortpath="${new_path}.exe"
35391    elif test -f "${new_path}.cmd"; then
35392      input_to_shortpath="${new_path}.cmd"
35393    else
35394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35395$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35398      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35399    fi
35400  else
35401    input_to_shortpath="$new_path"
35402  fi
35403
35404  # Call helper function which possibly converts this using DOS-style short mode.
35405  # If so, the updated path is stored in $new_path.
35406  new_path="$input_to_shortpath"
35407
35408  input_path="$input_to_shortpath"
35409  # Check if we need to convert this using DOS-style short mode. If the path
35410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35411  # take no chances and rewrite it.
35412  # Note: m4 eats our [], so we need to use [ and ] instead.
35413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35414  if test "x$has_forbidden_chars" != x; then
35415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35419      # Going to short mode and back again did indeed matter. Since short mode is
35420      # case insensitive, let's make it lowercase to improve readability.
35421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35422      # Now convert it back to Unix-style (cygpath)
35423      input_path=`$CYGPATH -u "$shortmode_path"`
35424      new_path="$input_path"
35425    fi
35426  fi
35427
35428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35429  if test "x$test_cygdrive_prefix" = x; then
35430    # As a simple fix, exclude /usr/bin since it's not a real path.
35431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35433      # a path prefixed by /cygdrive for fixpath to work.
35434      new_path="$CYGWIN_ROOT_PATH$input_path"
35435    fi
35436  fi
35437
35438  # remove trailing .exe if any
35439  new_path="${new_path/%.exe/}"
35440
35441    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35442
35443  # First separate the path from the arguments. This will split at the first
35444  # space.
35445  complete="$STRIP"
35446  path="${complete%% *}"
35447  tmp="$complete EOL"
35448  arguments="${tmp#* }"
35449
35450  # Input might be given as Windows format, start by converting to
35451  # unix format.
35452  new_path="$path"
35453
35454  windows_path="$new_path"
35455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35456    unix_path=`$CYGPATH -u "$windows_path"`
35457    new_path="$unix_path"
35458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35460    new_path="$unix_path"
35461  fi
35462
35463
35464  # Now try to locate executable using which
35465  new_path=`$WHICH "$new_path" 2> /dev/null`
35466
35467  if test "x$new_path" = x; then
35468    # Oops. Which didn't find the executable.
35469    # The splitting of arguments from the executable at a space might have been incorrect,
35470    # since paths with space are more likely in Windows. Give it another try with the whole
35471    # argument.
35472    path="$complete"
35473    arguments="EOL"
35474    new_path="$path"
35475
35476  windows_path="$new_path"
35477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35478    unix_path=`$CYGPATH -u "$windows_path"`
35479    new_path="$unix_path"
35480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35482    new_path="$unix_path"
35483  fi
35484
35485
35486    new_path=`$WHICH "$new_path" 2> /dev/null`
35487    # bat and cmd files are not always considered executable in MSYS causing which
35488    # to not find them
35489    if test "x$new_path" = x \
35490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35492      new_path="$path"
35493
35494  windows_path="$new_path"
35495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35496    unix_path=`$CYGPATH -u "$windows_path"`
35497    new_path="$unix_path"
35498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35500    new_path="$unix_path"
35501  fi
35502
35503    fi
35504
35505    if test "x$new_path" = x; then
35506      # It's still not found. Now this is an unrecoverable error.
35507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35508$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35509      has_space=`$ECHO "$complete" | $GREP " "`
35510      if test "x$has_space" != x; then
35511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35513      fi
35514      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35515    fi
35516  fi
35517
35518  # Now new_path has a complete unix path to the binary
35519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35520    # Keep paths in /bin as-is, but remove trailing .exe if any
35521    new_path="${new_path/%.exe/}"
35522    # Do not save /bin paths to all_fixpath_prefixes!
35523  else
35524    # Not in mixed or Windows style, start by that.
35525    new_path=`cmd //c echo $new_path`
35526
35527  input_path="$new_path"
35528  # Check if we need to convert this using DOS-style short mode. If the path
35529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35530  # take no chances and rewrite it.
35531  # Note: m4 eats our [], so we need to use [ and ] instead.
35532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35533  if test "x$has_forbidden_chars" != x; then
35534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35536  fi
35537
35538    # Output is in $new_path
35539
35540  windows_path="$new_path"
35541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35542    unix_path=`$CYGPATH -u "$windows_path"`
35543    new_path="$unix_path"
35544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35546    new_path="$unix_path"
35547  fi
35548
35549    # remove trailing .exe if any
35550    new_path="${new_path/%.exe/}"
35551
35552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35554  fi
35555
35556    else
35557      # We're on a unix platform. Hooray! :)
35558      # First separate the path from the arguments. This will split at the first
35559      # space.
35560      complete="$STRIP"
35561      path="${complete%% *}"
35562      tmp="$complete EOL"
35563      arguments="${tmp#* }"
35564
35565      # Cannot rely on the command "which" here since it doesn't always work.
35566      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35567      if test -z "$is_absolute_path"; then
35568        # Path to executable is not absolute. Find it.
35569        IFS_save="$IFS"
35570        IFS=:
35571        for p in $PATH; do
35572          if test -f "$p/$path" && test -x "$p/$path"; then
35573            new_path="$p/$path"
35574            break
35575          fi
35576        done
35577        IFS="$IFS_save"
35578      else
35579        # This is an absolute path, we can use it without further modifications.
35580        new_path="$path"
35581      fi
35582
35583      if test "x$new_path" = x; then
35584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35585$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35586        has_space=`$ECHO "$complete" | $GREP " "`
35587        if test "x$has_space" != x; then
35588          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35589$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35590        fi
35591        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35592      fi
35593    fi
35594
35595    # Now join together the path and the arguments once again
35596    if test "x$arguments" != xEOL; then
35597      new_complete="$new_path ${arguments% *}"
35598    else
35599      new_complete="$new_path"
35600    fi
35601
35602    if test "x$complete" != "x$new_complete"; then
35603      STRIP="$new_complete"
35604      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35605$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35606    fi
35607  fi
35608
35609
35610
35611  # Publish this variable in the help.
35612
35613
35614  if test "x$NM" = x; then
35615    # The variable is not set by user, try to locate tool using the code snippet
35616    for ac_prog in nm
35617do
35618  # Extract the first word of "$ac_prog", so it can be a program name with args.
35619set dummy $ac_prog; ac_word=$2
35620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35621$as_echo_n "checking for $ac_word... " >&6; }
35622if ${ac_cv_path_NM+:} false; then :
35623  $as_echo_n "(cached) " >&6
35624else
35625  case $NM in
35626  [\\/]* | ?:[\\/]*)
35627  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35628  ;;
35629  *)
35630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35631for as_dir in $PATH
35632do
35633  IFS=$as_save_IFS
35634  test -z "$as_dir" && as_dir=.
35635    for ac_exec_ext in '' $ac_executable_extensions; do
35636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35637    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35639    break 2
35640  fi
35641done
35642  done
35643IFS=$as_save_IFS
35644
35645  ;;
35646esac
35647fi
35648NM=$ac_cv_path_NM
35649if test -n "$NM"; then
35650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35651$as_echo "$NM" >&6; }
35652else
35653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35654$as_echo "no" >&6; }
35655fi
35656
35657
35658  test -n "$NM" && break
35659done
35660
35661  else
35662    # The variable is set, but is it from the command line or the environment?
35663
35664    # Try to remove the string !NM! from our list.
35665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35667      # If it failed, the variable was not from the command line. Ignore it,
35668      # but warn the user (except for BASH, which is always set by the calling BASH).
35669      if test "xNM" != xBASH; then
35670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35671$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35672      fi
35673      # Try to locate tool using the code snippet
35674      for ac_prog in nm
35675do
35676  # Extract the first word of "$ac_prog", so it can be a program name with args.
35677set dummy $ac_prog; ac_word=$2
35678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35679$as_echo_n "checking for $ac_word... " >&6; }
35680if ${ac_cv_path_NM+:} false; then :
35681  $as_echo_n "(cached) " >&6
35682else
35683  case $NM in
35684  [\\/]* | ?:[\\/]*)
35685  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35686  ;;
35687  *)
35688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35689for as_dir in $PATH
35690do
35691  IFS=$as_save_IFS
35692  test -z "$as_dir" && as_dir=.
35693    for ac_exec_ext in '' $ac_executable_extensions; do
35694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35695    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35697    break 2
35698  fi
35699done
35700  done
35701IFS=$as_save_IFS
35702
35703  ;;
35704esac
35705fi
35706NM=$ac_cv_path_NM
35707if test -n "$NM"; then
35708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35709$as_echo "$NM" >&6; }
35710else
35711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35712$as_echo "no" >&6; }
35713fi
35714
35715
35716  test -n "$NM" && break
35717done
35718
35719    else
35720      # If it succeeded, then it was overridden by the user. We will use it
35721      # for the tool.
35722
35723      # First remove it from the list of overridden variables, so we can test
35724      # for unknown variables in the end.
35725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35726
35727      # Check if the provided tool contains a complete path.
35728      tool_specified="$NM"
35729      tool_basename="${tool_specified##*/}"
35730      if test "x$tool_basename" = "x$tool_specified"; then
35731        # A command without a complete path is provided, search $PATH.
35732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35733$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35734        # Extract the first word of "$tool_basename", so it can be a program name with args.
35735set dummy $tool_basename; ac_word=$2
35736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35737$as_echo_n "checking for $ac_word... " >&6; }
35738if ${ac_cv_path_NM+:} false; then :
35739  $as_echo_n "(cached) " >&6
35740else
35741  case $NM in
35742  [\\/]* | ?:[\\/]*)
35743  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35744  ;;
35745  *)
35746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35747for as_dir in $PATH
35748do
35749  IFS=$as_save_IFS
35750  test -z "$as_dir" && as_dir=.
35751    for ac_exec_ext in '' $ac_executable_extensions; do
35752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35753    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35755    break 2
35756  fi
35757done
35758  done
35759IFS=$as_save_IFS
35760
35761  ;;
35762esac
35763fi
35764NM=$ac_cv_path_NM
35765if test -n "$NM"; then
35766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35767$as_echo "$NM" >&6; }
35768else
35769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35770$as_echo "no" >&6; }
35771fi
35772
35773
35774        if test "x$NM" = x; then
35775          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35776        fi
35777      else
35778        # Otherwise we believe it is a complete path. Use it as it is.
35779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35780$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35782$as_echo_n "checking for NM... " >&6; }
35783        if test ! -x "$tool_specified"; then
35784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35785$as_echo "not found" >&6; }
35786          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35787        fi
35788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35789$as_echo "$tool_specified" >&6; }
35790      fi
35791    fi
35792  fi
35793
35794
35795
35796  # Only process if variable expands to non-empty
35797
35798  if test "x$NM" != x; then
35799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35800
35801  # First separate the path from the arguments. This will split at the first
35802  # space.
35803  complete="$NM"
35804  path="${complete%% *}"
35805  tmp="$complete EOL"
35806  arguments="${tmp#* }"
35807
35808  # Input might be given as Windows format, start by converting to
35809  # unix format.
35810  new_path=`$CYGPATH -u "$path"`
35811
35812  # Now try to locate executable using which
35813  new_path=`$WHICH "$new_path" 2> /dev/null`
35814  # bat and cmd files are not always considered executable in cygwin causing which
35815  # to not find them
35816  if test "x$new_path" = x \
35817      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35818      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35819    new_path=`$CYGPATH -u "$path"`
35820  fi
35821  if test "x$new_path" = x; then
35822    # Oops. Which didn't find the executable.
35823    # The splitting of arguments from the executable at a space might have been incorrect,
35824    # since paths with space are more likely in Windows. Give it another try with the whole
35825    # argument.
35826    path="$complete"
35827    arguments="EOL"
35828    new_path=`$CYGPATH -u "$path"`
35829    new_path=`$WHICH "$new_path" 2> /dev/null`
35830    # bat and cmd files are not always considered executable in cygwin causing which
35831    # to not find them
35832    if test "x$new_path" = x \
35833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35835      new_path=`$CYGPATH -u "$path"`
35836    fi
35837    if test "x$new_path" = x; then
35838      # It's still not found. Now this is an unrecoverable error.
35839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35840$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35841      has_space=`$ECHO "$complete" | $GREP " "`
35842      if test "x$has_space" != x; then
35843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35845      fi
35846      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35847    fi
35848  fi
35849
35850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35853  # "foo.exe" is OK but "foo" is an error.
35854  #
35855  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35856  # It is also a way to make sure we got the proper file name for the real test later on.
35857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35858  if test "x$test_shortpath" = x; then
35859    # Short path failed, file does not exist as specified.
35860    # Try adding .exe or .cmd
35861    if test -f "${new_path}.exe"; then
35862      input_to_shortpath="${new_path}.exe"
35863    elif test -f "${new_path}.cmd"; then
35864      input_to_shortpath="${new_path}.cmd"
35865    else
35866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35867$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35870      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35871    fi
35872  else
35873    input_to_shortpath="$new_path"
35874  fi
35875
35876  # Call helper function which possibly converts this using DOS-style short mode.
35877  # If so, the updated path is stored in $new_path.
35878  new_path="$input_to_shortpath"
35879
35880  input_path="$input_to_shortpath"
35881  # Check if we need to convert this using DOS-style short mode. If the path
35882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35883  # take no chances and rewrite it.
35884  # Note: m4 eats our [], so we need to use [ and ] instead.
35885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35886  if test "x$has_forbidden_chars" != x; then
35887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35891      # Going to short mode and back again did indeed matter. Since short mode is
35892      # case insensitive, let's make it lowercase to improve readability.
35893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35894      # Now convert it back to Unix-style (cygpath)
35895      input_path=`$CYGPATH -u "$shortmode_path"`
35896      new_path="$input_path"
35897    fi
35898  fi
35899
35900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35901  if test "x$test_cygdrive_prefix" = x; then
35902    # As a simple fix, exclude /usr/bin since it's not a real path.
35903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35905      # a path prefixed by /cygdrive for fixpath to work.
35906      new_path="$CYGWIN_ROOT_PATH$input_path"
35907    fi
35908  fi
35909
35910  # remove trailing .exe if any
35911  new_path="${new_path/%.exe/}"
35912
35913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35914
35915  # First separate the path from the arguments. This will split at the first
35916  # space.
35917  complete="$NM"
35918  path="${complete%% *}"
35919  tmp="$complete EOL"
35920  arguments="${tmp#* }"
35921
35922  # Input might be given as Windows format, start by converting to
35923  # unix format.
35924  new_path="$path"
35925
35926  windows_path="$new_path"
35927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35928    unix_path=`$CYGPATH -u "$windows_path"`
35929    new_path="$unix_path"
35930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35932    new_path="$unix_path"
35933  fi
35934
35935
35936  # Now try to locate executable using which
35937  new_path=`$WHICH "$new_path" 2> /dev/null`
35938
35939  if test "x$new_path" = x; then
35940    # Oops. Which didn't find the executable.
35941    # The splitting of arguments from the executable at a space might have been incorrect,
35942    # since paths with space are more likely in Windows. Give it another try with the whole
35943    # argument.
35944    path="$complete"
35945    arguments="EOL"
35946    new_path="$path"
35947
35948  windows_path="$new_path"
35949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35950    unix_path=`$CYGPATH -u "$windows_path"`
35951    new_path="$unix_path"
35952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35954    new_path="$unix_path"
35955  fi
35956
35957
35958    new_path=`$WHICH "$new_path" 2> /dev/null`
35959    # bat and cmd files are not always considered executable in MSYS causing which
35960    # to not find them
35961    if test "x$new_path" = x \
35962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35964      new_path="$path"
35965
35966  windows_path="$new_path"
35967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35968    unix_path=`$CYGPATH -u "$windows_path"`
35969    new_path="$unix_path"
35970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35972    new_path="$unix_path"
35973  fi
35974
35975    fi
35976
35977    if test "x$new_path" = x; then
35978      # It's still not found. Now this is an unrecoverable error.
35979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35980$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35981      has_space=`$ECHO "$complete" | $GREP " "`
35982      if test "x$has_space" != x; then
35983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35985      fi
35986      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35987    fi
35988  fi
35989
35990  # Now new_path has a complete unix path to the binary
35991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35992    # Keep paths in /bin as-is, but remove trailing .exe if any
35993    new_path="${new_path/%.exe/}"
35994    # Do not save /bin paths to all_fixpath_prefixes!
35995  else
35996    # Not in mixed or Windows style, start by that.
35997    new_path=`cmd //c echo $new_path`
35998
35999  input_path="$new_path"
36000  # Check if we need to convert this using DOS-style short mode. If the path
36001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36002  # take no chances and rewrite it.
36003  # Note: m4 eats our [], so we need to use [ and ] instead.
36004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36005  if test "x$has_forbidden_chars" != x; then
36006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36008  fi
36009
36010    # Output is in $new_path
36011
36012  windows_path="$new_path"
36013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36014    unix_path=`$CYGPATH -u "$windows_path"`
36015    new_path="$unix_path"
36016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36018    new_path="$unix_path"
36019  fi
36020
36021    # remove trailing .exe if any
36022    new_path="${new_path/%.exe/}"
36023
36024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36026  fi
36027
36028    else
36029      # We're on a unix platform. Hooray! :)
36030      # First separate the path from the arguments. This will split at the first
36031      # space.
36032      complete="$NM"
36033      path="${complete%% *}"
36034      tmp="$complete EOL"
36035      arguments="${tmp#* }"
36036
36037      # Cannot rely on the command "which" here since it doesn't always work.
36038      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36039      if test -z "$is_absolute_path"; then
36040        # Path to executable is not absolute. Find it.
36041        IFS_save="$IFS"
36042        IFS=:
36043        for p in $PATH; do
36044          if test -f "$p/$path" && test -x "$p/$path"; then
36045            new_path="$p/$path"
36046            break
36047          fi
36048        done
36049        IFS="$IFS_save"
36050      else
36051        # This is an absolute path, we can use it without further modifications.
36052        new_path="$path"
36053      fi
36054
36055      if test "x$new_path" = x; then
36056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36057$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36058        has_space=`$ECHO "$complete" | $GREP " "`
36059        if test "x$has_space" != x; then
36060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36062        fi
36063        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36064      fi
36065    fi
36066
36067    # Now join together the path and the arguments once again
36068    if test "x$arguments" != xEOL; then
36069      new_complete="$new_path ${arguments% *}"
36070    else
36071      new_complete="$new_path"
36072    fi
36073
36074    if test "x$complete" != "x$new_complete"; then
36075      NM="$new_complete"
36076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36077$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36078    fi
36079  fi
36080
36081
36082
36083  # Publish this variable in the help.
36084
36085
36086  if test "x$GNM" = x; then
36087    # The variable is not set by user, try to locate tool using the code snippet
36088    for ac_prog in gnm
36089do
36090  # Extract the first word of "$ac_prog", so it can be a program name with args.
36091set dummy $ac_prog; ac_word=$2
36092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36093$as_echo_n "checking for $ac_word... " >&6; }
36094if ${ac_cv_path_GNM+:} false; then :
36095  $as_echo_n "(cached) " >&6
36096else
36097  case $GNM in
36098  [\\/]* | ?:[\\/]*)
36099  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36100  ;;
36101  *)
36102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36103for as_dir in $PATH
36104do
36105  IFS=$as_save_IFS
36106  test -z "$as_dir" && as_dir=.
36107    for ac_exec_ext in '' $ac_executable_extensions; do
36108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36109    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36111    break 2
36112  fi
36113done
36114  done
36115IFS=$as_save_IFS
36116
36117  ;;
36118esac
36119fi
36120GNM=$ac_cv_path_GNM
36121if test -n "$GNM"; then
36122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36123$as_echo "$GNM" >&6; }
36124else
36125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36126$as_echo "no" >&6; }
36127fi
36128
36129
36130  test -n "$GNM" && break
36131done
36132
36133  else
36134    # The variable is set, but is it from the command line or the environment?
36135
36136    # Try to remove the string !GNM! from our list.
36137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36139      # If it failed, the variable was not from the command line. Ignore it,
36140      # but warn the user (except for BASH, which is always set by the calling BASH).
36141      if test "xGNM" != xBASH; then
36142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36143$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36144      fi
36145      # Try to locate tool using the code snippet
36146      for ac_prog in gnm
36147do
36148  # Extract the first word of "$ac_prog", so it can be a program name with args.
36149set dummy $ac_prog; ac_word=$2
36150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36151$as_echo_n "checking for $ac_word... " >&6; }
36152if ${ac_cv_path_GNM+:} false; then :
36153  $as_echo_n "(cached) " >&6
36154else
36155  case $GNM in
36156  [\\/]* | ?:[\\/]*)
36157  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36158  ;;
36159  *)
36160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36161for as_dir in $PATH
36162do
36163  IFS=$as_save_IFS
36164  test -z "$as_dir" && as_dir=.
36165    for ac_exec_ext in '' $ac_executable_extensions; do
36166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36167    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36169    break 2
36170  fi
36171done
36172  done
36173IFS=$as_save_IFS
36174
36175  ;;
36176esac
36177fi
36178GNM=$ac_cv_path_GNM
36179if test -n "$GNM"; then
36180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36181$as_echo "$GNM" >&6; }
36182else
36183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36184$as_echo "no" >&6; }
36185fi
36186
36187
36188  test -n "$GNM" && break
36189done
36190
36191    else
36192      # If it succeeded, then it was overridden by the user. We will use it
36193      # for the tool.
36194
36195      # First remove it from the list of overridden variables, so we can test
36196      # for unknown variables in the end.
36197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36198
36199      # Check if the provided tool contains a complete path.
36200      tool_specified="$GNM"
36201      tool_basename="${tool_specified##*/}"
36202      if test "x$tool_basename" = "x$tool_specified"; then
36203        # A command without a complete path is provided, search $PATH.
36204        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36205$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36206        # Extract the first word of "$tool_basename", so it can be a program name with args.
36207set dummy $tool_basename; ac_word=$2
36208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36209$as_echo_n "checking for $ac_word... " >&6; }
36210if ${ac_cv_path_GNM+:} false; then :
36211  $as_echo_n "(cached) " >&6
36212else
36213  case $GNM in
36214  [\\/]* | ?:[\\/]*)
36215  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36216  ;;
36217  *)
36218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36219for as_dir in $PATH
36220do
36221  IFS=$as_save_IFS
36222  test -z "$as_dir" && as_dir=.
36223    for ac_exec_ext in '' $ac_executable_extensions; do
36224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36225    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36227    break 2
36228  fi
36229done
36230  done
36231IFS=$as_save_IFS
36232
36233  ;;
36234esac
36235fi
36236GNM=$ac_cv_path_GNM
36237if test -n "$GNM"; then
36238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36239$as_echo "$GNM" >&6; }
36240else
36241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36242$as_echo "no" >&6; }
36243fi
36244
36245
36246        if test "x$GNM" = x; then
36247          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36248        fi
36249      else
36250        # Otherwise we believe it is a complete path. Use it as it is.
36251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36252$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36254$as_echo_n "checking for GNM... " >&6; }
36255        if test ! -x "$tool_specified"; then
36256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36257$as_echo "not found" >&6; }
36258          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36259        fi
36260        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36261$as_echo "$tool_specified" >&6; }
36262      fi
36263    fi
36264  fi
36265
36266
36267
36268  # Only process if variable expands to non-empty
36269
36270  if test "x$GNM" != x; then
36271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36272
36273  # First separate the path from the arguments. This will split at the first
36274  # space.
36275  complete="$GNM"
36276  path="${complete%% *}"
36277  tmp="$complete EOL"
36278  arguments="${tmp#* }"
36279
36280  # Input might be given as Windows format, start by converting to
36281  # unix format.
36282  new_path=`$CYGPATH -u "$path"`
36283
36284  # Now try to locate executable using which
36285  new_path=`$WHICH "$new_path" 2> /dev/null`
36286  # bat and cmd files are not always considered executable in cygwin causing which
36287  # to not find them
36288  if test "x$new_path" = x \
36289      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36290      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36291    new_path=`$CYGPATH -u "$path"`
36292  fi
36293  if test "x$new_path" = x; then
36294    # Oops. Which didn't find the executable.
36295    # The splitting of arguments from the executable at a space might have been incorrect,
36296    # since paths with space are more likely in Windows. Give it another try with the whole
36297    # argument.
36298    path="$complete"
36299    arguments="EOL"
36300    new_path=`$CYGPATH -u "$path"`
36301    new_path=`$WHICH "$new_path" 2> /dev/null`
36302    # bat and cmd files are not always considered executable in cygwin causing which
36303    # to not find them
36304    if test "x$new_path" = x \
36305        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36306        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36307      new_path=`$CYGPATH -u "$path"`
36308    fi
36309    if test "x$new_path" = x; then
36310      # It's still not found. Now this is an unrecoverable error.
36311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36312$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36313      has_space=`$ECHO "$complete" | $GREP " "`
36314      if test "x$has_space" != x; then
36315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36317      fi
36318      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36319    fi
36320  fi
36321
36322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36325  # "foo.exe" is OK but "foo" is an error.
36326  #
36327  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36328  # It is also a way to make sure we got the proper file name for the real test later on.
36329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36330  if test "x$test_shortpath" = x; then
36331    # Short path failed, file does not exist as specified.
36332    # Try adding .exe or .cmd
36333    if test -f "${new_path}.exe"; then
36334      input_to_shortpath="${new_path}.exe"
36335    elif test -f "${new_path}.cmd"; then
36336      input_to_shortpath="${new_path}.cmd"
36337    else
36338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36339$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36340      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36341$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36342      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36343    fi
36344  else
36345    input_to_shortpath="$new_path"
36346  fi
36347
36348  # Call helper function which possibly converts this using DOS-style short mode.
36349  # If so, the updated path is stored in $new_path.
36350  new_path="$input_to_shortpath"
36351
36352  input_path="$input_to_shortpath"
36353  # Check if we need to convert this using DOS-style short mode. If the path
36354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36355  # take no chances and rewrite it.
36356  # Note: m4 eats our [], so we need to use [ and ] instead.
36357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36358  if test "x$has_forbidden_chars" != x; then
36359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36363      # Going to short mode and back again did indeed matter. Since short mode is
36364      # case insensitive, let's make it lowercase to improve readability.
36365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36366      # Now convert it back to Unix-style (cygpath)
36367      input_path=`$CYGPATH -u "$shortmode_path"`
36368      new_path="$input_path"
36369    fi
36370  fi
36371
36372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36373  if test "x$test_cygdrive_prefix" = x; then
36374    # As a simple fix, exclude /usr/bin since it's not a real path.
36375    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36377      # a path prefixed by /cygdrive for fixpath to work.
36378      new_path="$CYGWIN_ROOT_PATH$input_path"
36379    fi
36380  fi
36381
36382  # remove trailing .exe if any
36383  new_path="${new_path/%.exe/}"
36384
36385    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36386
36387  # First separate the path from the arguments. This will split at the first
36388  # space.
36389  complete="$GNM"
36390  path="${complete%% *}"
36391  tmp="$complete EOL"
36392  arguments="${tmp#* }"
36393
36394  # Input might be given as Windows format, start by converting to
36395  # unix format.
36396  new_path="$path"
36397
36398  windows_path="$new_path"
36399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36400    unix_path=`$CYGPATH -u "$windows_path"`
36401    new_path="$unix_path"
36402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36404    new_path="$unix_path"
36405  fi
36406
36407
36408  # Now try to locate executable using which
36409  new_path=`$WHICH "$new_path" 2> /dev/null`
36410
36411  if test "x$new_path" = x; then
36412    # Oops. Which didn't find the executable.
36413    # The splitting of arguments from the executable at a space might have been incorrect,
36414    # since paths with space are more likely in Windows. Give it another try with the whole
36415    # argument.
36416    path="$complete"
36417    arguments="EOL"
36418    new_path="$path"
36419
36420  windows_path="$new_path"
36421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36422    unix_path=`$CYGPATH -u "$windows_path"`
36423    new_path="$unix_path"
36424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36426    new_path="$unix_path"
36427  fi
36428
36429
36430    new_path=`$WHICH "$new_path" 2> /dev/null`
36431    # bat and cmd files are not always considered executable in MSYS causing which
36432    # to not find them
36433    if test "x$new_path" = x \
36434        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36435        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36436      new_path="$path"
36437
36438  windows_path="$new_path"
36439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36440    unix_path=`$CYGPATH -u "$windows_path"`
36441    new_path="$unix_path"
36442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36444    new_path="$unix_path"
36445  fi
36446
36447    fi
36448
36449    if test "x$new_path" = x; then
36450      # It's still not found. Now this is an unrecoverable error.
36451      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36452$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36453      has_space=`$ECHO "$complete" | $GREP " "`
36454      if test "x$has_space" != x; then
36455        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36456$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36457      fi
36458      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36459    fi
36460  fi
36461
36462  # Now new_path has a complete unix path to the binary
36463  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36464    # Keep paths in /bin as-is, but remove trailing .exe if any
36465    new_path="${new_path/%.exe/}"
36466    # Do not save /bin paths to all_fixpath_prefixes!
36467  else
36468    # Not in mixed or Windows style, start by that.
36469    new_path=`cmd //c echo $new_path`
36470
36471  input_path="$new_path"
36472  # Check if we need to convert this using DOS-style short mode. If the path
36473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36474  # take no chances and rewrite it.
36475  # Note: m4 eats our [], so we need to use [ and ] instead.
36476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36477  if test "x$has_forbidden_chars" != x; then
36478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36480  fi
36481
36482    # Output is in $new_path
36483
36484  windows_path="$new_path"
36485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36486    unix_path=`$CYGPATH -u "$windows_path"`
36487    new_path="$unix_path"
36488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36490    new_path="$unix_path"
36491  fi
36492
36493    # remove trailing .exe if any
36494    new_path="${new_path/%.exe/}"
36495
36496    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36497    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36498  fi
36499
36500    else
36501      # We're on a unix platform. Hooray! :)
36502      # First separate the path from the arguments. This will split at the first
36503      # space.
36504      complete="$GNM"
36505      path="${complete%% *}"
36506      tmp="$complete EOL"
36507      arguments="${tmp#* }"
36508
36509      # Cannot rely on the command "which" here since it doesn't always work.
36510      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36511      if test -z "$is_absolute_path"; then
36512        # Path to executable is not absolute. Find it.
36513        IFS_save="$IFS"
36514        IFS=:
36515        for p in $PATH; do
36516          if test -f "$p/$path" && test -x "$p/$path"; then
36517            new_path="$p/$path"
36518            break
36519          fi
36520        done
36521        IFS="$IFS_save"
36522      else
36523        # This is an absolute path, we can use it without further modifications.
36524        new_path="$path"
36525      fi
36526
36527      if test "x$new_path" = x; then
36528        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36529$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36530        has_space=`$ECHO "$complete" | $GREP " "`
36531        if test "x$has_space" != x; then
36532          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36533$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36534        fi
36535        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36536      fi
36537    fi
36538
36539    # Now join together the path and the arguments once again
36540    if test "x$arguments" != xEOL; then
36541      new_complete="$new_path ${arguments% *}"
36542    else
36543      new_complete="$new_path"
36544    fi
36545
36546    if test "x$complete" != "x$new_complete"; then
36547      GNM="$new_complete"
36548      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36549$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36550    fi
36551  fi
36552
36553  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36554    # FIXME: we should unify this with the solaris case above.
36555
36556
36557  # Publish this variable in the help.
36558
36559
36560  if test "x$STRIP" = x; then
36561    # The variable is not set by user, try to locate tool using the code snippet
36562    if test -n "$ac_tool_prefix"; then
36563  for ac_prog in strip
36564  do
36565    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36566set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36568$as_echo_n "checking for $ac_word... " >&6; }
36569if ${ac_cv_prog_STRIP+:} false; then :
36570  $as_echo_n "(cached) " >&6
36571else
36572  if test -n "$STRIP"; then
36573  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36574else
36575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36576for as_dir in $PATH
36577do
36578  IFS=$as_save_IFS
36579  test -z "$as_dir" && as_dir=.
36580    for ac_exec_ext in '' $ac_executable_extensions; do
36581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36582    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36584    break 2
36585  fi
36586done
36587  done
36588IFS=$as_save_IFS
36589
36590fi
36591fi
36592STRIP=$ac_cv_prog_STRIP
36593if test -n "$STRIP"; then
36594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36595$as_echo "$STRIP" >&6; }
36596else
36597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36598$as_echo "no" >&6; }
36599fi
36600
36601
36602    test -n "$STRIP" && break
36603  done
36604fi
36605if test -z "$STRIP"; then
36606  ac_ct_STRIP=$STRIP
36607  for ac_prog in strip
36608do
36609  # Extract the first word of "$ac_prog", so it can be a program name with args.
36610set dummy $ac_prog; ac_word=$2
36611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36612$as_echo_n "checking for $ac_word... " >&6; }
36613if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36614  $as_echo_n "(cached) " >&6
36615else
36616  if test -n "$ac_ct_STRIP"; then
36617  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36618else
36619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36620for as_dir in $PATH
36621do
36622  IFS=$as_save_IFS
36623  test -z "$as_dir" && as_dir=.
36624    for ac_exec_ext in '' $ac_executable_extensions; do
36625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36626    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36628    break 2
36629  fi
36630done
36631  done
36632IFS=$as_save_IFS
36633
36634fi
36635fi
36636ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36637if test -n "$ac_ct_STRIP"; then
36638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36639$as_echo "$ac_ct_STRIP" >&6; }
36640else
36641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36642$as_echo "no" >&6; }
36643fi
36644
36645
36646  test -n "$ac_ct_STRIP" && break
36647done
36648
36649  if test "x$ac_ct_STRIP" = x; then
36650    STRIP=""
36651  else
36652    case $cross_compiling:$ac_tool_warned in
36653yes:)
36654{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36655$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36656ac_tool_warned=yes ;;
36657esac
36658    STRIP=$ac_ct_STRIP
36659  fi
36660fi
36661
36662  else
36663    # The variable is set, but is it from the command line or the environment?
36664
36665    # Try to remove the string !STRIP! from our list.
36666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36668      # If it failed, the variable was not from the command line. Ignore it,
36669      # but warn the user (except for BASH, which is always set by the calling BASH).
36670      if test "xSTRIP" != xBASH; then
36671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36672$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36673      fi
36674      # Try to locate tool using the code snippet
36675      if test -n "$ac_tool_prefix"; then
36676  for ac_prog in strip
36677  do
36678    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36679set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36681$as_echo_n "checking for $ac_word... " >&6; }
36682if ${ac_cv_prog_STRIP+:} false; then :
36683  $as_echo_n "(cached) " >&6
36684else
36685  if test -n "$STRIP"; then
36686  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36687else
36688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36689for as_dir in $PATH
36690do
36691  IFS=$as_save_IFS
36692  test -z "$as_dir" && as_dir=.
36693    for ac_exec_ext in '' $ac_executable_extensions; do
36694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36695    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36697    break 2
36698  fi
36699done
36700  done
36701IFS=$as_save_IFS
36702
36703fi
36704fi
36705STRIP=$ac_cv_prog_STRIP
36706if test -n "$STRIP"; then
36707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36708$as_echo "$STRIP" >&6; }
36709else
36710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36711$as_echo "no" >&6; }
36712fi
36713
36714
36715    test -n "$STRIP" && break
36716  done
36717fi
36718if test -z "$STRIP"; then
36719  ac_ct_STRIP=$STRIP
36720  for ac_prog in strip
36721do
36722  # Extract the first word of "$ac_prog", so it can be a program name with args.
36723set dummy $ac_prog; ac_word=$2
36724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36725$as_echo_n "checking for $ac_word... " >&6; }
36726if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36727  $as_echo_n "(cached) " >&6
36728else
36729  if test -n "$ac_ct_STRIP"; then
36730  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36731else
36732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36733for as_dir in $PATH
36734do
36735  IFS=$as_save_IFS
36736  test -z "$as_dir" && as_dir=.
36737    for ac_exec_ext in '' $ac_executable_extensions; do
36738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36739    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36741    break 2
36742  fi
36743done
36744  done
36745IFS=$as_save_IFS
36746
36747fi
36748fi
36749ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36750if test -n "$ac_ct_STRIP"; then
36751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36752$as_echo "$ac_ct_STRIP" >&6; }
36753else
36754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36755$as_echo "no" >&6; }
36756fi
36757
36758
36759  test -n "$ac_ct_STRIP" && break
36760done
36761
36762  if test "x$ac_ct_STRIP" = x; then
36763    STRIP=""
36764  else
36765    case $cross_compiling:$ac_tool_warned in
36766yes:)
36767{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36768$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36769ac_tool_warned=yes ;;
36770esac
36771    STRIP=$ac_ct_STRIP
36772  fi
36773fi
36774
36775    else
36776      # If it succeeded, then it was overridden by the user. We will use it
36777      # for the tool.
36778
36779      # First remove it from the list of overridden variables, so we can test
36780      # for unknown variables in the end.
36781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36782
36783      # Check if the provided tool contains a complete path.
36784      tool_specified="$STRIP"
36785      tool_basename="${tool_specified##*/}"
36786      if test "x$tool_basename" = "x$tool_specified"; then
36787        # A command without a complete path is provided, search $PATH.
36788        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36789$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36790        # Extract the first word of "$tool_basename", so it can be a program name with args.
36791set dummy $tool_basename; ac_word=$2
36792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36793$as_echo_n "checking for $ac_word... " >&6; }
36794if ${ac_cv_path_STRIP+:} false; then :
36795  $as_echo_n "(cached) " >&6
36796else
36797  case $STRIP in
36798  [\\/]* | ?:[\\/]*)
36799  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36800  ;;
36801  *)
36802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36803for as_dir in $PATH
36804do
36805  IFS=$as_save_IFS
36806  test -z "$as_dir" && as_dir=.
36807    for ac_exec_ext in '' $ac_executable_extensions; do
36808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36809    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36811    break 2
36812  fi
36813done
36814  done
36815IFS=$as_save_IFS
36816
36817  ;;
36818esac
36819fi
36820STRIP=$ac_cv_path_STRIP
36821if test -n "$STRIP"; then
36822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36823$as_echo "$STRIP" >&6; }
36824else
36825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36826$as_echo "no" >&6; }
36827fi
36828
36829
36830        if test "x$STRIP" = x; then
36831          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36832        fi
36833      else
36834        # Otherwise we believe it is a complete path. Use it as it is.
36835        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36836$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36838$as_echo_n "checking for STRIP... " >&6; }
36839        if test ! -x "$tool_specified"; then
36840          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36841$as_echo "not found" >&6; }
36842          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36843        fi
36844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36845$as_echo "$tool_specified" >&6; }
36846      fi
36847    fi
36848  fi
36849
36850
36851
36852  # Only process if variable expands to non-empty
36853
36854  if test "x$STRIP" != x; then
36855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36856
36857  # First separate the path from the arguments. This will split at the first
36858  # space.
36859  complete="$STRIP"
36860  path="${complete%% *}"
36861  tmp="$complete EOL"
36862  arguments="${tmp#* }"
36863
36864  # Input might be given as Windows format, start by converting to
36865  # unix format.
36866  new_path=`$CYGPATH -u "$path"`
36867
36868  # Now try to locate executable using which
36869  new_path=`$WHICH "$new_path" 2> /dev/null`
36870  # bat and cmd files are not always considered executable in cygwin causing which
36871  # to not find them
36872  if test "x$new_path" = x \
36873      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36874      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36875    new_path=`$CYGPATH -u "$path"`
36876  fi
36877  if test "x$new_path" = x; then
36878    # Oops. Which didn't find the executable.
36879    # The splitting of arguments from the executable at a space might have been incorrect,
36880    # since paths with space are more likely in Windows. Give it another try with the whole
36881    # argument.
36882    path="$complete"
36883    arguments="EOL"
36884    new_path=`$CYGPATH -u "$path"`
36885    new_path=`$WHICH "$new_path" 2> /dev/null`
36886    # bat and cmd files are not always considered executable in cygwin causing which
36887    # to not find them
36888    if test "x$new_path" = x \
36889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36891      new_path=`$CYGPATH -u "$path"`
36892    fi
36893    if test "x$new_path" = x; then
36894      # It's still not found. Now this is an unrecoverable error.
36895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36896$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36897      has_space=`$ECHO "$complete" | $GREP " "`
36898      if test "x$has_space" != x; then
36899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36901      fi
36902      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36903    fi
36904  fi
36905
36906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36909  # "foo.exe" is OK but "foo" is an error.
36910  #
36911  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36912  # It is also a way to make sure we got the proper file name for the real test later on.
36913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36914  if test "x$test_shortpath" = x; then
36915    # Short path failed, file does not exist as specified.
36916    # Try adding .exe or .cmd
36917    if test -f "${new_path}.exe"; then
36918      input_to_shortpath="${new_path}.exe"
36919    elif test -f "${new_path}.cmd"; then
36920      input_to_shortpath="${new_path}.cmd"
36921    else
36922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36923$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36924      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36925$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36926      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36927    fi
36928  else
36929    input_to_shortpath="$new_path"
36930  fi
36931
36932  # Call helper function which possibly converts this using DOS-style short mode.
36933  # If so, the updated path is stored in $new_path.
36934  new_path="$input_to_shortpath"
36935
36936  input_path="$input_to_shortpath"
36937  # Check if we need to convert this using DOS-style short mode. If the path
36938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36939  # take no chances and rewrite it.
36940  # Note: m4 eats our [], so we need to use [ and ] instead.
36941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36942  if test "x$has_forbidden_chars" != x; then
36943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36947      # Going to short mode and back again did indeed matter. Since short mode is
36948      # case insensitive, let's make it lowercase to improve readability.
36949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36950      # Now convert it back to Unix-style (cygpath)
36951      input_path=`$CYGPATH -u "$shortmode_path"`
36952      new_path="$input_path"
36953    fi
36954  fi
36955
36956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36957  if test "x$test_cygdrive_prefix" = x; then
36958    # As a simple fix, exclude /usr/bin since it's not a real path.
36959    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36961      # a path prefixed by /cygdrive for fixpath to work.
36962      new_path="$CYGWIN_ROOT_PATH$input_path"
36963    fi
36964  fi
36965
36966  # remove trailing .exe if any
36967  new_path="${new_path/%.exe/}"
36968
36969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36970
36971  # First separate the path from the arguments. This will split at the first
36972  # space.
36973  complete="$STRIP"
36974  path="${complete%% *}"
36975  tmp="$complete EOL"
36976  arguments="${tmp#* }"
36977
36978  # Input might be given as Windows format, start by converting to
36979  # unix format.
36980  new_path="$path"
36981
36982  windows_path="$new_path"
36983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36984    unix_path=`$CYGPATH -u "$windows_path"`
36985    new_path="$unix_path"
36986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36988    new_path="$unix_path"
36989  fi
36990
36991
36992  # Now try to locate executable using which
36993  new_path=`$WHICH "$new_path" 2> /dev/null`
36994
36995  if test "x$new_path" = x; then
36996    # Oops. Which didn't find the executable.
36997    # The splitting of arguments from the executable at a space might have been incorrect,
36998    # since paths with space are more likely in Windows. Give it another try with the whole
36999    # argument.
37000    path="$complete"
37001    arguments="EOL"
37002    new_path="$path"
37003
37004  windows_path="$new_path"
37005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37006    unix_path=`$CYGPATH -u "$windows_path"`
37007    new_path="$unix_path"
37008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37010    new_path="$unix_path"
37011  fi
37012
37013
37014    new_path=`$WHICH "$new_path" 2> /dev/null`
37015    # bat and cmd files are not always considered executable in MSYS causing which
37016    # to not find them
37017    if test "x$new_path" = x \
37018        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37019        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37020      new_path="$path"
37021
37022  windows_path="$new_path"
37023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37024    unix_path=`$CYGPATH -u "$windows_path"`
37025    new_path="$unix_path"
37026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37028    new_path="$unix_path"
37029  fi
37030
37031    fi
37032
37033    if test "x$new_path" = x; then
37034      # It's still not found. Now this is an unrecoverable error.
37035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37036$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37037      has_space=`$ECHO "$complete" | $GREP " "`
37038      if test "x$has_space" != x; then
37039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37041      fi
37042      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37043    fi
37044  fi
37045
37046  # Now new_path has a complete unix path to the binary
37047  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37048    # Keep paths in /bin as-is, but remove trailing .exe if any
37049    new_path="${new_path/%.exe/}"
37050    # Do not save /bin paths to all_fixpath_prefixes!
37051  else
37052    # Not in mixed or Windows style, start by that.
37053    new_path=`cmd //c echo $new_path`
37054
37055  input_path="$new_path"
37056  # Check if we need to convert this using DOS-style short mode. If the path
37057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37058  # take no chances and rewrite it.
37059  # Note: m4 eats our [], so we need to use [ and ] instead.
37060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37061  if test "x$has_forbidden_chars" != x; then
37062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37064  fi
37065
37066    # Output is in $new_path
37067
37068  windows_path="$new_path"
37069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37070    unix_path=`$CYGPATH -u "$windows_path"`
37071    new_path="$unix_path"
37072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37074    new_path="$unix_path"
37075  fi
37076
37077    # remove trailing .exe if any
37078    new_path="${new_path/%.exe/}"
37079
37080    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37081    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37082  fi
37083
37084    else
37085      # We're on a unix platform. Hooray! :)
37086      # First separate the path from the arguments. This will split at the first
37087      # space.
37088      complete="$STRIP"
37089      path="${complete%% *}"
37090      tmp="$complete EOL"
37091      arguments="${tmp#* }"
37092
37093      # Cannot rely on the command "which" here since it doesn't always work.
37094      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37095      if test -z "$is_absolute_path"; then
37096        # Path to executable is not absolute. Find it.
37097        IFS_save="$IFS"
37098        IFS=:
37099        for p in $PATH; do
37100          if test -f "$p/$path" && test -x "$p/$path"; then
37101            new_path="$p/$path"
37102            break
37103          fi
37104        done
37105        IFS="$IFS_save"
37106      else
37107        # This is an absolute path, we can use it without further modifications.
37108        new_path="$path"
37109      fi
37110
37111      if test "x$new_path" = x; then
37112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37113$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37114        has_space=`$ECHO "$complete" | $GREP " "`
37115        if test "x$has_space" != x; then
37116          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37117$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37118        fi
37119        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37120      fi
37121    fi
37122
37123    # Now join together the path and the arguments once again
37124    if test "x$arguments" != xEOL; then
37125      new_complete="$new_path ${arguments% *}"
37126    else
37127      new_complete="$new_path"
37128    fi
37129
37130    if test "x$complete" != "x$new_complete"; then
37131      STRIP="$new_complete"
37132      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37133$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37134    fi
37135  fi
37136
37137
37138
37139  # Publish this variable in the help.
37140
37141
37142  if test "x$NM" = x; then
37143    # The variable is not set by user, try to locate tool using the code snippet
37144    if test -n "$ac_tool_prefix"; then
37145  for ac_prog in nm
37146  do
37147    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37148set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37150$as_echo_n "checking for $ac_word... " >&6; }
37151if ${ac_cv_prog_NM+:} false; then :
37152  $as_echo_n "(cached) " >&6
37153else
37154  if test -n "$NM"; then
37155  ac_cv_prog_NM="$NM" # Let the user override the test.
37156else
37157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37158for as_dir in $PATH
37159do
37160  IFS=$as_save_IFS
37161  test -z "$as_dir" && as_dir=.
37162    for ac_exec_ext in '' $ac_executable_extensions; do
37163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37164    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37166    break 2
37167  fi
37168done
37169  done
37170IFS=$as_save_IFS
37171
37172fi
37173fi
37174NM=$ac_cv_prog_NM
37175if test -n "$NM"; then
37176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37177$as_echo "$NM" >&6; }
37178else
37179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37180$as_echo "no" >&6; }
37181fi
37182
37183
37184    test -n "$NM" && break
37185  done
37186fi
37187if test -z "$NM"; then
37188  ac_ct_NM=$NM
37189  for ac_prog in nm
37190do
37191  # Extract the first word of "$ac_prog", so it can be a program name with args.
37192set dummy $ac_prog; ac_word=$2
37193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37194$as_echo_n "checking for $ac_word... " >&6; }
37195if ${ac_cv_prog_ac_ct_NM+:} false; then :
37196  $as_echo_n "(cached) " >&6
37197else
37198  if test -n "$ac_ct_NM"; then
37199  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37200else
37201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37202for as_dir in $PATH
37203do
37204  IFS=$as_save_IFS
37205  test -z "$as_dir" && as_dir=.
37206    for ac_exec_ext in '' $ac_executable_extensions; do
37207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37208    ac_cv_prog_ac_ct_NM="$ac_prog"
37209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37210    break 2
37211  fi
37212done
37213  done
37214IFS=$as_save_IFS
37215
37216fi
37217fi
37218ac_ct_NM=$ac_cv_prog_ac_ct_NM
37219if test -n "$ac_ct_NM"; then
37220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37221$as_echo "$ac_ct_NM" >&6; }
37222else
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37224$as_echo "no" >&6; }
37225fi
37226
37227
37228  test -n "$ac_ct_NM" && break
37229done
37230
37231  if test "x$ac_ct_NM" = x; then
37232    NM=""
37233  else
37234    case $cross_compiling:$ac_tool_warned in
37235yes:)
37236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37238ac_tool_warned=yes ;;
37239esac
37240    NM=$ac_ct_NM
37241  fi
37242fi
37243
37244  else
37245    # The variable is set, but is it from the command line or the environment?
37246
37247    # Try to remove the string !NM! from our list.
37248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37250      # If it failed, the variable was not from the command line. Ignore it,
37251      # but warn the user (except for BASH, which is always set by the calling BASH).
37252      if test "xNM" != xBASH; then
37253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37254$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37255      fi
37256      # Try to locate tool using the code snippet
37257      if test -n "$ac_tool_prefix"; then
37258  for ac_prog in nm
37259  do
37260    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37261set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37263$as_echo_n "checking for $ac_word... " >&6; }
37264if ${ac_cv_prog_NM+:} false; then :
37265  $as_echo_n "(cached) " >&6
37266else
37267  if test -n "$NM"; then
37268  ac_cv_prog_NM="$NM" # Let the user override the test.
37269else
37270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37271for as_dir in $PATH
37272do
37273  IFS=$as_save_IFS
37274  test -z "$as_dir" && as_dir=.
37275    for ac_exec_ext in '' $ac_executable_extensions; do
37276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37277    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37279    break 2
37280  fi
37281done
37282  done
37283IFS=$as_save_IFS
37284
37285fi
37286fi
37287NM=$ac_cv_prog_NM
37288if test -n "$NM"; then
37289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37290$as_echo "$NM" >&6; }
37291else
37292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37293$as_echo "no" >&6; }
37294fi
37295
37296
37297    test -n "$NM" && break
37298  done
37299fi
37300if test -z "$NM"; then
37301  ac_ct_NM=$NM
37302  for ac_prog in nm
37303do
37304  # Extract the first word of "$ac_prog", so it can be a program name with args.
37305set dummy $ac_prog; ac_word=$2
37306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37307$as_echo_n "checking for $ac_word... " >&6; }
37308if ${ac_cv_prog_ac_ct_NM+:} false; then :
37309  $as_echo_n "(cached) " >&6
37310else
37311  if test -n "$ac_ct_NM"; then
37312  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37313else
37314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37315for as_dir in $PATH
37316do
37317  IFS=$as_save_IFS
37318  test -z "$as_dir" && as_dir=.
37319    for ac_exec_ext in '' $ac_executable_extensions; do
37320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37321    ac_cv_prog_ac_ct_NM="$ac_prog"
37322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37323    break 2
37324  fi
37325done
37326  done
37327IFS=$as_save_IFS
37328
37329fi
37330fi
37331ac_ct_NM=$ac_cv_prog_ac_ct_NM
37332if test -n "$ac_ct_NM"; then
37333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37334$as_echo "$ac_ct_NM" >&6; }
37335else
37336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37337$as_echo "no" >&6; }
37338fi
37339
37340
37341  test -n "$ac_ct_NM" && break
37342done
37343
37344  if test "x$ac_ct_NM" = x; then
37345    NM=""
37346  else
37347    case $cross_compiling:$ac_tool_warned in
37348yes:)
37349{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37350$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37351ac_tool_warned=yes ;;
37352esac
37353    NM=$ac_ct_NM
37354  fi
37355fi
37356
37357    else
37358      # If it succeeded, then it was overridden by the user. We will use it
37359      # for the tool.
37360
37361      # First remove it from the list of overridden variables, so we can test
37362      # for unknown variables in the end.
37363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37364
37365      # Check if the provided tool contains a complete path.
37366      tool_specified="$NM"
37367      tool_basename="${tool_specified##*/}"
37368      if test "x$tool_basename" = "x$tool_specified"; then
37369        # A command without a complete path is provided, search $PATH.
37370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37371$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37372        # Extract the first word of "$tool_basename", so it can be a program name with args.
37373set dummy $tool_basename; ac_word=$2
37374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37375$as_echo_n "checking for $ac_word... " >&6; }
37376if ${ac_cv_path_NM+:} false; then :
37377  $as_echo_n "(cached) " >&6
37378else
37379  case $NM in
37380  [\\/]* | ?:[\\/]*)
37381  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37382  ;;
37383  *)
37384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37385for as_dir in $PATH
37386do
37387  IFS=$as_save_IFS
37388  test -z "$as_dir" && as_dir=.
37389    for ac_exec_ext in '' $ac_executable_extensions; do
37390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37391    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37393    break 2
37394  fi
37395done
37396  done
37397IFS=$as_save_IFS
37398
37399  ;;
37400esac
37401fi
37402NM=$ac_cv_path_NM
37403if test -n "$NM"; then
37404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37405$as_echo "$NM" >&6; }
37406else
37407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37408$as_echo "no" >&6; }
37409fi
37410
37411
37412        if test "x$NM" = x; then
37413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37414        fi
37415      else
37416        # Otherwise we believe it is a complete path. Use it as it is.
37417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37418$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37420$as_echo_n "checking for NM... " >&6; }
37421        if test ! -x "$tool_specified"; then
37422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37423$as_echo "not found" >&6; }
37424          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37425        fi
37426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37427$as_echo "$tool_specified" >&6; }
37428      fi
37429    fi
37430  fi
37431
37432
37433
37434  # Only process if variable expands to non-empty
37435
37436  if test "x$NM" != x; then
37437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37438
37439  # First separate the path from the arguments. This will split at the first
37440  # space.
37441  complete="$NM"
37442  path="${complete%% *}"
37443  tmp="$complete EOL"
37444  arguments="${tmp#* }"
37445
37446  # Input might be given as Windows format, start by converting to
37447  # unix format.
37448  new_path=`$CYGPATH -u "$path"`
37449
37450  # Now try to locate executable using which
37451  new_path=`$WHICH "$new_path" 2> /dev/null`
37452  # bat and cmd files are not always considered executable in cygwin causing which
37453  # to not find them
37454  if test "x$new_path" = x \
37455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37457    new_path=`$CYGPATH -u "$path"`
37458  fi
37459  if test "x$new_path" = x; then
37460    # Oops. Which didn't find the executable.
37461    # The splitting of arguments from the executable at a space might have been incorrect,
37462    # since paths with space are more likely in Windows. Give it another try with the whole
37463    # argument.
37464    path="$complete"
37465    arguments="EOL"
37466    new_path=`$CYGPATH -u "$path"`
37467    new_path=`$WHICH "$new_path" 2> /dev/null`
37468    # bat and cmd files are not always considered executable in cygwin causing which
37469    # to not find them
37470    if test "x$new_path" = x \
37471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37473      new_path=`$CYGPATH -u "$path"`
37474    fi
37475    if test "x$new_path" = x; then
37476      # It's still not found. Now this is an unrecoverable error.
37477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37478$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37479      has_space=`$ECHO "$complete" | $GREP " "`
37480      if test "x$has_space" != x; then
37481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37483      fi
37484      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37485    fi
37486  fi
37487
37488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37491  # "foo.exe" is OK but "foo" is an error.
37492  #
37493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37494  # It is also a way to make sure we got the proper file name for the real test later on.
37495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37496  if test "x$test_shortpath" = x; then
37497    # Short path failed, file does not exist as specified.
37498    # Try adding .exe or .cmd
37499    if test -f "${new_path}.exe"; then
37500      input_to_shortpath="${new_path}.exe"
37501    elif test -f "${new_path}.cmd"; then
37502      input_to_shortpath="${new_path}.cmd"
37503    else
37504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37505$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37508      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37509    fi
37510  else
37511    input_to_shortpath="$new_path"
37512  fi
37513
37514  # Call helper function which possibly converts this using DOS-style short mode.
37515  # If so, the updated path is stored in $new_path.
37516  new_path="$input_to_shortpath"
37517
37518  input_path="$input_to_shortpath"
37519  # Check if we need to convert this using DOS-style short mode. If the path
37520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37521  # take no chances and rewrite it.
37522  # Note: m4 eats our [], so we need to use [ and ] instead.
37523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37524  if test "x$has_forbidden_chars" != x; then
37525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37529      # Going to short mode and back again did indeed matter. Since short mode is
37530      # case insensitive, let's make it lowercase to improve readability.
37531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37532      # Now convert it back to Unix-style (cygpath)
37533      input_path=`$CYGPATH -u "$shortmode_path"`
37534      new_path="$input_path"
37535    fi
37536  fi
37537
37538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37539  if test "x$test_cygdrive_prefix" = x; then
37540    # As a simple fix, exclude /usr/bin since it's not a real path.
37541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37543      # a path prefixed by /cygdrive for fixpath to work.
37544      new_path="$CYGWIN_ROOT_PATH$input_path"
37545    fi
37546  fi
37547
37548  # remove trailing .exe if any
37549  new_path="${new_path/%.exe/}"
37550
37551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37552
37553  # First separate the path from the arguments. This will split at the first
37554  # space.
37555  complete="$NM"
37556  path="${complete%% *}"
37557  tmp="$complete EOL"
37558  arguments="${tmp#* }"
37559
37560  # Input might be given as Windows format, start by converting to
37561  # unix format.
37562  new_path="$path"
37563
37564  windows_path="$new_path"
37565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37566    unix_path=`$CYGPATH -u "$windows_path"`
37567    new_path="$unix_path"
37568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37570    new_path="$unix_path"
37571  fi
37572
37573
37574  # Now try to locate executable using which
37575  new_path=`$WHICH "$new_path" 2> /dev/null`
37576
37577  if test "x$new_path" = x; then
37578    # Oops. Which didn't find the executable.
37579    # The splitting of arguments from the executable at a space might have been incorrect,
37580    # since paths with space are more likely in Windows. Give it another try with the whole
37581    # argument.
37582    path="$complete"
37583    arguments="EOL"
37584    new_path="$path"
37585
37586  windows_path="$new_path"
37587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37588    unix_path=`$CYGPATH -u "$windows_path"`
37589    new_path="$unix_path"
37590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37592    new_path="$unix_path"
37593  fi
37594
37595
37596    new_path=`$WHICH "$new_path" 2> /dev/null`
37597    # bat and cmd files are not always considered executable in MSYS causing which
37598    # to not find them
37599    if test "x$new_path" = x \
37600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37602      new_path="$path"
37603
37604  windows_path="$new_path"
37605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37606    unix_path=`$CYGPATH -u "$windows_path"`
37607    new_path="$unix_path"
37608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37610    new_path="$unix_path"
37611  fi
37612
37613    fi
37614
37615    if test "x$new_path" = x; then
37616      # It's still not found. Now this is an unrecoverable error.
37617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37618$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37619      has_space=`$ECHO "$complete" | $GREP " "`
37620      if test "x$has_space" != x; then
37621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37623      fi
37624      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37625    fi
37626  fi
37627
37628  # Now new_path has a complete unix path to the binary
37629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37630    # Keep paths in /bin as-is, but remove trailing .exe if any
37631    new_path="${new_path/%.exe/}"
37632    # Do not save /bin paths to all_fixpath_prefixes!
37633  else
37634    # Not in mixed or Windows style, start by that.
37635    new_path=`cmd //c echo $new_path`
37636
37637  input_path="$new_path"
37638  # Check if we need to convert this using DOS-style short mode. If the path
37639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37640  # take no chances and rewrite it.
37641  # Note: m4 eats our [], so we need to use [ and ] instead.
37642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37643  if test "x$has_forbidden_chars" != x; then
37644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37646  fi
37647
37648    # Output is in $new_path
37649
37650  windows_path="$new_path"
37651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37652    unix_path=`$CYGPATH -u "$windows_path"`
37653    new_path="$unix_path"
37654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37656    new_path="$unix_path"
37657  fi
37658
37659    # remove trailing .exe if any
37660    new_path="${new_path/%.exe/}"
37661
37662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37664  fi
37665
37666    else
37667      # We're on a unix platform. Hooray! :)
37668      # First separate the path from the arguments. This will split at the first
37669      # space.
37670      complete="$NM"
37671      path="${complete%% *}"
37672      tmp="$complete EOL"
37673      arguments="${tmp#* }"
37674
37675      # Cannot rely on the command "which" here since it doesn't always work.
37676      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37677      if test -z "$is_absolute_path"; then
37678        # Path to executable is not absolute. Find it.
37679        IFS_save="$IFS"
37680        IFS=:
37681        for p in $PATH; do
37682          if test -f "$p/$path" && test -x "$p/$path"; then
37683            new_path="$p/$path"
37684            break
37685          fi
37686        done
37687        IFS="$IFS_save"
37688      else
37689        # This is an absolute path, we can use it without further modifications.
37690        new_path="$path"
37691      fi
37692
37693      if test "x$new_path" = x; then
37694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37695$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37696        has_space=`$ECHO "$complete" | $GREP " "`
37697        if test "x$has_space" != x; then
37698          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37700        fi
37701        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37702      fi
37703    fi
37704
37705    # Now join together the path and the arguments once again
37706    if test "x$arguments" != xEOL; then
37707      new_complete="$new_path ${arguments% *}"
37708    else
37709      new_complete="$new_path"
37710    fi
37711
37712    if test "x$complete" != "x$new_complete"; then
37713      NM="$new_complete"
37714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37715$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37716    fi
37717  fi
37718
37719    GNM="$NM"
37720
37721  fi
37722
37723  # objcopy is used for moving debug symbols to separate files when
37724  # full debug symbols are enabled.
37725  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37726
37727
37728  # Publish this variable in the help.
37729
37730
37731  if test "x$OBJCOPY" = x; then
37732    # The variable is not set by user, try to locate tool using the code snippet
37733    if test -n "$ac_tool_prefix"; then
37734  for ac_prog in gobjcopy objcopy
37735  do
37736    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37739$as_echo_n "checking for $ac_word... " >&6; }
37740if ${ac_cv_prog_OBJCOPY+:} false; then :
37741  $as_echo_n "(cached) " >&6
37742else
37743  if test -n "$OBJCOPY"; then
37744  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37745else
37746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37747for as_dir in $PATH
37748do
37749  IFS=$as_save_IFS
37750  test -z "$as_dir" && as_dir=.
37751    for ac_exec_ext in '' $ac_executable_extensions; do
37752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37753    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37755    break 2
37756  fi
37757done
37758  done
37759IFS=$as_save_IFS
37760
37761fi
37762fi
37763OBJCOPY=$ac_cv_prog_OBJCOPY
37764if test -n "$OBJCOPY"; then
37765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37766$as_echo "$OBJCOPY" >&6; }
37767else
37768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37769$as_echo "no" >&6; }
37770fi
37771
37772
37773    test -n "$OBJCOPY" && break
37774  done
37775fi
37776if test -z "$OBJCOPY"; then
37777  ac_ct_OBJCOPY=$OBJCOPY
37778  for ac_prog in gobjcopy objcopy
37779do
37780  # Extract the first word of "$ac_prog", so it can be a program name with args.
37781set dummy $ac_prog; ac_word=$2
37782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37783$as_echo_n "checking for $ac_word... " >&6; }
37784if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37785  $as_echo_n "(cached) " >&6
37786else
37787  if test -n "$ac_ct_OBJCOPY"; then
37788  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37789else
37790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37791for as_dir in $PATH
37792do
37793  IFS=$as_save_IFS
37794  test -z "$as_dir" && as_dir=.
37795    for ac_exec_ext in '' $ac_executable_extensions; do
37796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37797    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37799    break 2
37800  fi
37801done
37802  done
37803IFS=$as_save_IFS
37804
37805fi
37806fi
37807ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37808if test -n "$ac_ct_OBJCOPY"; then
37809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37810$as_echo "$ac_ct_OBJCOPY" >&6; }
37811else
37812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37813$as_echo "no" >&6; }
37814fi
37815
37816
37817  test -n "$ac_ct_OBJCOPY" && break
37818done
37819
37820  if test "x$ac_ct_OBJCOPY" = x; then
37821    OBJCOPY=""
37822  else
37823    case $cross_compiling:$ac_tool_warned in
37824yes:)
37825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37827ac_tool_warned=yes ;;
37828esac
37829    OBJCOPY=$ac_ct_OBJCOPY
37830  fi
37831fi
37832
37833  else
37834    # The variable is set, but is it from the command line or the environment?
37835
37836    # Try to remove the string !OBJCOPY! from our list.
37837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37839      # If it failed, the variable was not from the command line. Ignore it,
37840      # but warn the user (except for BASH, which is always set by the calling BASH).
37841      if test "xOBJCOPY" != xBASH; then
37842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37843$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37844      fi
37845      # Try to locate tool using the code snippet
37846      if test -n "$ac_tool_prefix"; then
37847  for ac_prog in gobjcopy objcopy
37848  do
37849    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37850set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37852$as_echo_n "checking for $ac_word... " >&6; }
37853if ${ac_cv_prog_OBJCOPY+:} false; then :
37854  $as_echo_n "(cached) " >&6
37855else
37856  if test -n "$OBJCOPY"; then
37857  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37858else
37859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37860for as_dir in $PATH
37861do
37862  IFS=$as_save_IFS
37863  test -z "$as_dir" && as_dir=.
37864    for ac_exec_ext in '' $ac_executable_extensions; do
37865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37866    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37868    break 2
37869  fi
37870done
37871  done
37872IFS=$as_save_IFS
37873
37874fi
37875fi
37876OBJCOPY=$ac_cv_prog_OBJCOPY
37877if test -n "$OBJCOPY"; then
37878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37879$as_echo "$OBJCOPY" >&6; }
37880else
37881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37882$as_echo "no" >&6; }
37883fi
37884
37885
37886    test -n "$OBJCOPY" && break
37887  done
37888fi
37889if test -z "$OBJCOPY"; then
37890  ac_ct_OBJCOPY=$OBJCOPY
37891  for ac_prog in gobjcopy objcopy
37892do
37893  # Extract the first word of "$ac_prog", so it can be a program name with args.
37894set dummy $ac_prog; ac_word=$2
37895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37896$as_echo_n "checking for $ac_word... " >&6; }
37897if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37898  $as_echo_n "(cached) " >&6
37899else
37900  if test -n "$ac_ct_OBJCOPY"; then
37901  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37902else
37903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37904for as_dir in $PATH
37905do
37906  IFS=$as_save_IFS
37907  test -z "$as_dir" && as_dir=.
37908    for ac_exec_ext in '' $ac_executable_extensions; do
37909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37910    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37912    break 2
37913  fi
37914done
37915  done
37916IFS=$as_save_IFS
37917
37918fi
37919fi
37920ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37921if test -n "$ac_ct_OBJCOPY"; then
37922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37923$as_echo "$ac_ct_OBJCOPY" >&6; }
37924else
37925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37926$as_echo "no" >&6; }
37927fi
37928
37929
37930  test -n "$ac_ct_OBJCOPY" && break
37931done
37932
37933  if test "x$ac_ct_OBJCOPY" = x; then
37934    OBJCOPY=""
37935  else
37936    case $cross_compiling:$ac_tool_warned in
37937yes:)
37938{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37939$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37940ac_tool_warned=yes ;;
37941esac
37942    OBJCOPY=$ac_ct_OBJCOPY
37943  fi
37944fi
37945
37946    else
37947      # If it succeeded, then it was overridden by the user. We will use it
37948      # for the tool.
37949
37950      # First remove it from the list of overridden variables, so we can test
37951      # for unknown variables in the end.
37952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37953
37954      # Check if the provided tool contains a complete path.
37955      tool_specified="$OBJCOPY"
37956      tool_basename="${tool_specified##*/}"
37957      if test "x$tool_basename" = "x$tool_specified"; then
37958        # A command without a complete path is provided, search $PATH.
37959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37960$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37961        # Extract the first word of "$tool_basename", so it can be a program name with args.
37962set dummy $tool_basename; ac_word=$2
37963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37964$as_echo_n "checking for $ac_word... " >&6; }
37965if ${ac_cv_path_OBJCOPY+:} false; then :
37966  $as_echo_n "(cached) " >&6
37967else
37968  case $OBJCOPY in
37969  [\\/]* | ?:[\\/]*)
37970  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37971  ;;
37972  *)
37973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37974for as_dir in $PATH
37975do
37976  IFS=$as_save_IFS
37977  test -z "$as_dir" && as_dir=.
37978    for ac_exec_ext in '' $ac_executable_extensions; do
37979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37980    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37982    break 2
37983  fi
37984done
37985  done
37986IFS=$as_save_IFS
37987
37988  ;;
37989esac
37990fi
37991OBJCOPY=$ac_cv_path_OBJCOPY
37992if test -n "$OBJCOPY"; then
37993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37994$as_echo "$OBJCOPY" >&6; }
37995else
37996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37997$as_echo "no" >&6; }
37998fi
37999
38000
38001        if test "x$OBJCOPY" = x; then
38002          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38003        fi
38004      else
38005        # Otherwise we believe it is a complete path. Use it as it is.
38006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38007$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38008        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38009$as_echo_n "checking for OBJCOPY... " >&6; }
38010        if test ! -x "$tool_specified"; then
38011          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38012$as_echo "not found" >&6; }
38013          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38014        fi
38015        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38016$as_echo "$tool_specified" >&6; }
38017      fi
38018    fi
38019  fi
38020
38021
38022    # Only call fixup if objcopy was found.
38023    if test -n "$OBJCOPY"; then
38024
38025  # Only process if variable expands to non-empty
38026
38027  if test "x$OBJCOPY" != x; then
38028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38029
38030  # First separate the path from the arguments. This will split at the first
38031  # space.
38032  complete="$OBJCOPY"
38033  path="${complete%% *}"
38034  tmp="$complete EOL"
38035  arguments="${tmp#* }"
38036
38037  # Input might be given as Windows format, start by converting to
38038  # unix format.
38039  new_path=`$CYGPATH -u "$path"`
38040
38041  # Now try to locate executable using which
38042  new_path=`$WHICH "$new_path" 2> /dev/null`
38043  # bat and cmd files are not always considered executable in cygwin causing which
38044  # to not find them
38045  if test "x$new_path" = x \
38046      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38047      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38048    new_path=`$CYGPATH -u "$path"`
38049  fi
38050  if test "x$new_path" = x; then
38051    # Oops. Which didn't find the executable.
38052    # The splitting of arguments from the executable at a space might have been incorrect,
38053    # since paths with space are more likely in Windows. Give it another try with the whole
38054    # argument.
38055    path="$complete"
38056    arguments="EOL"
38057    new_path=`$CYGPATH -u "$path"`
38058    new_path=`$WHICH "$new_path" 2> /dev/null`
38059    # bat and cmd files are not always considered executable in cygwin causing which
38060    # to not find them
38061    if test "x$new_path" = x \
38062        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38063        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38064      new_path=`$CYGPATH -u "$path"`
38065    fi
38066    if test "x$new_path" = x; then
38067      # It's still not found. Now this is an unrecoverable error.
38068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38069$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38070      has_space=`$ECHO "$complete" | $GREP " "`
38071      if test "x$has_space" != x; then
38072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38074      fi
38075      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38076    fi
38077  fi
38078
38079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38082  # "foo.exe" is OK but "foo" is an error.
38083  #
38084  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38085  # It is also a way to make sure we got the proper file name for the real test later on.
38086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38087  if test "x$test_shortpath" = x; then
38088    # Short path failed, file does not exist as specified.
38089    # Try adding .exe or .cmd
38090    if test -f "${new_path}.exe"; then
38091      input_to_shortpath="${new_path}.exe"
38092    elif test -f "${new_path}.cmd"; then
38093      input_to_shortpath="${new_path}.cmd"
38094    else
38095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38096$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38097      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38098$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38099      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38100    fi
38101  else
38102    input_to_shortpath="$new_path"
38103  fi
38104
38105  # Call helper function which possibly converts this using DOS-style short mode.
38106  # If so, the updated path is stored in $new_path.
38107  new_path="$input_to_shortpath"
38108
38109  input_path="$input_to_shortpath"
38110  # Check if we need to convert this using DOS-style short mode. If the path
38111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38112  # take no chances and rewrite it.
38113  # Note: m4 eats our [], so we need to use [ and ] instead.
38114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38115  if test "x$has_forbidden_chars" != x; then
38116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38120      # Going to short mode and back again did indeed matter. Since short mode is
38121      # case insensitive, let's make it lowercase to improve readability.
38122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38123      # Now convert it back to Unix-style (cygpath)
38124      input_path=`$CYGPATH -u "$shortmode_path"`
38125      new_path="$input_path"
38126    fi
38127  fi
38128
38129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38130  if test "x$test_cygdrive_prefix" = x; then
38131    # As a simple fix, exclude /usr/bin since it's not a real path.
38132    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38134      # a path prefixed by /cygdrive for fixpath to work.
38135      new_path="$CYGWIN_ROOT_PATH$input_path"
38136    fi
38137  fi
38138
38139  # remove trailing .exe if any
38140  new_path="${new_path/%.exe/}"
38141
38142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38143
38144  # First separate the path from the arguments. This will split at the first
38145  # space.
38146  complete="$OBJCOPY"
38147  path="${complete%% *}"
38148  tmp="$complete EOL"
38149  arguments="${tmp#* }"
38150
38151  # Input might be given as Windows format, start by converting to
38152  # unix format.
38153  new_path="$path"
38154
38155  windows_path="$new_path"
38156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38157    unix_path=`$CYGPATH -u "$windows_path"`
38158    new_path="$unix_path"
38159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38161    new_path="$unix_path"
38162  fi
38163
38164
38165  # Now try to locate executable using which
38166  new_path=`$WHICH "$new_path" 2> /dev/null`
38167
38168  if test "x$new_path" = x; then
38169    # Oops. Which didn't find the executable.
38170    # The splitting of arguments from the executable at a space might have been incorrect,
38171    # since paths with space are more likely in Windows. Give it another try with the whole
38172    # argument.
38173    path="$complete"
38174    arguments="EOL"
38175    new_path="$path"
38176
38177  windows_path="$new_path"
38178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38179    unix_path=`$CYGPATH -u "$windows_path"`
38180    new_path="$unix_path"
38181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38183    new_path="$unix_path"
38184  fi
38185
38186
38187    new_path=`$WHICH "$new_path" 2> /dev/null`
38188    # bat and cmd files are not always considered executable in MSYS causing which
38189    # to not find them
38190    if test "x$new_path" = x \
38191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38193      new_path="$path"
38194
38195  windows_path="$new_path"
38196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38197    unix_path=`$CYGPATH -u "$windows_path"`
38198    new_path="$unix_path"
38199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38201    new_path="$unix_path"
38202  fi
38203
38204    fi
38205
38206    if test "x$new_path" = x; then
38207      # It's still not found. Now this is an unrecoverable error.
38208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38209$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38210      has_space=`$ECHO "$complete" | $GREP " "`
38211      if test "x$has_space" != x; then
38212        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38213$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38214      fi
38215      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38216    fi
38217  fi
38218
38219  # Now new_path has a complete unix path to the binary
38220  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38221    # Keep paths in /bin as-is, but remove trailing .exe if any
38222    new_path="${new_path/%.exe/}"
38223    # Do not save /bin paths to all_fixpath_prefixes!
38224  else
38225    # Not in mixed or Windows style, start by that.
38226    new_path=`cmd //c echo $new_path`
38227
38228  input_path="$new_path"
38229  # Check if we need to convert this using DOS-style short mode. If the path
38230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38231  # take no chances and rewrite it.
38232  # Note: m4 eats our [], so we need to use [ and ] instead.
38233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38234  if test "x$has_forbidden_chars" != x; then
38235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38237  fi
38238
38239    # Output is in $new_path
38240
38241  windows_path="$new_path"
38242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38243    unix_path=`$CYGPATH -u "$windows_path"`
38244    new_path="$unix_path"
38245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38247    new_path="$unix_path"
38248  fi
38249
38250    # remove trailing .exe if any
38251    new_path="${new_path/%.exe/}"
38252
38253    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38254    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38255  fi
38256
38257    else
38258      # We're on a unix platform. Hooray! :)
38259      # First separate the path from the arguments. This will split at the first
38260      # space.
38261      complete="$OBJCOPY"
38262      path="${complete%% *}"
38263      tmp="$complete EOL"
38264      arguments="${tmp#* }"
38265
38266      # Cannot rely on the command "which" here since it doesn't always work.
38267      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38268      if test -z "$is_absolute_path"; then
38269        # Path to executable is not absolute. Find it.
38270        IFS_save="$IFS"
38271        IFS=:
38272        for p in $PATH; do
38273          if test -f "$p/$path" && test -x "$p/$path"; then
38274            new_path="$p/$path"
38275            break
38276          fi
38277        done
38278        IFS="$IFS_save"
38279      else
38280        # This is an absolute path, we can use it without further modifications.
38281        new_path="$path"
38282      fi
38283
38284      if test "x$new_path" = x; then
38285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38286$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38287        has_space=`$ECHO "$complete" | $GREP " "`
38288        if test "x$has_space" != x; then
38289          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38290$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38291        fi
38292        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38293      fi
38294    fi
38295
38296    # Now join together the path and the arguments once again
38297    if test "x$arguments" != xEOL; then
38298      new_complete="$new_path ${arguments% *}"
38299    else
38300      new_complete="$new_path"
38301    fi
38302
38303    if test "x$complete" != "x$new_complete"; then
38304      OBJCOPY="$new_complete"
38305      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38306$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38307    fi
38308  fi
38309
38310    fi
38311  fi
38312
38313
38314
38315  # Publish this variable in the help.
38316
38317
38318  if test "x$OBJDUMP" = x; then
38319    # The variable is not set by user, try to locate tool using the code snippet
38320    if test -n "$ac_tool_prefix"; then
38321  for ac_prog in gobjdump objdump
38322  do
38323    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38324set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38326$as_echo_n "checking for $ac_word... " >&6; }
38327if ${ac_cv_prog_OBJDUMP+:} false; then :
38328  $as_echo_n "(cached) " >&6
38329else
38330  if test -n "$OBJDUMP"; then
38331  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38332else
38333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38334for as_dir in $PATH
38335do
38336  IFS=$as_save_IFS
38337  test -z "$as_dir" && as_dir=.
38338    for ac_exec_ext in '' $ac_executable_extensions; do
38339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38340    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38342    break 2
38343  fi
38344done
38345  done
38346IFS=$as_save_IFS
38347
38348fi
38349fi
38350OBJDUMP=$ac_cv_prog_OBJDUMP
38351if test -n "$OBJDUMP"; then
38352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38353$as_echo "$OBJDUMP" >&6; }
38354else
38355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38356$as_echo "no" >&6; }
38357fi
38358
38359
38360    test -n "$OBJDUMP" && break
38361  done
38362fi
38363if test -z "$OBJDUMP"; then
38364  ac_ct_OBJDUMP=$OBJDUMP
38365  for ac_prog in gobjdump objdump
38366do
38367  # Extract the first word of "$ac_prog", so it can be a program name with args.
38368set dummy $ac_prog; ac_word=$2
38369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38370$as_echo_n "checking for $ac_word... " >&6; }
38371if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38372  $as_echo_n "(cached) " >&6
38373else
38374  if test -n "$ac_ct_OBJDUMP"; then
38375  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38376else
38377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38378for as_dir in $PATH
38379do
38380  IFS=$as_save_IFS
38381  test -z "$as_dir" && as_dir=.
38382    for ac_exec_ext in '' $ac_executable_extensions; do
38383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38384    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38386    break 2
38387  fi
38388done
38389  done
38390IFS=$as_save_IFS
38391
38392fi
38393fi
38394ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38395if test -n "$ac_ct_OBJDUMP"; then
38396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38397$as_echo "$ac_ct_OBJDUMP" >&6; }
38398else
38399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38400$as_echo "no" >&6; }
38401fi
38402
38403
38404  test -n "$ac_ct_OBJDUMP" && break
38405done
38406
38407  if test "x$ac_ct_OBJDUMP" = x; then
38408    OBJDUMP=""
38409  else
38410    case $cross_compiling:$ac_tool_warned in
38411yes:)
38412{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38413$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38414ac_tool_warned=yes ;;
38415esac
38416    OBJDUMP=$ac_ct_OBJDUMP
38417  fi
38418fi
38419
38420  else
38421    # The variable is set, but is it from the command line or the environment?
38422
38423    # Try to remove the string !OBJDUMP! from our list.
38424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38426      # If it failed, the variable was not from the command line. Ignore it,
38427      # but warn the user (except for BASH, which is always set by the calling BASH).
38428      if test "xOBJDUMP" != xBASH; then
38429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38430$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38431      fi
38432      # Try to locate tool using the code snippet
38433      if test -n "$ac_tool_prefix"; then
38434  for ac_prog in gobjdump objdump
38435  do
38436    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38437set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38439$as_echo_n "checking for $ac_word... " >&6; }
38440if ${ac_cv_prog_OBJDUMP+:} false; then :
38441  $as_echo_n "(cached) " >&6
38442else
38443  if test -n "$OBJDUMP"; then
38444  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38445else
38446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38447for as_dir in $PATH
38448do
38449  IFS=$as_save_IFS
38450  test -z "$as_dir" && as_dir=.
38451    for ac_exec_ext in '' $ac_executable_extensions; do
38452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38453    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38455    break 2
38456  fi
38457done
38458  done
38459IFS=$as_save_IFS
38460
38461fi
38462fi
38463OBJDUMP=$ac_cv_prog_OBJDUMP
38464if test -n "$OBJDUMP"; then
38465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38466$as_echo "$OBJDUMP" >&6; }
38467else
38468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38469$as_echo "no" >&6; }
38470fi
38471
38472
38473    test -n "$OBJDUMP" && break
38474  done
38475fi
38476if test -z "$OBJDUMP"; then
38477  ac_ct_OBJDUMP=$OBJDUMP
38478  for ac_prog in gobjdump objdump
38479do
38480  # Extract the first word of "$ac_prog", so it can be a program name with args.
38481set dummy $ac_prog; ac_word=$2
38482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38483$as_echo_n "checking for $ac_word... " >&6; }
38484if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38485  $as_echo_n "(cached) " >&6
38486else
38487  if test -n "$ac_ct_OBJDUMP"; then
38488  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38489else
38490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38491for as_dir in $PATH
38492do
38493  IFS=$as_save_IFS
38494  test -z "$as_dir" && as_dir=.
38495    for ac_exec_ext in '' $ac_executable_extensions; do
38496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38497    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38499    break 2
38500  fi
38501done
38502  done
38503IFS=$as_save_IFS
38504
38505fi
38506fi
38507ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38508if test -n "$ac_ct_OBJDUMP"; then
38509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38510$as_echo "$ac_ct_OBJDUMP" >&6; }
38511else
38512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38513$as_echo "no" >&6; }
38514fi
38515
38516
38517  test -n "$ac_ct_OBJDUMP" && break
38518done
38519
38520  if test "x$ac_ct_OBJDUMP" = x; then
38521    OBJDUMP=""
38522  else
38523    case $cross_compiling:$ac_tool_warned in
38524yes:)
38525{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38526$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38527ac_tool_warned=yes ;;
38528esac
38529    OBJDUMP=$ac_ct_OBJDUMP
38530  fi
38531fi
38532
38533    else
38534      # If it succeeded, then it was overridden by the user. We will use it
38535      # for the tool.
38536
38537      # First remove it from the list of overridden variables, so we can test
38538      # for unknown variables in the end.
38539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38540
38541      # Check if the provided tool contains a complete path.
38542      tool_specified="$OBJDUMP"
38543      tool_basename="${tool_specified##*/}"
38544      if test "x$tool_basename" = "x$tool_specified"; then
38545        # A command without a complete path is provided, search $PATH.
38546        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38547$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38548        # Extract the first word of "$tool_basename", so it can be a program name with args.
38549set dummy $tool_basename; ac_word=$2
38550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38551$as_echo_n "checking for $ac_word... " >&6; }
38552if ${ac_cv_path_OBJDUMP+:} false; then :
38553  $as_echo_n "(cached) " >&6
38554else
38555  case $OBJDUMP in
38556  [\\/]* | ?:[\\/]*)
38557  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38558  ;;
38559  *)
38560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38561for as_dir in $PATH
38562do
38563  IFS=$as_save_IFS
38564  test -z "$as_dir" && as_dir=.
38565    for ac_exec_ext in '' $ac_executable_extensions; do
38566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38567    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38569    break 2
38570  fi
38571done
38572  done
38573IFS=$as_save_IFS
38574
38575  ;;
38576esac
38577fi
38578OBJDUMP=$ac_cv_path_OBJDUMP
38579if test -n "$OBJDUMP"; then
38580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38581$as_echo "$OBJDUMP" >&6; }
38582else
38583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38584$as_echo "no" >&6; }
38585fi
38586
38587
38588        if test "x$OBJDUMP" = x; then
38589          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38590        fi
38591      else
38592        # Otherwise we believe it is a complete path. Use it as it is.
38593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38594$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38596$as_echo_n "checking for OBJDUMP... " >&6; }
38597        if test ! -x "$tool_specified"; then
38598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38599$as_echo "not found" >&6; }
38600          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38601        fi
38602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38603$as_echo "$tool_specified" >&6; }
38604      fi
38605    fi
38606  fi
38607
38608
38609  if test "x$OBJDUMP" != x; then
38610    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38611    # bails if argument is missing.
38612
38613  # Only process if variable expands to non-empty
38614
38615  if test "x$OBJDUMP" != x; then
38616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38617
38618  # First separate the path from the arguments. This will split at the first
38619  # space.
38620  complete="$OBJDUMP"
38621  path="${complete%% *}"
38622  tmp="$complete EOL"
38623  arguments="${tmp#* }"
38624
38625  # Input might be given as Windows format, start by converting to
38626  # unix format.
38627  new_path=`$CYGPATH -u "$path"`
38628
38629  # Now try to locate executable using which
38630  new_path=`$WHICH "$new_path" 2> /dev/null`
38631  # bat and cmd files are not always considered executable in cygwin causing which
38632  # to not find them
38633  if test "x$new_path" = x \
38634      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38635      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38636    new_path=`$CYGPATH -u "$path"`
38637  fi
38638  if test "x$new_path" = x; then
38639    # Oops. Which didn't find the executable.
38640    # The splitting of arguments from the executable at a space might have been incorrect,
38641    # since paths with space are more likely in Windows. Give it another try with the whole
38642    # argument.
38643    path="$complete"
38644    arguments="EOL"
38645    new_path=`$CYGPATH -u "$path"`
38646    new_path=`$WHICH "$new_path" 2> /dev/null`
38647    # bat and cmd files are not always considered executable in cygwin causing which
38648    # to not find them
38649    if test "x$new_path" = x \
38650        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38651        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38652      new_path=`$CYGPATH -u "$path"`
38653    fi
38654    if test "x$new_path" = x; then
38655      # It's still not found. Now this is an unrecoverable error.
38656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38657$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38658      has_space=`$ECHO "$complete" | $GREP " "`
38659      if test "x$has_space" != x; then
38660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38662      fi
38663      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38664    fi
38665  fi
38666
38667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38670  # "foo.exe" is OK but "foo" is an error.
38671  #
38672  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38673  # It is also a way to make sure we got the proper file name for the real test later on.
38674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38675  if test "x$test_shortpath" = x; then
38676    # Short path failed, file does not exist as specified.
38677    # Try adding .exe or .cmd
38678    if test -f "${new_path}.exe"; then
38679      input_to_shortpath="${new_path}.exe"
38680    elif test -f "${new_path}.cmd"; then
38681      input_to_shortpath="${new_path}.cmd"
38682    else
38683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38684$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38685      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38686$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38687      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38688    fi
38689  else
38690    input_to_shortpath="$new_path"
38691  fi
38692
38693  # Call helper function which possibly converts this using DOS-style short mode.
38694  # If so, the updated path is stored in $new_path.
38695  new_path="$input_to_shortpath"
38696
38697  input_path="$input_to_shortpath"
38698  # Check if we need to convert this using DOS-style short mode. If the path
38699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38700  # take no chances and rewrite it.
38701  # Note: m4 eats our [], so we need to use [ and ] instead.
38702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38703  if test "x$has_forbidden_chars" != x; then
38704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38708      # Going to short mode and back again did indeed matter. Since short mode is
38709      # case insensitive, let's make it lowercase to improve readability.
38710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38711      # Now convert it back to Unix-style (cygpath)
38712      input_path=`$CYGPATH -u "$shortmode_path"`
38713      new_path="$input_path"
38714    fi
38715  fi
38716
38717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38718  if test "x$test_cygdrive_prefix" = x; then
38719    # As a simple fix, exclude /usr/bin since it's not a real path.
38720    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38722      # a path prefixed by /cygdrive for fixpath to work.
38723      new_path="$CYGWIN_ROOT_PATH$input_path"
38724    fi
38725  fi
38726
38727  # remove trailing .exe if any
38728  new_path="${new_path/%.exe/}"
38729
38730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38731
38732  # First separate the path from the arguments. This will split at the first
38733  # space.
38734  complete="$OBJDUMP"
38735  path="${complete%% *}"
38736  tmp="$complete EOL"
38737  arguments="${tmp#* }"
38738
38739  # Input might be given as Windows format, start by converting to
38740  # unix format.
38741  new_path="$path"
38742
38743  windows_path="$new_path"
38744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38745    unix_path=`$CYGPATH -u "$windows_path"`
38746    new_path="$unix_path"
38747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38749    new_path="$unix_path"
38750  fi
38751
38752
38753  # Now try to locate executable using which
38754  new_path=`$WHICH "$new_path" 2> /dev/null`
38755
38756  if test "x$new_path" = x; then
38757    # Oops. Which didn't find the executable.
38758    # The splitting of arguments from the executable at a space might have been incorrect,
38759    # since paths with space are more likely in Windows. Give it another try with the whole
38760    # argument.
38761    path="$complete"
38762    arguments="EOL"
38763    new_path="$path"
38764
38765  windows_path="$new_path"
38766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38767    unix_path=`$CYGPATH -u "$windows_path"`
38768    new_path="$unix_path"
38769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38771    new_path="$unix_path"
38772  fi
38773
38774
38775    new_path=`$WHICH "$new_path" 2> /dev/null`
38776    # bat and cmd files are not always considered executable in MSYS causing which
38777    # to not find them
38778    if test "x$new_path" = x \
38779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38781      new_path="$path"
38782
38783  windows_path="$new_path"
38784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38785    unix_path=`$CYGPATH -u "$windows_path"`
38786    new_path="$unix_path"
38787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38789    new_path="$unix_path"
38790  fi
38791
38792    fi
38793
38794    if test "x$new_path" = x; then
38795      # It's still not found. Now this is an unrecoverable error.
38796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38797$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38798      has_space=`$ECHO "$complete" | $GREP " "`
38799      if test "x$has_space" != x; then
38800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38802      fi
38803      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38804    fi
38805  fi
38806
38807  # Now new_path has a complete unix path to the binary
38808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38809    # Keep paths in /bin as-is, but remove trailing .exe if any
38810    new_path="${new_path/%.exe/}"
38811    # Do not save /bin paths to all_fixpath_prefixes!
38812  else
38813    # Not in mixed or Windows style, start by that.
38814    new_path=`cmd //c echo $new_path`
38815
38816  input_path="$new_path"
38817  # Check if we need to convert this using DOS-style short mode. If the path
38818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38819  # take no chances and rewrite it.
38820  # Note: m4 eats our [], so we need to use [ and ] instead.
38821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38822  if test "x$has_forbidden_chars" != x; then
38823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38825  fi
38826
38827    # Output is in $new_path
38828
38829  windows_path="$new_path"
38830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38831    unix_path=`$CYGPATH -u "$windows_path"`
38832    new_path="$unix_path"
38833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38835    new_path="$unix_path"
38836  fi
38837
38838    # remove trailing .exe if any
38839    new_path="${new_path/%.exe/}"
38840
38841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38843  fi
38844
38845    else
38846      # We're on a unix platform. Hooray! :)
38847      # First separate the path from the arguments. This will split at the first
38848      # space.
38849      complete="$OBJDUMP"
38850      path="${complete%% *}"
38851      tmp="$complete EOL"
38852      arguments="${tmp#* }"
38853
38854      # Cannot rely on the command "which" here since it doesn't always work.
38855      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38856      if test -z "$is_absolute_path"; then
38857        # Path to executable is not absolute. Find it.
38858        IFS_save="$IFS"
38859        IFS=:
38860        for p in $PATH; do
38861          if test -f "$p/$path" && test -x "$p/$path"; then
38862            new_path="$p/$path"
38863            break
38864          fi
38865        done
38866        IFS="$IFS_save"
38867      else
38868        # This is an absolute path, we can use it without further modifications.
38869        new_path="$path"
38870      fi
38871
38872      if test "x$new_path" = x; then
38873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38874$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38875        has_space=`$ECHO "$complete" | $GREP " "`
38876        if test "x$has_space" != x; then
38877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38879        fi
38880        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38881      fi
38882    fi
38883
38884    # Now join together the path and the arguments once again
38885    if test "x$arguments" != xEOL; then
38886      new_complete="$new_path ${arguments% *}"
38887    else
38888      new_complete="$new_path"
38889    fi
38890
38891    if test "x$complete" != "x$new_complete"; then
38892      OBJDUMP="$new_complete"
38893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38894$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38895    fi
38896  fi
38897
38898  fi
38899
38900
38901  # Restore old path.
38902  PATH="$OLD_PATH"
38903
38904  # Restore the flags to the user specified values.
38905  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38906  CFLAGS="$ORG_CFLAGS"
38907  CXXFLAGS="$ORG_CXXFLAGS"
38908
38909
38910# Finally do some processing after the detection phase
38911
38912  if test "x$COMPILE_TYPE" = "xcross"; then
38913    # Now we need to find a C/C++ compiler that can build executables for the
38914    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38915    # used once. Also, we need to do this without adding a tools dir to the
38916    # path, otherwise we might pick up cross-compilers which don't use standard
38917    # naming.
38918
38919    # FIXME: we should list the discovered compilers as an exclude pattern!
38920    # If we do that, we can do this detection before POST_DETECTION, and still
38921    # find the build compilers in the tools dir, if needed.
38922
38923
38924  # Publish this variable in the help.
38925
38926
38927  if test "x$BUILD_CC" = x; then
38928    # The variable is not set by user, try to locate tool using the code snippet
38929    for ac_prog in cl cc gcc
38930do
38931  # Extract the first word of "$ac_prog", so it can be a program name with args.
38932set dummy $ac_prog; ac_word=$2
38933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38934$as_echo_n "checking for $ac_word... " >&6; }
38935if ${ac_cv_path_BUILD_CC+:} false; then :
38936  $as_echo_n "(cached) " >&6
38937else
38938  case $BUILD_CC in
38939  [\\/]* | ?:[\\/]*)
38940  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38941  ;;
38942  *)
38943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38944for as_dir in $PATH
38945do
38946  IFS=$as_save_IFS
38947  test -z "$as_dir" && as_dir=.
38948    for ac_exec_ext in '' $ac_executable_extensions; do
38949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38950    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38952    break 2
38953  fi
38954done
38955  done
38956IFS=$as_save_IFS
38957
38958  ;;
38959esac
38960fi
38961BUILD_CC=$ac_cv_path_BUILD_CC
38962if test -n "$BUILD_CC"; then
38963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38964$as_echo "$BUILD_CC" >&6; }
38965else
38966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38967$as_echo "no" >&6; }
38968fi
38969
38970
38971  test -n "$BUILD_CC" && break
38972done
38973
38974  else
38975    # The variable is set, but is it from the command line or the environment?
38976
38977    # Try to remove the string !BUILD_CC! from our list.
38978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38980      # If it failed, the variable was not from the command line. Ignore it,
38981      # but warn the user (except for BASH, which is always set by the calling BASH).
38982      if test "xBUILD_CC" != xBASH; then
38983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38984$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38985      fi
38986      # Try to locate tool using the code snippet
38987      for ac_prog in cl cc gcc
38988do
38989  # Extract the first word of "$ac_prog", so it can be a program name with args.
38990set dummy $ac_prog; ac_word=$2
38991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38992$as_echo_n "checking for $ac_word... " >&6; }
38993if ${ac_cv_path_BUILD_CC+:} false; then :
38994  $as_echo_n "(cached) " >&6
38995else
38996  case $BUILD_CC in
38997  [\\/]* | ?:[\\/]*)
38998  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38999  ;;
39000  *)
39001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39002for as_dir in $PATH
39003do
39004  IFS=$as_save_IFS
39005  test -z "$as_dir" && as_dir=.
39006    for ac_exec_ext in '' $ac_executable_extensions; do
39007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39008    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39010    break 2
39011  fi
39012done
39013  done
39014IFS=$as_save_IFS
39015
39016  ;;
39017esac
39018fi
39019BUILD_CC=$ac_cv_path_BUILD_CC
39020if test -n "$BUILD_CC"; then
39021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39022$as_echo "$BUILD_CC" >&6; }
39023else
39024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39025$as_echo "no" >&6; }
39026fi
39027
39028
39029  test -n "$BUILD_CC" && break
39030done
39031
39032    else
39033      # If it succeeded, then it was overridden by the user. We will use it
39034      # for the tool.
39035
39036      # First remove it from the list of overridden variables, so we can test
39037      # for unknown variables in the end.
39038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39039
39040      # Check if the provided tool contains a complete path.
39041      tool_specified="$BUILD_CC"
39042      tool_basename="${tool_specified##*/}"
39043      if test "x$tool_basename" = "x$tool_specified"; then
39044        # A command without a complete path is provided, search $PATH.
39045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39046$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39047        # Extract the first word of "$tool_basename", so it can be a program name with args.
39048set dummy $tool_basename; ac_word=$2
39049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39050$as_echo_n "checking for $ac_word... " >&6; }
39051if ${ac_cv_path_BUILD_CC+:} false; then :
39052  $as_echo_n "(cached) " >&6
39053else
39054  case $BUILD_CC in
39055  [\\/]* | ?:[\\/]*)
39056  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39057  ;;
39058  *)
39059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39060for as_dir in $PATH
39061do
39062  IFS=$as_save_IFS
39063  test -z "$as_dir" && as_dir=.
39064    for ac_exec_ext in '' $ac_executable_extensions; do
39065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39066    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39068    break 2
39069  fi
39070done
39071  done
39072IFS=$as_save_IFS
39073
39074  ;;
39075esac
39076fi
39077BUILD_CC=$ac_cv_path_BUILD_CC
39078if test -n "$BUILD_CC"; then
39079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39080$as_echo "$BUILD_CC" >&6; }
39081else
39082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39083$as_echo "no" >&6; }
39084fi
39085
39086
39087        if test "x$BUILD_CC" = x; then
39088          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39089        fi
39090      else
39091        # Otherwise we believe it is a complete path. Use it as it is.
39092        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39093$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39095$as_echo_n "checking for BUILD_CC... " >&6; }
39096        if test ! -x "$tool_specified"; then
39097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39098$as_echo "not found" >&6; }
39099          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39100        fi
39101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39102$as_echo "$tool_specified" >&6; }
39103      fi
39104    fi
39105  fi
39106
39107
39108
39109  # Only process if variable expands to non-empty
39110
39111  if test "x$BUILD_CC" != x; then
39112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39113
39114  # First separate the path from the arguments. This will split at the first
39115  # space.
39116  complete="$BUILD_CC"
39117  path="${complete%% *}"
39118  tmp="$complete EOL"
39119  arguments="${tmp#* }"
39120
39121  # Input might be given as Windows format, start by converting to
39122  # unix format.
39123  new_path=`$CYGPATH -u "$path"`
39124
39125  # Now try to locate executable using which
39126  new_path=`$WHICH "$new_path" 2> /dev/null`
39127  # bat and cmd files are not always considered executable in cygwin causing which
39128  # to not find them
39129  if test "x$new_path" = x \
39130      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39131      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39132    new_path=`$CYGPATH -u "$path"`
39133  fi
39134  if test "x$new_path" = x; then
39135    # Oops. Which didn't find the executable.
39136    # The splitting of arguments from the executable at a space might have been incorrect,
39137    # since paths with space are more likely in Windows. Give it another try with the whole
39138    # argument.
39139    path="$complete"
39140    arguments="EOL"
39141    new_path=`$CYGPATH -u "$path"`
39142    new_path=`$WHICH "$new_path" 2> /dev/null`
39143    # bat and cmd files are not always considered executable in cygwin causing which
39144    # to not find them
39145    if test "x$new_path" = x \
39146        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39147        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39148      new_path=`$CYGPATH -u "$path"`
39149    fi
39150    if test "x$new_path" = x; then
39151      # It's still not found. Now this is an unrecoverable error.
39152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39153$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39154      has_space=`$ECHO "$complete" | $GREP " "`
39155      if test "x$has_space" != x; then
39156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39158      fi
39159      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39160    fi
39161  fi
39162
39163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39166  # "foo.exe" is OK but "foo" is an error.
39167  #
39168  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39169  # It is also a way to make sure we got the proper file name for the real test later on.
39170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39171  if test "x$test_shortpath" = x; then
39172    # Short path failed, file does not exist as specified.
39173    # Try adding .exe or .cmd
39174    if test -f "${new_path}.exe"; then
39175      input_to_shortpath="${new_path}.exe"
39176    elif test -f "${new_path}.cmd"; then
39177      input_to_shortpath="${new_path}.cmd"
39178    else
39179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39180$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39181      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39182$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39183      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39184    fi
39185  else
39186    input_to_shortpath="$new_path"
39187  fi
39188
39189  # Call helper function which possibly converts this using DOS-style short mode.
39190  # If so, the updated path is stored in $new_path.
39191  new_path="$input_to_shortpath"
39192
39193  input_path="$input_to_shortpath"
39194  # Check if we need to convert this using DOS-style short mode. If the path
39195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39196  # take no chances and rewrite it.
39197  # Note: m4 eats our [], so we need to use [ and ] instead.
39198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39199  if test "x$has_forbidden_chars" != x; then
39200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39204      # Going to short mode and back again did indeed matter. Since short mode is
39205      # case insensitive, let's make it lowercase to improve readability.
39206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39207      # Now convert it back to Unix-style (cygpath)
39208      input_path=`$CYGPATH -u "$shortmode_path"`
39209      new_path="$input_path"
39210    fi
39211  fi
39212
39213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39214  if test "x$test_cygdrive_prefix" = x; then
39215    # As a simple fix, exclude /usr/bin since it's not a real path.
39216    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39218      # a path prefixed by /cygdrive for fixpath to work.
39219      new_path="$CYGWIN_ROOT_PATH$input_path"
39220    fi
39221  fi
39222
39223  # remove trailing .exe if any
39224  new_path="${new_path/%.exe/}"
39225
39226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39227
39228  # First separate the path from the arguments. This will split at the first
39229  # space.
39230  complete="$BUILD_CC"
39231  path="${complete%% *}"
39232  tmp="$complete EOL"
39233  arguments="${tmp#* }"
39234
39235  # Input might be given as Windows format, start by converting to
39236  # unix format.
39237  new_path="$path"
39238
39239  windows_path="$new_path"
39240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39241    unix_path=`$CYGPATH -u "$windows_path"`
39242    new_path="$unix_path"
39243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39245    new_path="$unix_path"
39246  fi
39247
39248
39249  # Now try to locate executable using which
39250  new_path=`$WHICH "$new_path" 2> /dev/null`
39251
39252  if test "x$new_path" = x; then
39253    # Oops. Which didn't find the executable.
39254    # The splitting of arguments from the executable at a space might have been incorrect,
39255    # since paths with space are more likely in Windows. Give it another try with the whole
39256    # argument.
39257    path="$complete"
39258    arguments="EOL"
39259    new_path="$path"
39260
39261  windows_path="$new_path"
39262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39263    unix_path=`$CYGPATH -u "$windows_path"`
39264    new_path="$unix_path"
39265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39267    new_path="$unix_path"
39268  fi
39269
39270
39271    new_path=`$WHICH "$new_path" 2> /dev/null`
39272    # bat and cmd files are not always considered executable in MSYS causing which
39273    # to not find them
39274    if test "x$new_path" = x \
39275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39277      new_path="$path"
39278
39279  windows_path="$new_path"
39280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39281    unix_path=`$CYGPATH -u "$windows_path"`
39282    new_path="$unix_path"
39283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39285    new_path="$unix_path"
39286  fi
39287
39288    fi
39289
39290    if test "x$new_path" = x; then
39291      # It's still not found. Now this is an unrecoverable error.
39292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39293$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39294      has_space=`$ECHO "$complete" | $GREP " "`
39295      if test "x$has_space" != x; then
39296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39298      fi
39299      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39300    fi
39301  fi
39302
39303  # Now new_path has a complete unix path to the binary
39304  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39305    # Keep paths in /bin as-is, but remove trailing .exe if any
39306    new_path="${new_path/%.exe/}"
39307    # Do not save /bin paths to all_fixpath_prefixes!
39308  else
39309    # Not in mixed or Windows style, start by that.
39310    new_path=`cmd //c echo $new_path`
39311
39312  input_path="$new_path"
39313  # Check if we need to convert this using DOS-style short mode. If the path
39314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39315  # take no chances and rewrite it.
39316  # Note: m4 eats our [], so we need to use [ and ] instead.
39317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39318  if test "x$has_forbidden_chars" != x; then
39319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39321  fi
39322
39323    # Output is in $new_path
39324
39325  windows_path="$new_path"
39326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39327    unix_path=`$CYGPATH -u "$windows_path"`
39328    new_path="$unix_path"
39329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39331    new_path="$unix_path"
39332  fi
39333
39334    # remove trailing .exe if any
39335    new_path="${new_path/%.exe/}"
39336
39337    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39338    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39339  fi
39340
39341    else
39342      # We're on a unix platform. Hooray! :)
39343      # First separate the path from the arguments. This will split at the first
39344      # space.
39345      complete="$BUILD_CC"
39346      path="${complete%% *}"
39347      tmp="$complete EOL"
39348      arguments="${tmp#* }"
39349
39350      # Cannot rely on the command "which" here since it doesn't always work.
39351      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39352      if test -z "$is_absolute_path"; then
39353        # Path to executable is not absolute. Find it.
39354        IFS_save="$IFS"
39355        IFS=:
39356        for p in $PATH; do
39357          if test -f "$p/$path" && test -x "$p/$path"; then
39358            new_path="$p/$path"
39359            break
39360          fi
39361        done
39362        IFS="$IFS_save"
39363      else
39364        # This is an absolute path, we can use it without further modifications.
39365        new_path="$path"
39366      fi
39367
39368      if test "x$new_path" = x; then
39369        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39370$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39371        has_space=`$ECHO "$complete" | $GREP " "`
39372        if test "x$has_space" != x; then
39373          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39374$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39375        fi
39376        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39377      fi
39378    fi
39379
39380    # Now join together the path and the arguments once again
39381    if test "x$arguments" != xEOL; then
39382      new_complete="$new_path ${arguments% *}"
39383    else
39384      new_complete="$new_path"
39385    fi
39386
39387    if test "x$complete" != "x$new_complete"; then
39388      BUILD_CC="$new_complete"
39389      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39390$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39391    fi
39392  fi
39393
39394
39395
39396  # Publish this variable in the help.
39397
39398
39399  if test "x$BUILD_CXX" = x; then
39400    # The variable is not set by user, try to locate tool using the code snippet
39401    for ac_prog in cl CC g++
39402do
39403  # Extract the first word of "$ac_prog", so it can be a program name with args.
39404set dummy $ac_prog; ac_word=$2
39405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39406$as_echo_n "checking for $ac_word... " >&6; }
39407if ${ac_cv_path_BUILD_CXX+:} false; then :
39408  $as_echo_n "(cached) " >&6
39409else
39410  case $BUILD_CXX in
39411  [\\/]* | ?:[\\/]*)
39412  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39413  ;;
39414  *)
39415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39416for as_dir in $PATH
39417do
39418  IFS=$as_save_IFS
39419  test -z "$as_dir" && as_dir=.
39420    for ac_exec_ext in '' $ac_executable_extensions; do
39421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39422    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39424    break 2
39425  fi
39426done
39427  done
39428IFS=$as_save_IFS
39429
39430  ;;
39431esac
39432fi
39433BUILD_CXX=$ac_cv_path_BUILD_CXX
39434if test -n "$BUILD_CXX"; then
39435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39436$as_echo "$BUILD_CXX" >&6; }
39437else
39438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39439$as_echo "no" >&6; }
39440fi
39441
39442
39443  test -n "$BUILD_CXX" && break
39444done
39445
39446  else
39447    # The variable is set, but is it from the command line or the environment?
39448
39449    # Try to remove the string !BUILD_CXX! from our list.
39450    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39451    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39452      # If it failed, the variable was not from the command line. Ignore it,
39453      # but warn the user (except for BASH, which is always set by the calling BASH).
39454      if test "xBUILD_CXX" != xBASH; then
39455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39456$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39457      fi
39458      # Try to locate tool using the code snippet
39459      for ac_prog in cl CC g++
39460do
39461  # Extract the first word of "$ac_prog", so it can be a program name with args.
39462set dummy $ac_prog; ac_word=$2
39463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39464$as_echo_n "checking for $ac_word... " >&6; }
39465if ${ac_cv_path_BUILD_CXX+:} false; then :
39466  $as_echo_n "(cached) " >&6
39467else
39468  case $BUILD_CXX in
39469  [\\/]* | ?:[\\/]*)
39470  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39471  ;;
39472  *)
39473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39474for as_dir in $PATH
39475do
39476  IFS=$as_save_IFS
39477  test -z "$as_dir" && as_dir=.
39478    for ac_exec_ext in '' $ac_executable_extensions; do
39479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39480    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39482    break 2
39483  fi
39484done
39485  done
39486IFS=$as_save_IFS
39487
39488  ;;
39489esac
39490fi
39491BUILD_CXX=$ac_cv_path_BUILD_CXX
39492if test -n "$BUILD_CXX"; then
39493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39494$as_echo "$BUILD_CXX" >&6; }
39495else
39496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39497$as_echo "no" >&6; }
39498fi
39499
39500
39501  test -n "$BUILD_CXX" && break
39502done
39503
39504    else
39505      # If it succeeded, then it was overridden by the user. We will use it
39506      # for the tool.
39507
39508      # First remove it from the list of overridden variables, so we can test
39509      # for unknown variables in the end.
39510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39511
39512      # Check if the provided tool contains a complete path.
39513      tool_specified="$BUILD_CXX"
39514      tool_basename="${tool_specified##*/}"
39515      if test "x$tool_basename" = "x$tool_specified"; then
39516        # A command without a complete path is provided, search $PATH.
39517        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39518$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39519        # Extract the first word of "$tool_basename", so it can be a program name with args.
39520set dummy $tool_basename; ac_word=$2
39521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39522$as_echo_n "checking for $ac_word... " >&6; }
39523if ${ac_cv_path_BUILD_CXX+:} false; then :
39524  $as_echo_n "(cached) " >&6
39525else
39526  case $BUILD_CXX in
39527  [\\/]* | ?:[\\/]*)
39528  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39529  ;;
39530  *)
39531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39532for as_dir in $PATH
39533do
39534  IFS=$as_save_IFS
39535  test -z "$as_dir" && as_dir=.
39536    for ac_exec_ext in '' $ac_executable_extensions; do
39537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39538    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39540    break 2
39541  fi
39542done
39543  done
39544IFS=$as_save_IFS
39545
39546  ;;
39547esac
39548fi
39549BUILD_CXX=$ac_cv_path_BUILD_CXX
39550if test -n "$BUILD_CXX"; then
39551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39552$as_echo "$BUILD_CXX" >&6; }
39553else
39554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39555$as_echo "no" >&6; }
39556fi
39557
39558
39559        if test "x$BUILD_CXX" = x; then
39560          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39561        fi
39562      else
39563        # Otherwise we believe it is a complete path. Use it as it is.
39564        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39565$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39567$as_echo_n "checking for BUILD_CXX... " >&6; }
39568        if test ! -x "$tool_specified"; then
39569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39570$as_echo "not found" >&6; }
39571          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39572        fi
39573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39574$as_echo "$tool_specified" >&6; }
39575      fi
39576    fi
39577  fi
39578
39579
39580
39581  # Only process if variable expands to non-empty
39582
39583  if test "x$BUILD_CXX" != x; then
39584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39585
39586  # First separate the path from the arguments. This will split at the first
39587  # space.
39588  complete="$BUILD_CXX"
39589  path="${complete%% *}"
39590  tmp="$complete EOL"
39591  arguments="${tmp#* }"
39592
39593  # Input might be given as Windows format, start by converting to
39594  # unix format.
39595  new_path=`$CYGPATH -u "$path"`
39596
39597  # Now try to locate executable using which
39598  new_path=`$WHICH "$new_path" 2> /dev/null`
39599  # bat and cmd files are not always considered executable in cygwin causing which
39600  # to not find them
39601  if test "x$new_path" = x \
39602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39604    new_path=`$CYGPATH -u "$path"`
39605  fi
39606  if test "x$new_path" = x; then
39607    # Oops. Which didn't find the executable.
39608    # The splitting of arguments from the executable at a space might have been incorrect,
39609    # since paths with space are more likely in Windows. Give it another try with the whole
39610    # argument.
39611    path="$complete"
39612    arguments="EOL"
39613    new_path=`$CYGPATH -u "$path"`
39614    new_path=`$WHICH "$new_path" 2> /dev/null`
39615    # bat and cmd files are not always considered executable in cygwin causing which
39616    # to not find them
39617    if test "x$new_path" = x \
39618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39620      new_path=`$CYGPATH -u "$path"`
39621    fi
39622    if test "x$new_path" = x; then
39623      # It's still not found. Now this is an unrecoverable error.
39624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39625$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39626      has_space=`$ECHO "$complete" | $GREP " "`
39627      if test "x$has_space" != x; then
39628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39630      fi
39631      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39632    fi
39633  fi
39634
39635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39638  # "foo.exe" is OK but "foo" is an error.
39639  #
39640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39641  # It is also a way to make sure we got the proper file name for the real test later on.
39642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39643  if test "x$test_shortpath" = x; then
39644    # Short path failed, file does not exist as specified.
39645    # Try adding .exe or .cmd
39646    if test -f "${new_path}.exe"; then
39647      input_to_shortpath="${new_path}.exe"
39648    elif test -f "${new_path}.cmd"; then
39649      input_to_shortpath="${new_path}.cmd"
39650    else
39651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39652$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39655      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39656    fi
39657  else
39658    input_to_shortpath="$new_path"
39659  fi
39660
39661  # Call helper function which possibly converts this using DOS-style short mode.
39662  # If so, the updated path is stored in $new_path.
39663  new_path="$input_to_shortpath"
39664
39665  input_path="$input_to_shortpath"
39666  # Check if we need to convert this using DOS-style short mode. If the path
39667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39668  # take no chances and rewrite it.
39669  # Note: m4 eats our [], so we need to use [ and ] instead.
39670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39671  if test "x$has_forbidden_chars" != x; then
39672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39676      # Going to short mode and back again did indeed matter. Since short mode is
39677      # case insensitive, let's make it lowercase to improve readability.
39678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39679      # Now convert it back to Unix-style (cygpath)
39680      input_path=`$CYGPATH -u "$shortmode_path"`
39681      new_path="$input_path"
39682    fi
39683  fi
39684
39685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39686  if test "x$test_cygdrive_prefix" = x; then
39687    # As a simple fix, exclude /usr/bin since it's not a real path.
39688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39690      # a path prefixed by /cygdrive for fixpath to work.
39691      new_path="$CYGWIN_ROOT_PATH$input_path"
39692    fi
39693  fi
39694
39695  # remove trailing .exe if any
39696  new_path="${new_path/%.exe/}"
39697
39698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39699
39700  # First separate the path from the arguments. This will split at the first
39701  # space.
39702  complete="$BUILD_CXX"
39703  path="${complete%% *}"
39704  tmp="$complete EOL"
39705  arguments="${tmp#* }"
39706
39707  # Input might be given as Windows format, start by converting to
39708  # unix format.
39709  new_path="$path"
39710
39711  windows_path="$new_path"
39712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39713    unix_path=`$CYGPATH -u "$windows_path"`
39714    new_path="$unix_path"
39715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39717    new_path="$unix_path"
39718  fi
39719
39720
39721  # Now try to locate executable using which
39722  new_path=`$WHICH "$new_path" 2> /dev/null`
39723
39724  if test "x$new_path" = x; then
39725    # Oops. Which didn't find the executable.
39726    # The splitting of arguments from the executable at a space might have been incorrect,
39727    # since paths with space are more likely in Windows. Give it another try with the whole
39728    # argument.
39729    path="$complete"
39730    arguments="EOL"
39731    new_path="$path"
39732
39733  windows_path="$new_path"
39734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39735    unix_path=`$CYGPATH -u "$windows_path"`
39736    new_path="$unix_path"
39737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39739    new_path="$unix_path"
39740  fi
39741
39742
39743    new_path=`$WHICH "$new_path" 2> /dev/null`
39744    # bat and cmd files are not always considered executable in MSYS causing which
39745    # to not find them
39746    if test "x$new_path" = x \
39747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39749      new_path="$path"
39750
39751  windows_path="$new_path"
39752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39753    unix_path=`$CYGPATH -u "$windows_path"`
39754    new_path="$unix_path"
39755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39757    new_path="$unix_path"
39758  fi
39759
39760    fi
39761
39762    if test "x$new_path" = x; then
39763      # It's still not found. Now this is an unrecoverable error.
39764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39765$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39766      has_space=`$ECHO "$complete" | $GREP " "`
39767      if test "x$has_space" != x; then
39768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39770      fi
39771      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39772    fi
39773  fi
39774
39775  # Now new_path has a complete unix path to the binary
39776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39777    # Keep paths in /bin as-is, but remove trailing .exe if any
39778    new_path="${new_path/%.exe/}"
39779    # Do not save /bin paths to all_fixpath_prefixes!
39780  else
39781    # Not in mixed or Windows style, start by that.
39782    new_path=`cmd //c echo $new_path`
39783
39784  input_path="$new_path"
39785  # Check if we need to convert this using DOS-style short mode. If the path
39786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39787  # take no chances and rewrite it.
39788  # Note: m4 eats our [], so we need to use [ and ] instead.
39789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39790  if test "x$has_forbidden_chars" != x; then
39791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39793  fi
39794
39795    # Output is in $new_path
39796
39797  windows_path="$new_path"
39798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39799    unix_path=`$CYGPATH -u "$windows_path"`
39800    new_path="$unix_path"
39801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39803    new_path="$unix_path"
39804  fi
39805
39806    # remove trailing .exe if any
39807    new_path="${new_path/%.exe/}"
39808
39809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39811  fi
39812
39813    else
39814      # We're on a unix platform. Hooray! :)
39815      # First separate the path from the arguments. This will split at the first
39816      # space.
39817      complete="$BUILD_CXX"
39818      path="${complete%% *}"
39819      tmp="$complete EOL"
39820      arguments="${tmp#* }"
39821
39822      # Cannot rely on the command "which" here since it doesn't always work.
39823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39824      if test -z "$is_absolute_path"; then
39825        # Path to executable is not absolute. Find it.
39826        IFS_save="$IFS"
39827        IFS=:
39828        for p in $PATH; do
39829          if test -f "$p/$path" && test -x "$p/$path"; then
39830            new_path="$p/$path"
39831            break
39832          fi
39833        done
39834        IFS="$IFS_save"
39835      else
39836        # This is an absolute path, we can use it without further modifications.
39837        new_path="$path"
39838      fi
39839
39840      if test "x$new_path" = x; then
39841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39842$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39843        has_space=`$ECHO "$complete" | $GREP " "`
39844        if test "x$has_space" != x; then
39845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39847        fi
39848        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39849      fi
39850    fi
39851
39852    # Now join together the path and the arguments once again
39853    if test "x$arguments" != xEOL; then
39854      new_complete="$new_path ${arguments% *}"
39855    else
39856      new_complete="$new_path"
39857    fi
39858
39859    if test "x$complete" != "x$new_complete"; then
39860      BUILD_CXX="$new_complete"
39861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39862$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39863    fi
39864  fi
39865
39866
39867
39868  # Publish this variable in the help.
39869
39870
39871  if test "x$BUILD_LD" = x; then
39872    # The variable is not set by user, try to locate tool using the code snippet
39873    for ac_prog in ld
39874do
39875  # Extract the first word of "$ac_prog", so it can be a program name with args.
39876set dummy $ac_prog; ac_word=$2
39877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39878$as_echo_n "checking for $ac_word... " >&6; }
39879if ${ac_cv_path_BUILD_LD+:} false; then :
39880  $as_echo_n "(cached) " >&6
39881else
39882  case $BUILD_LD in
39883  [\\/]* | ?:[\\/]*)
39884  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39885  ;;
39886  *)
39887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39888for as_dir in $PATH
39889do
39890  IFS=$as_save_IFS
39891  test -z "$as_dir" && as_dir=.
39892    for ac_exec_ext in '' $ac_executable_extensions; do
39893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39894    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39896    break 2
39897  fi
39898done
39899  done
39900IFS=$as_save_IFS
39901
39902  ;;
39903esac
39904fi
39905BUILD_LD=$ac_cv_path_BUILD_LD
39906if test -n "$BUILD_LD"; then
39907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39908$as_echo "$BUILD_LD" >&6; }
39909else
39910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39911$as_echo "no" >&6; }
39912fi
39913
39914
39915  test -n "$BUILD_LD" && break
39916done
39917
39918  else
39919    # The variable is set, but is it from the command line or the environment?
39920
39921    # Try to remove the string !BUILD_LD! from our list.
39922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39924      # If it failed, the variable was not from the command line. Ignore it,
39925      # but warn the user (except for BASH, which is always set by the calling BASH).
39926      if test "xBUILD_LD" != xBASH; then
39927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39928$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39929      fi
39930      # Try to locate tool using the code snippet
39931      for ac_prog in ld
39932do
39933  # Extract the first word of "$ac_prog", so it can be a program name with args.
39934set dummy $ac_prog; ac_word=$2
39935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39936$as_echo_n "checking for $ac_word... " >&6; }
39937if ${ac_cv_path_BUILD_LD+:} false; then :
39938  $as_echo_n "(cached) " >&6
39939else
39940  case $BUILD_LD in
39941  [\\/]* | ?:[\\/]*)
39942  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39943  ;;
39944  *)
39945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39946for as_dir in $PATH
39947do
39948  IFS=$as_save_IFS
39949  test -z "$as_dir" && as_dir=.
39950    for ac_exec_ext in '' $ac_executable_extensions; do
39951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39952    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39954    break 2
39955  fi
39956done
39957  done
39958IFS=$as_save_IFS
39959
39960  ;;
39961esac
39962fi
39963BUILD_LD=$ac_cv_path_BUILD_LD
39964if test -n "$BUILD_LD"; then
39965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39966$as_echo "$BUILD_LD" >&6; }
39967else
39968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39969$as_echo "no" >&6; }
39970fi
39971
39972
39973  test -n "$BUILD_LD" && break
39974done
39975
39976    else
39977      # If it succeeded, then it was overridden by the user. We will use it
39978      # for the tool.
39979
39980      # First remove it from the list of overridden variables, so we can test
39981      # for unknown variables in the end.
39982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39983
39984      # Check if the provided tool contains a complete path.
39985      tool_specified="$BUILD_LD"
39986      tool_basename="${tool_specified##*/}"
39987      if test "x$tool_basename" = "x$tool_specified"; then
39988        # A command without a complete path is provided, search $PATH.
39989        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39990$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39991        # Extract the first word of "$tool_basename", so it can be a program name with args.
39992set dummy $tool_basename; ac_word=$2
39993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39994$as_echo_n "checking for $ac_word... " >&6; }
39995if ${ac_cv_path_BUILD_LD+:} false; then :
39996  $as_echo_n "(cached) " >&6
39997else
39998  case $BUILD_LD in
39999  [\\/]* | ?:[\\/]*)
40000  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40001  ;;
40002  *)
40003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40004for as_dir in $PATH
40005do
40006  IFS=$as_save_IFS
40007  test -z "$as_dir" && as_dir=.
40008    for ac_exec_ext in '' $ac_executable_extensions; do
40009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40010    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40012    break 2
40013  fi
40014done
40015  done
40016IFS=$as_save_IFS
40017
40018  ;;
40019esac
40020fi
40021BUILD_LD=$ac_cv_path_BUILD_LD
40022if test -n "$BUILD_LD"; then
40023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40024$as_echo "$BUILD_LD" >&6; }
40025else
40026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40027$as_echo "no" >&6; }
40028fi
40029
40030
40031        if test "x$BUILD_LD" = x; then
40032          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40033        fi
40034      else
40035        # Otherwise we believe it is a complete path. Use it as it is.
40036        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40037$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40039$as_echo_n "checking for BUILD_LD... " >&6; }
40040        if test ! -x "$tool_specified"; then
40041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40042$as_echo "not found" >&6; }
40043          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40044        fi
40045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40046$as_echo "$tool_specified" >&6; }
40047      fi
40048    fi
40049  fi
40050
40051
40052
40053  # Only process if variable expands to non-empty
40054
40055  if test "x$BUILD_LD" != x; then
40056    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40057
40058  # First separate the path from the arguments. This will split at the first
40059  # space.
40060  complete="$BUILD_LD"
40061  path="${complete%% *}"
40062  tmp="$complete EOL"
40063  arguments="${tmp#* }"
40064
40065  # Input might be given as Windows format, start by converting to
40066  # unix format.
40067  new_path=`$CYGPATH -u "$path"`
40068
40069  # Now try to locate executable using which
40070  new_path=`$WHICH "$new_path" 2> /dev/null`
40071  # bat and cmd files are not always considered executable in cygwin causing which
40072  # to not find them
40073  if test "x$new_path" = x \
40074      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40075      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40076    new_path=`$CYGPATH -u "$path"`
40077  fi
40078  if test "x$new_path" = x; then
40079    # Oops. Which didn't find the executable.
40080    # The splitting of arguments from the executable at a space might have been incorrect,
40081    # since paths with space are more likely in Windows. Give it another try with the whole
40082    # argument.
40083    path="$complete"
40084    arguments="EOL"
40085    new_path=`$CYGPATH -u "$path"`
40086    new_path=`$WHICH "$new_path" 2> /dev/null`
40087    # bat and cmd files are not always considered executable in cygwin causing which
40088    # to not find them
40089    if test "x$new_path" = x \
40090        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40091        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40092      new_path=`$CYGPATH -u "$path"`
40093    fi
40094    if test "x$new_path" = x; then
40095      # It's still not found. Now this is an unrecoverable error.
40096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40097$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40098      has_space=`$ECHO "$complete" | $GREP " "`
40099      if test "x$has_space" != x; then
40100        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40101$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40102      fi
40103      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40104    fi
40105  fi
40106
40107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40110  # "foo.exe" is OK but "foo" is an error.
40111  #
40112  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40113  # It is also a way to make sure we got the proper file name for the real test later on.
40114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40115  if test "x$test_shortpath" = x; then
40116    # Short path failed, file does not exist as specified.
40117    # Try adding .exe or .cmd
40118    if test -f "${new_path}.exe"; then
40119      input_to_shortpath="${new_path}.exe"
40120    elif test -f "${new_path}.cmd"; then
40121      input_to_shortpath="${new_path}.cmd"
40122    else
40123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40124$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40125      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40126$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40127      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40128    fi
40129  else
40130    input_to_shortpath="$new_path"
40131  fi
40132
40133  # Call helper function which possibly converts this using DOS-style short mode.
40134  # If so, the updated path is stored in $new_path.
40135  new_path="$input_to_shortpath"
40136
40137  input_path="$input_to_shortpath"
40138  # Check if we need to convert this using DOS-style short mode. If the path
40139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40140  # take no chances and rewrite it.
40141  # Note: m4 eats our [], so we need to use [ and ] instead.
40142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40143  if test "x$has_forbidden_chars" != x; then
40144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40148      # Going to short mode and back again did indeed matter. Since short mode is
40149      # case insensitive, let's make it lowercase to improve readability.
40150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40151      # Now convert it back to Unix-style (cygpath)
40152      input_path=`$CYGPATH -u "$shortmode_path"`
40153      new_path="$input_path"
40154    fi
40155  fi
40156
40157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40158  if test "x$test_cygdrive_prefix" = x; then
40159    # As a simple fix, exclude /usr/bin since it's not a real path.
40160    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40162      # a path prefixed by /cygdrive for fixpath to work.
40163      new_path="$CYGWIN_ROOT_PATH$input_path"
40164    fi
40165  fi
40166
40167  # remove trailing .exe if any
40168  new_path="${new_path/%.exe/}"
40169
40170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40171
40172  # First separate the path from the arguments. This will split at the first
40173  # space.
40174  complete="$BUILD_LD"
40175  path="${complete%% *}"
40176  tmp="$complete EOL"
40177  arguments="${tmp#* }"
40178
40179  # Input might be given as Windows format, start by converting to
40180  # unix format.
40181  new_path="$path"
40182
40183  windows_path="$new_path"
40184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40185    unix_path=`$CYGPATH -u "$windows_path"`
40186    new_path="$unix_path"
40187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40189    new_path="$unix_path"
40190  fi
40191
40192
40193  # Now try to locate executable using which
40194  new_path=`$WHICH "$new_path" 2> /dev/null`
40195
40196  if test "x$new_path" = x; then
40197    # Oops. Which didn't find the executable.
40198    # The splitting of arguments from the executable at a space might have been incorrect,
40199    # since paths with space are more likely in Windows. Give it another try with the whole
40200    # argument.
40201    path="$complete"
40202    arguments="EOL"
40203    new_path="$path"
40204
40205  windows_path="$new_path"
40206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40207    unix_path=`$CYGPATH -u "$windows_path"`
40208    new_path="$unix_path"
40209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40211    new_path="$unix_path"
40212  fi
40213
40214
40215    new_path=`$WHICH "$new_path" 2> /dev/null`
40216    # bat and cmd files are not always considered executable in MSYS causing which
40217    # to not find them
40218    if test "x$new_path" = x \
40219        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40220        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40221      new_path="$path"
40222
40223  windows_path="$new_path"
40224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40225    unix_path=`$CYGPATH -u "$windows_path"`
40226    new_path="$unix_path"
40227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40229    new_path="$unix_path"
40230  fi
40231
40232    fi
40233
40234    if test "x$new_path" = x; then
40235      # It's still not found. Now this is an unrecoverable error.
40236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40237$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40238      has_space=`$ECHO "$complete" | $GREP " "`
40239      if test "x$has_space" != x; then
40240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40242      fi
40243      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40244    fi
40245  fi
40246
40247  # Now new_path has a complete unix path to the binary
40248  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40249    # Keep paths in /bin as-is, but remove trailing .exe if any
40250    new_path="${new_path/%.exe/}"
40251    # Do not save /bin paths to all_fixpath_prefixes!
40252  else
40253    # Not in mixed or Windows style, start by that.
40254    new_path=`cmd //c echo $new_path`
40255
40256  input_path="$new_path"
40257  # Check if we need to convert this using DOS-style short mode. If the path
40258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40259  # take no chances and rewrite it.
40260  # Note: m4 eats our [], so we need to use [ and ] instead.
40261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40262  if test "x$has_forbidden_chars" != x; then
40263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40265  fi
40266
40267    # Output is in $new_path
40268
40269  windows_path="$new_path"
40270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40271    unix_path=`$CYGPATH -u "$windows_path"`
40272    new_path="$unix_path"
40273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40275    new_path="$unix_path"
40276  fi
40277
40278    # remove trailing .exe if any
40279    new_path="${new_path/%.exe/}"
40280
40281    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40282    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40283  fi
40284
40285    else
40286      # We're on a unix platform. Hooray! :)
40287      # First separate the path from the arguments. This will split at the first
40288      # space.
40289      complete="$BUILD_LD"
40290      path="${complete%% *}"
40291      tmp="$complete EOL"
40292      arguments="${tmp#* }"
40293
40294      # Cannot rely on the command "which" here since it doesn't always work.
40295      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40296      if test -z "$is_absolute_path"; then
40297        # Path to executable is not absolute. Find it.
40298        IFS_save="$IFS"
40299        IFS=:
40300        for p in $PATH; do
40301          if test -f "$p/$path" && test -x "$p/$path"; then
40302            new_path="$p/$path"
40303            break
40304          fi
40305        done
40306        IFS="$IFS_save"
40307      else
40308        # This is an absolute path, we can use it without further modifications.
40309        new_path="$path"
40310      fi
40311
40312      if test "x$new_path" = x; then
40313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40314$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40315        has_space=`$ECHO "$complete" | $GREP " "`
40316        if test "x$has_space" != x; then
40317          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40318$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40319        fi
40320        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40321      fi
40322    fi
40323
40324    # Now join together the path and the arguments once again
40325    if test "x$arguments" != xEOL; then
40326      new_complete="$new_path ${arguments% *}"
40327    else
40328      new_complete="$new_path"
40329    fi
40330
40331    if test "x$complete" != "x$new_complete"; then
40332      BUILD_LD="$new_complete"
40333      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40334$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40335    fi
40336  fi
40337
40338  else
40339    # If we are not cross compiling, use the normal target compilers for
40340    # building the build platform executables.
40341    BUILD_CC="$CC"
40342    BUILD_CXX="$CXX"
40343    BUILD_LD="$LD"
40344  fi
40345
40346
40347
40348
40349
40350
40351  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40352    # For hotspot, we need these in Windows mixed path,
40353    # so rewrite them all. Need added .exe suffix.
40354    HOTSPOT_CXX="$CXX.exe"
40355    HOTSPOT_LD="$LD.exe"
40356    HOTSPOT_MT="$MT.exe"
40357    HOTSPOT_RC="$RC.exe"
40358
40359  unix_path="$HOTSPOT_CXX"
40360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40361    windows_path=`$CYGPATH -m "$unix_path"`
40362    HOTSPOT_CXX="$windows_path"
40363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40364    windows_path=`cmd //c echo $unix_path`
40365    HOTSPOT_CXX="$windows_path"
40366  fi
40367
40368
40369  unix_path="$HOTSPOT_LD"
40370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40371    windows_path=`$CYGPATH -m "$unix_path"`
40372    HOTSPOT_LD="$windows_path"
40373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40374    windows_path=`cmd //c echo $unix_path`
40375    HOTSPOT_LD="$windows_path"
40376  fi
40377
40378
40379  unix_path="$HOTSPOT_MT"
40380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40381    windows_path=`$CYGPATH -m "$unix_path"`
40382    HOTSPOT_MT="$windows_path"
40383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40384    windows_path=`cmd //c echo $unix_path`
40385    HOTSPOT_MT="$windows_path"
40386  fi
40387
40388
40389  unix_path="$HOTSPOT_RC"
40390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40391    windows_path=`$CYGPATH -m "$unix_path"`
40392    HOTSPOT_RC="$windows_path"
40393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40394    windows_path=`cmd //c echo $unix_path`
40395    HOTSPOT_RC="$windows_path"
40396  fi
40397
40398
40399
40400  else
40401    HOTSPOT_CXX="$CXX"
40402    HOTSPOT_LD="$LD"
40403  fi
40404
40405
40406
40407  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40408    USE_CLANG=true
40409  fi
40410
40411
40412
40413
40414
40415  # The package path is used only on macosx?
40416  # FIXME: clean this up, and/or move it elsewhere.
40417  PACKAGE_PATH=/opt/local
40418
40419
40420  # Check for extra potential brokenness.
40421  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40422    # On Windows, double-check that we got the right compiler.
40423    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40424    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40425    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40426      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40427        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
40428      fi
40429    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40430      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40431        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40432      fi
40433    fi
40434  fi
40435
40436  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40437    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40438    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40439    # This is later checked when setting flags.
40440
40441    # "-Og" suppported for GCC 4.8 and later
40442    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40443
40444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40445$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40446  supports=yes
40447
40448  saved_cflags="$CFLAGS"
40449  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40450  ac_ext=c
40451ac_cpp='$CPP $CPPFLAGS'
40452ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40453ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40454ac_compiler_gnu=$ac_cv_c_compiler_gnu
40455
40456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40457/* end confdefs.h.  */
40458int i;
40459_ACEOF
40460if ac_fn_c_try_compile "$LINENO"; then :
40461
40462else
40463  supports=no
40464fi
40465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40466  ac_ext=cpp
40467ac_cpp='$CXXCPP $CPPFLAGS'
40468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40471
40472  CFLAGS="$saved_cflags"
40473
40474  saved_cxxflags="$CXXFLAGS"
40475  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40476  ac_ext=cpp
40477ac_cpp='$CXXCPP $CPPFLAGS'
40478ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40479ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40480ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40481
40482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40483/* end confdefs.h.  */
40484int i;
40485_ACEOF
40486if ac_fn_cxx_try_compile "$LINENO"; then :
40487
40488else
40489  supports=no
40490fi
40491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40492  ac_ext=cpp
40493ac_cpp='$CXXCPP $CPPFLAGS'
40494ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40495ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40496ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40497
40498  CXXFLAGS="$saved_cxxflags"
40499
40500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40501$as_echo "$supports" >&6; }
40502  if test "x$supports" = "xyes" ; then
40503    HAS_CFLAG_OPTIMIZE_DEBUG=true
40504  else
40505    HAS_CFLAG_OPTIMIZE_DEBUG=false
40506  fi
40507
40508
40509    # "-z relro" supported in GNU binutils 2.17 and later
40510    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40511
40512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40513$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40514  supports=yes
40515
40516  saved_ldflags="$LDFLAGS"
40517  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40518  ac_ext=c
40519ac_cpp='$CPP $CPPFLAGS'
40520ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40521ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40522ac_compiler_gnu=$ac_cv_c_compiler_gnu
40523
40524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40525/* end confdefs.h.  */
40526
40527int
40528main ()
40529{
40530
40531  ;
40532  return 0;
40533}
40534_ACEOF
40535if ac_fn_c_try_link "$LINENO"; then :
40536
40537else
40538  supports=no
40539fi
40540rm -f core conftest.err conftest.$ac_objext \
40541    conftest$ac_exeext conftest.$ac_ext
40542  ac_ext=cpp
40543ac_cpp='$CXXCPP $CPPFLAGS'
40544ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40545ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40546ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40547
40548  LDFLAGS="$saved_ldflags"
40549
40550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40551$as_echo "$supports" >&6; }
40552  if test "x$supports" = "xyes" ; then
40553    HAS_LINKER_RELRO=true
40554  else
40555    HAS_LINKER_RELRO=false
40556  fi
40557
40558
40559    # "-z now" supported in GNU binutils 2.11 and later
40560    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40561
40562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40563$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40564  supports=yes
40565
40566  saved_ldflags="$LDFLAGS"
40567  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40568  ac_ext=c
40569ac_cpp='$CPP $CPPFLAGS'
40570ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40571ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40572ac_compiler_gnu=$ac_cv_c_compiler_gnu
40573
40574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40575/* end confdefs.h.  */
40576
40577int
40578main ()
40579{
40580
40581  ;
40582  return 0;
40583}
40584_ACEOF
40585if ac_fn_c_try_link "$LINENO"; then :
40586
40587else
40588  supports=no
40589fi
40590rm -f core conftest.err conftest.$ac_objext \
40591    conftest$ac_exeext conftest.$ac_ext
40592  ac_ext=cpp
40593ac_cpp='$CXXCPP $CPPFLAGS'
40594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40597
40598  LDFLAGS="$saved_ldflags"
40599
40600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40601$as_echo "$supports" >&6; }
40602  if test "x$supports" = "xyes" ; then
40603    HAS_LINKER_NOW=true
40604  else
40605    HAS_LINKER_NOW=false
40606  fi
40607
40608  fi
40609
40610  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40611  # in executable.'
40612  USING_BROKEN_SUSE_LD=no
40613  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40615$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40616    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40617    $ECHO "int main() { }" > main.c
40618    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40620$as_echo "no" >&6; }
40621      USING_BROKEN_SUSE_LD=no
40622    else
40623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40624$as_echo "yes" >&6; }
40625      USING_BROKEN_SUSE_LD=yes
40626    fi
40627    rm -rf version-script.map main.c a.out
40628  fi
40629
40630
40631
40632# Setup the JTReg Regression Test Harness.
40633
40634
40635# Check whether --with-jtreg was given.
40636if test "${with_jtreg+set}" = set; then :
40637  withval=$with_jtreg;
40638else
40639  with_jtreg=no
40640fi
40641
40642
40643  if test "x$with_jtreg" = xno; then
40644    # jtreg disabled
40645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40646$as_echo_n "checking for jtreg... " >&6; }
40647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40648$as_echo "no" >&6; }
40649  else
40650    if test "x$with_jtreg" != xyes; then
40651      # with path specified.
40652      JT_HOME="$with_jtreg"
40653    fi
40654
40655    if test "x$JT_HOME" != x; then
40656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40657$as_echo_n "checking for jtreg... " >&6; }
40658
40659      # use JT_HOME enviroment var.
40660
40661  # Only process if variable expands to non-empty
40662
40663  if test "x$JT_HOME" != x; then
40664    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40665
40666  # Input might be given as Windows format, start by converting to
40667  # unix format.
40668  path="$JT_HOME"
40669  new_path=`$CYGPATH -u "$path"`
40670
40671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40674  # "foo.exe" is OK but "foo" is an error.
40675  #
40676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40677  # It is also a way to make sure we got the proper file name for the real test later on.
40678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40679  if test "x$test_shortpath" = x; then
40680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40681$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40682    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40683  fi
40684
40685  # Call helper function which possibly converts this using DOS-style short mode.
40686  # If so, the updated path is stored in $new_path.
40687
40688  input_path="$new_path"
40689  # Check if we need to convert this using DOS-style short mode. If the path
40690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40691  # take no chances and rewrite it.
40692  # Note: m4 eats our [], so we need to use [ and ] instead.
40693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40694  if test "x$has_forbidden_chars" != x; then
40695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40699      # Going to short mode and back again did indeed matter. Since short mode is
40700      # case insensitive, let's make it lowercase to improve readability.
40701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40702      # Now convert it back to Unix-style (cygpath)
40703      input_path=`$CYGPATH -u "$shortmode_path"`
40704      new_path="$input_path"
40705    fi
40706  fi
40707
40708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40709  if test "x$test_cygdrive_prefix" = x; then
40710    # As a simple fix, exclude /usr/bin since it's not a real path.
40711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40713      # a path prefixed by /cygdrive for fixpath to work.
40714      new_path="$CYGWIN_ROOT_PATH$input_path"
40715    fi
40716  fi
40717
40718
40719  if test "x$path" != "x$new_path"; then
40720    JT_HOME="$new_path"
40721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40722$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40723  fi
40724
40725    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40726
40727  path="$JT_HOME"
40728  has_colon=`$ECHO $path | $GREP ^.:`
40729  new_path="$path"
40730  if test "x$has_colon" = x; then
40731    # Not in mixed or Windows style, start by that.
40732    new_path=`cmd //c echo $path`
40733  fi
40734
40735
40736  input_path="$new_path"
40737  # Check if we need to convert this using DOS-style short mode. If the path
40738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40739  # take no chances and rewrite it.
40740  # Note: m4 eats our [], so we need to use [ and ] instead.
40741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40742  if test "x$has_forbidden_chars" != x; then
40743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40745  fi
40746
40747
40748  windows_path="$new_path"
40749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40750    unix_path=`$CYGPATH -u "$windows_path"`
40751    new_path="$unix_path"
40752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40754    new_path="$unix_path"
40755  fi
40756
40757  if test "x$path" != "x$new_path"; then
40758    JT_HOME="$new_path"
40759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40760$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40761  fi
40762
40763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40765
40766    else
40767      # We're on a unix platform. Hooray! :)
40768      path="$JT_HOME"
40769      has_space=`$ECHO "$path" | $GREP " "`
40770      if test "x$has_space" != x; then
40771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40772$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40773        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40774      fi
40775
40776      # Use eval to expand a potential ~
40777      eval path="$path"
40778      if test ! -f "$path" && test ! -d "$path"; then
40779        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40780      fi
40781
40782      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40783    fi
40784  fi
40785
40786
40787      # jtreg win32 script works for everybody
40788      JTREGEXE="$JT_HOME/bin/jtreg"
40789
40790      if test ! -f "$JTREGEXE"; then
40791        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40792      fi
40793
40794      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40795$as_echo "$JTREGEXE" >&6; }
40796    else
40797      # try to find jtreg on path
40798
40799
40800
40801  # Publish this variable in the help.
40802
40803
40804  if test "x$JTREGEXE" = x; then
40805    # The variable is not set by user, try to locate tool using the code snippet
40806    for ac_prog in jtreg
40807do
40808  # Extract the first word of "$ac_prog", so it can be a program name with args.
40809set dummy $ac_prog; ac_word=$2
40810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40811$as_echo_n "checking for $ac_word... " >&6; }
40812if ${ac_cv_path_JTREGEXE+:} false; then :
40813  $as_echo_n "(cached) " >&6
40814else
40815  case $JTREGEXE in
40816  [\\/]* | ?:[\\/]*)
40817  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40818  ;;
40819  *)
40820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40821for as_dir in $PATH
40822do
40823  IFS=$as_save_IFS
40824  test -z "$as_dir" && as_dir=.
40825    for ac_exec_ext in '' $ac_executable_extensions; do
40826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40827    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40829    break 2
40830  fi
40831done
40832  done
40833IFS=$as_save_IFS
40834
40835  ;;
40836esac
40837fi
40838JTREGEXE=$ac_cv_path_JTREGEXE
40839if test -n "$JTREGEXE"; then
40840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40841$as_echo "$JTREGEXE" >&6; }
40842else
40843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40844$as_echo "no" >&6; }
40845fi
40846
40847
40848  test -n "$JTREGEXE" && break
40849done
40850
40851  else
40852    # The variable is set, but is it from the command line or the environment?
40853
40854    # Try to remove the string !JTREGEXE! from our list.
40855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40857      # If it failed, the variable was not from the command line. Ignore it,
40858      # but warn the user (except for BASH, which is always set by the calling BASH).
40859      if test "xJTREGEXE" != xBASH; then
40860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40861$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40862      fi
40863      # Try to locate tool using the code snippet
40864      for ac_prog in jtreg
40865do
40866  # Extract the first word of "$ac_prog", so it can be a program name with args.
40867set dummy $ac_prog; ac_word=$2
40868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40869$as_echo_n "checking for $ac_word... " >&6; }
40870if ${ac_cv_path_JTREGEXE+:} false; then :
40871  $as_echo_n "(cached) " >&6
40872else
40873  case $JTREGEXE in
40874  [\\/]* | ?:[\\/]*)
40875  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40876  ;;
40877  *)
40878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40879for as_dir in $PATH
40880do
40881  IFS=$as_save_IFS
40882  test -z "$as_dir" && as_dir=.
40883    for ac_exec_ext in '' $ac_executable_extensions; do
40884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40885    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40887    break 2
40888  fi
40889done
40890  done
40891IFS=$as_save_IFS
40892
40893  ;;
40894esac
40895fi
40896JTREGEXE=$ac_cv_path_JTREGEXE
40897if test -n "$JTREGEXE"; then
40898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40899$as_echo "$JTREGEXE" >&6; }
40900else
40901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40902$as_echo "no" >&6; }
40903fi
40904
40905
40906  test -n "$JTREGEXE" && break
40907done
40908
40909    else
40910      # If it succeeded, then it was overridden by the user. We will use it
40911      # for the tool.
40912
40913      # First remove it from the list of overridden variables, so we can test
40914      # for unknown variables in the end.
40915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40916
40917      # Check if the provided tool contains a complete path.
40918      tool_specified="$JTREGEXE"
40919      tool_basename="${tool_specified##*/}"
40920      if test "x$tool_basename" = "x$tool_specified"; then
40921        # A command without a complete path is provided, search $PATH.
40922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40923$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40924        # Extract the first word of "$tool_basename", so it can be a program name with args.
40925set dummy $tool_basename; ac_word=$2
40926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40927$as_echo_n "checking for $ac_word... " >&6; }
40928if ${ac_cv_path_JTREGEXE+:} false; then :
40929  $as_echo_n "(cached) " >&6
40930else
40931  case $JTREGEXE in
40932  [\\/]* | ?:[\\/]*)
40933  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40934  ;;
40935  *)
40936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40937for as_dir in $PATH
40938do
40939  IFS=$as_save_IFS
40940  test -z "$as_dir" && as_dir=.
40941    for ac_exec_ext in '' $ac_executable_extensions; do
40942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40943    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40945    break 2
40946  fi
40947done
40948  done
40949IFS=$as_save_IFS
40950
40951  ;;
40952esac
40953fi
40954JTREGEXE=$ac_cv_path_JTREGEXE
40955if test -n "$JTREGEXE"; then
40956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40957$as_echo "$JTREGEXE" >&6; }
40958else
40959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40960$as_echo "no" >&6; }
40961fi
40962
40963
40964        if test "x$JTREGEXE" = x; then
40965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40966        fi
40967      else
40968        # Otherwise we believe it is a complete path. Use it as it is.
40969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40970$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40972$as_echo_n "checking for JTREGEXE... " >&6; }
40973        if test ! -x "$tool_specified"; then
40974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40975$as_echo "not found" >&6; }
40976          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40977        fi
40978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40979$as_echo "$tool_specified" >&6; }
40980      fi
40981    fi
40982  fi
40983
40984
40985
40986  if test "x$JTREGEXE" = x; then
40987    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40988  fi
40989
40990
40991      JT_HOME="`$DIRNAME $JTREGEXE`"
40992    fi
40993  fi
40994
40995
40996
40997
40998
40999
41000  # Option used to tell the compiler whether to create 32- or 64-bit executables
41001  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41002    COMPILER_TARGET_BITS_FLAG="-q"
41003  else
41004    COMPILER_TARGET_BITS_FLAG="-m"
41005  fi
41006
41007
41008  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41009  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41010    ARFLAGS="-r"
41011  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41012    ARFLAGS="-X64"
41013  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41014    # lib.exe is used as AR to create static libraries.
41015    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41016  else
41017    ARFLAGS=""
41018  fi
41019
41020
41021  ## Setup strip.
41022  # FIXME: should this really be per platform, or should it be per toolchain type?
41023  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41024  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41025  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41026    STRIPFLAGS="-g"
41027  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41028    STRIPFLAGS="-x"
41029  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41030    STRIPFLAGS="-S"
41031  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41032    STRIPFLAGS="-X32_64"
41033  fi
41034
41035  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41036    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41037  fi
41038
41039
41040  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41041    CC_OUT_OPTION=-Fo
41042    EXE_OUT_OPTION=-out:
41043    LD_OUT_OPTION=-out:
41044    AR_OUT_OPTION=-out:
41045  else
41046    # The option used to specify the target .o,.a or .so file.
41047    # When compiling, how to specify the to be created object file.
41048    CC_OUT_OPTION='-o$(SPACE)'
41049    # When linking, how to specify the to be created executable.
41050    EXE_OUT_OPTION='-o$(SPACE)'
41051    # When linking, how to specify the to be created dynamically linkable library.
41052    LD_OUT_OPTION='-o$(SPACE)'
41053    # When archiving, how to specify the to be create static archive for object files.
41054    AR_OUT_OPTION='rcs$(SPACE)'
41055  fi
41056
41057
41058
41059
41060
41061  # On Windows, we need to set RC flags.
41062  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41063    RC_FLAGS="-nologo -l0x409"
41064    if test "x$VARIANT" = xOPT; then
41065      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41066    fi
41067
41068    # The version variables used to create RC_FLAGS may be overridden
41069    # in a custom configure script, or possibly the command line.
41070    # Let those variables be expanded at make time in spec.gmk.
41071    # The \$ are escaped to the shell, and the $(...) variables
41072    # are evaluated by make.
41073    RC_FLAGS="$RC_FLAGS \
41074        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41075        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41076        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41077        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41078        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41079        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41080        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41081  fi
41082
41083
41084  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41085    # silence copyright notice and other headers.
41086    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41087  fi
41088
41089  if test "x$SYSROOT" != "x"; then
41090    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41091      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41092        # Solaris Studio does not have a concept of sysroot. Instead we must
41093        # make sure the default include and lib dirs are appended to each
41094        # compile and link command line.
41095        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41096        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41097            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41098            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41099      fi
41100    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41101      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41102      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41103      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41104    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41105      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41106      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41107    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41108      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41109      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41110    fi
41111    # Propagate the sysroot args to hotspot
41112    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41113    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41114    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41115  fi
41116
41117  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41118  # set this here so it doesn't have to be peppered throughout the forest
41119  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41120    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41121    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41122  fi
41123
41124
41125
41126
41127
41128# FIXME: Currently we must test this after toolchain but before flags. Fix!
41129
41130# Now we can test some aspects on the target using configure macros.
41131
41132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41133$as_echo_n "checking for ANSI C header files... " >&6; }
41134if ${ac_cv_header_stdc+:} false; then :
41135  $as_echo_n "(cached) " >&6
41136else
41137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41138/* end confdefs.h.  */
41139#include <stdlib.h>
41140#include <stdarg.h>
41141#include <string.h>
41142#include <float.h>
41143
41144int
41145main ()
41146{
41147
41148  ;
41149  return 0;
41150}
41151_ACEOF
41152if ac_fn_cxx_try_compile "$LINENO"; then :
41153  ac_cv_header_stdc=yes
41154else
41155  ac_cv_header_stdc=no
41156fi
41157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41158
41159if test $ac_cv_header_stdc = yes; then
41160  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41162/* end confdefs.h.  */
41163#include <string.h>
41164
41165_ACEOF
41166if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41167  $EGREP "memchr" >/dev/null 2>&1; then :
41168
41169else
41170  ac_cv_header_stdc=no
41171fi
41172rm -f conftest*
41173
41174fi
41175
41176if test $ac_cv_header_stdc = yes; then
41177  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41179/* end confdefs.h.  */
41180#include <stdlib.h>
41181
41182_ACEOF
41183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41184  $EGREP "free" >/dev/null 2>&1; then :
41185
41186else
41187  ac_cv_header_stdc=no
41188fi
41189rm -f conftest*
41190
41191fi
41192
41193if test $ac_cv_header_stdc = yes; then
41194  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41195  if test "$cross_compiling" = yes; then :
41196  :
41197else
41198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41199/* end confdefs.h.  */
41200#include <ctype.h>
41201#include <stdlib.h>
41202#if ((' ' & 0x0FF) == 0x020)
41203# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41204# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41205#else
41206# define ISLOWER(c) \
41207		   (('a' <= (c) && (c) <= 'i') \
41208		     || ('j' <= (c) && (c) <= 'r') \
41209		     || ('s' <= (c) && (c) <= 'z'))
41210# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41211#endif
41212
41213#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41214int
41215main ()
41216{
41217  int i;
41218  for (i = 0; i < 256; i++)
41219    if (XOR (islower (i), ISLOWER (i))
41220	|| toupper (i) != TOUPPER (i))
41221      return 2;
41222  return 0;
41223}
41224_ACEOF
41225if ac_fn_cxx_try_run "$LINENO"; then :
41226
41227else
41228  ac_cv_header_stdc=no
41229fi
41230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41231  conftest.$ac_objext conftest.beam conftest.$ac_ext
41232fi
41233
41234fi
41235fi
41236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41237$as_echo "$ac_cv_header_stdc" >&6; }
41238if test $ac_cv_header_stdc = yes; then
41239
41240$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41241
41242fi
41243
41244# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41245for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41246		  inttypes.h stdint.h unistd.h
41247do :
41248  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41249ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41250"
41251if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41252  cat >>confdefs.h <<_ACEOF
41253#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41254_ACEOF
41255
41256fi
41257
41258done
41259
41260
41261
41262  ###############################################################################
41263  #
41264  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41265  # (The JVM can use 32 or 64 bit Java pointers but that decision
41266  # is made at runtime.)
41267  #
41268
41269  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41270    # Always specify -m flag on Solaris
41271    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41272
41273  # When we add flags to the "official" CFLAGS etc, we need to
41274  # keep track of these additions in ADDED_CFLAGS etc. These
41275  # will later be checked to make sure only controlled additions
41276  # have been made to CFLAGS etc.
41277  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41278  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41279  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41280
41281  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41282  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41283  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41284
41285  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41286  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41287  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41288
41289  elif test "x$COMPILE_TYPE" = xreduced; then
41290    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41291      # Specify -m if running reduced on unix platforms
41292
41293  # When we add flags to the "official" CFLAGS etc, we need to
41294  # keep track of these additions in ADDED_CFLAGS etc. These
41295  # will later be checked to make sure only controlled additions
41296  # have been made to CFLAGS etc.
41297  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41298  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41299  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41300
41301  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41302  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41303  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41304
41305  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41306  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41307  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41308
41309    fi
41310  fi
41311
41312  # Make compilation sanity check
41313  for ac_header in stdio.h
41314do :
41315  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41316if test "x$ac_cv_header_stdio_h" = xyes; then :
41317  cat >>confdefs.h <<_ACEOF
41318#define HAVE_STDIO_H 1
41319_ACEOF
41320
41321else
41322
41323    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41324$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41325    if test "x$COMPILE_TYPE" = xreduced; then
41326      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41327$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41328    elif test "x$COMPILE_TYPE" = xcross; then
41329      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41330$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41331    fi
41332    as_fn_error $? "Cannot continue." "$LINENO" 5
41333
41334fi
41335
41336done
41337
41338
41339  # The cast to long int works around a bug in the HP C Compiler
41340# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41341# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41342# This bug is HP SR number 8606223364.
41343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41344$as_echo_n "checking size of int *... " >&6; }
41345if ${ac_cv_sizeof_int_p+:} false; then :
41346  $as_echo_n "(cached) " >&6
41347else
41348  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41349
41350else
41351  if test "$ac_cv_type_int_p" = yes; then
41352     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41354as_fn_error 77 "cannot compute sizeof (int *)
41355See \`config.log' for more details" "$LINENO" 5; }
41356   else
41357     ac_cv_sizeof_int_p=0
41358   fi
41359fi
41360
41361fi
41362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41363$as_echo "$ac_cv_sizeof_int_p" >&6; }
41364
41365
41366
41367cat >>confdefs.h <<_ACEOF
41368#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41369_ACEOF
41370
41371
41372
41373  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41374  if test "x$ac_cv_sizeof_int_p" = x; then
41375    # The test failed, lets stick to the assumed value.
41376    { $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
41377$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41378  else
41379    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41380
41381    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41382      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41383      # Let's try to implicitely set the compilers target architecture and retry the test
41384      { $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
41385$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;}
41386      { $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
41387$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;}
41388
41389  # When we add flags to the "official" CFLAGS etc, we need to
41390  # keep track of these additions in ADDED_CFLAGS etc. These
41391  # will later be checked to make sure only controlled additions
41392  # have been made to CFLAGS etc.
41393  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41394  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41395  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41396
41397  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41398  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41399  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41400
41401  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41402  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41403  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41404
41405
41406      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41407      unset ac_cv_sizeof_int_p
41408      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41409      cat >>confdefs.h <<_ACEOF
41410#undef SIZEOF_INT_P
41411_ACEOF
41412
41413      # The cast to long int works around a bug in the HP C Compiler
41414# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41415# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41416# This bug is HP SR number 8606223364.
41417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41418$as_echo_n "checking size of int *... " >&6; }
41419if ${ac_cv_sizeof_int_p+:} false; then :
41420  $as_echo_n "(cached) " >&6
41421else
41422  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41423
41424else
41425  if test "$ac_cv_type_int_p" = yes; then
41426     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41427$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41428as_fn_error 77 "cannot compute sizeof (int *)
41429See \`config.log' for more details" "$LINENO" 5; }
41430   else
41431     ac_cv_sizeof_int_p=0
41432   fi
41433fi
41434
41435fi
41436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41437$as_echo "$ac_cv_sizeof_int_p" >&6; }
41438
41439
41440
41441cat >>confdefs.h <<_ACEOF
41442#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41443_ACEOF
41444
41445
41446
41447      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41448
41449      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41450        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
41451      fi
41452    fi
41453  fi
41454
41455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41456$as_echo_n "checking for target address size... " >&6; }
41457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41458$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41459
41460
41461  ###############################################################################
41462  #
41463  # Is the target little of big endian?
41464  #
41465   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41466$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41467if ${ac_cv_c_bigendian+:} false; then :
41468  $as_echo_n "(cached) " >&6
41469else
41470  ac_cv_c_bigendian=unknown
41471    # See if we're dealing with a universal compiler.
41472    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41473/* end confdefs.h.  */
41474#ifndef __APPLE_CC__
41475	       not a universal capable compiler
41476	     #endif
41477	     typedef int dummy;
41478
41479_ACEOF
41480if ac_fn_cxx_try_compile "$LINENO"; then :
41481
41482	# Check for potential -arch flags.  It is not universal unless
41483	# there are at least two -arch flags with different values.
41484	ac_arch=
41485	ac_prev=
41486	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41487	 if test -n "$ac_prev"; then
41488	   case $ac_word in
41489	     i?86 | x86_64 | ppc | ppc64)
41490	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41491		 ac_arch=$ac_word
41492	       else
41493		 ac_cv_c_bigendian=universal
41494		 break
41495	       fi
41496	       ;;
41497	   esac
41498	   ac_prev=
41499	 elif test "x$ac_word" = "x-arch"; then
41500	   ac_prev=arch
41501	 fi
41502       done
41503fi
41504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41505    if test $ac_cv_c_bigendian = unknown; then
41506      # See if sys/param.h defines the BYTE_ORDER macro.
41507      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41508/* end confdefs.h.  */
41509#include <sys/types.h>
41510	     #include <sys/param.h>
41511
41512int
41513main ()
41514{
41515#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41516		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41517		     && LITTLE_ENDIAN)
41518	      bogus endian macros
41519	     #endif
41520
41521  ;
41522  return 0;
41523}
41524_ACEOF
41525if ac_fn_cxx_try_compile "$LINENO"; then :
41526  # It does; now see whether it defined to BIG_ENDIAN or not.
41527	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41528/* end confdefs.h.  */
41529#include <sys/types.h>
41530		#include <sys/param.h>
41531
41532int
41533main ()
41534{
41535#if BYTE_ORDER != BIG_ENDIAN
41536		 not big endian
41537		#endif
41538
41539  ;
41540  return 0;
41541}
41542_ACEOF
41543if ac_fn_cxx_try_compile "$LINENO"; then :
41544  ac_cv_c_bigendian=yes
41545else
41546  ac_cv_c_bigendian=no
41547fi
41548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41549fi
41550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41551    fi
41552    if test $ac_cv_c_bigendian = unknown; then
41553      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41554      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41555/* end confdefs.h.  */
41556#include <limits.h>
41557
41558int
41559main ()
41560{
41561#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41562	      bogus endian macros
41563	     #endif
41564
41565  ;
41566  return 0;
41567}
41568_ACEOF
41569if ac_fn_cxx_try_compile "$LINENO"; then :
41570  # It does; now see whether it defined to _BIG_ENDIAN or not.
41571	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41572/* end confdefs.h.  */
41573#include <limits.h>
41574
41575int
41576main ()
41577{
41578#ifndef _BIG_ENDIAN
41579		 not big endian
41580		#endif
41581
41582  ;
41583  return 0;
41584}
41585_ACEOF
41586if ac_fn_cxx_try_compile "$LINENO"; then :
41587  ac_cv_c_bigendian=yes
41588else
41589  ac_cv_c_bigendian=no
41590fi
41591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41592fi
41593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41594    fi
41595    if test $ac_cv_c_bigendian = unknown; then
41596      # Compile a test program.
41597      if test "$cross_compiling" = yes; then :
41598  # Try to guess by grepping values from an object file.
41599	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41600/* end confdefs.h.  */
41601short int ascii_mm[] =
41602		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41603		short int ascii_ii[] =
41604		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41605		int use_ascii (int i) {
41606		  return ascii_mm[i] + ascii_ii[i];
41607		}
41608		short int ebcdic_ii[] =
41609		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41610		short int ebcdic_mm[] =
41611		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41612		int use_ebcdic (int i) {
41613		  return ebcdic_mm[i] + ebcdic_ii[i];
41614		}
41615		extern int foo;
41616
41617int
41618main ()
41619{
41620return use_ascii (foo) == use_ebcdic (foo);
41621  ;
41622  return 0;
41623}
41624_ACEOF
41625if ac_fn_cxx_try_compile "$LINENO"; then :
41626  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41627	      ac_cv_c_bigendian=yes
41628	    fi
41629	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41630	      if test "$ac_cv_c_bigendian" = unknown; then
41631		ac_cv_c_bigendian=no
41632	      else
41633		# finding both strings is unlikely to happen, but who knows?
41634		ac_cv_c_bigendian=unknown
41635	      fi
41636	    fi
41637fi
41638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41639else
41640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41641/* end confdefs.h.  */
41642$ac_includes_default
41643int
41644main ()
41645{
41646
41647	     /* Are we little or big endian?  From Harbison&Steele.  */
41648	     union
41649	     {
41650	       long int l;
41651	       char c[sizeof (long int)];
41652	     } u;
41653	     u.l = 1;
41654	     return u.c[sizeof (long int) - 1] == 1;
41655
41656  ;
41657  return 0;
41658}
41659_ACEOF
41660if ac_fn_cxx_try_run "$LINENO"; then :
41661  ac_cv_c_bigendian=no
41662else
41663  ac_cv_c_bigendian=yes
41664fi
41665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41666  conftest.$ac_objext conftest.beam conftest.$ac_ext
41667fi
41668
41669    fi
41670fi
41671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41672$as_echo "$ac_cv_c_bigendian" >&6; }
41673 case $ac_cv_c_bigendian in #(
41674   yes)
41675     ENDIAN="big";; #(
41676   no)
41677     ENDIAN="little" ;; #(
41678   universal)
41679     ENDIAN="universal_endianness"
41680     ;; #(
41681   *)
41682     ENDIAN="unknown" ;;
41683 esac
41684
41685
41686  if test "x$ENDIAN" = xuniversal_endianness; then
41687    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41688  fi
41689  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41690    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
41691  fi
41692
41693
41694# Configure flags for the tools
41695
41696  ###############################################################################
41697  #
41698  # How to compile shared libraries.
41699  #
41700
41701  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41702    PICFLAG="-fPIC"
41703    C_FLAG_REORDER=''
41704    CXX_FLAG_REORDER=''
41705
41706    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41707      # Linking is different on MacOSX
41708      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41709      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41710      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41711      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41712      SET_SHARED_LIBRARY_MAPFILE=''
41713    else
41714      # Default works for linux, might work on other platforms as well.
41715      SHARED_LIBRARY_FLAGS='-shared'
41716      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41717      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41718      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41719      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41720    fi
41721  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41722    PICFLAG=''
41723    C_FLAG_REORDER=''
41724    CXX_FLAG_REORDER=''
41725
41726    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41727      # Linking is different on MacOSX
41728      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41729      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41730      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41731      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41732      SET_SHARED_LIBRARY_MAPFILE=''
41733    else
41734      # Default works for linux, might work on other platforms as well.
41735      SHARED_LIBRARY_FLAGS='-shared'
41736      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41737      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41738      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41739      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41740    fi
41741  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41742    PICFLAG="-KPIC"
41743    C_FLAG_REORDER='-xF'
41744    CXX_FLAG_REORDER='-xF'
41745    SHARED_LIBRARY_FLAGS="-G"
41746    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41747    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41748    SET_SHARED_LIBRARY_NAME=''
41749    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41750  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41751    PICFLAG="-qpic=large"
41752    C_FLAG_REORDER=''
41753    CXX_FLAG_REORDER=''
41754    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41755    SET_EXECUTABLE_ORIGIN=""
41756    SET_SHARED_LIBRARY_ORIGIN=''
41757    SET_SHARED_LIBRARY_NAME=''
41758    SET_SHARED_LIBRARY_MAPFILE=''
41759  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41760    PICFLAG=""
41761    C_FLAG_REORDER=''
41762    CXX_FLAG_REORDER=''
41763    SHARED_LIBRARY_FLAGS="-LD"
41764    SET_EXECUTABLE_ORIGIN=''
41765    SET_SHARED_LIBRARY_ORIGIN=''
41766    SET_SHARED_LIBRARY_NAME=''
41767    SET_SHARED_LIBRARY_MAPFILE=''
41768  fi
41769
41770
41771
41772
41773
41774
41775
41776
41777  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41778    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41779    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41780    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41781  fi
41782  # The (cross) compiler is now configured, we can now test capabilities
41783  # of the target platform.
41784
41785
41786
41787  ###############################################################################
41788  #
41789  # Setup the opt flags for different compilers
41790  # and different operating systems.
41791  #
41792
41793  # FIXME: this was indirectly the old default, but just inherited.
41794  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41795  #   C_FLAG_DEPS="-MMD -MF"
41796  # fi
41797
41798  # Generate make dependency files
41799  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41800    C_FLAG_DEPS="-MMD -MF"
41801  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41802    C_FLAG_DEPS="-MMD -MF"
41803  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41804    C_FLAG_DEPS="-xMMD -xMF"
41805  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41806    C_FLAG_DEPS="-qmakedep=gcc -MF"
41807  fi
41808  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41809
41810
41811
41812  # Debug symbols
41813  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41814    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41815      # reduce from default "-g2" option to save space
41816      CFLAGS_DEBUG_SYMBOLS="-g1"
41817      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41818    else
41819      CFLAGS_DEBUG_SYMBOLS="-g"
41820      CXXFLAGS_DEBUG_SYMBOLS="-g"
41821    fi
41822  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41823    CFLAGS_DEBUG_SYMBOLS="-g"
41824    CXXFLAGS_DEBUG_SYMBOLS="-g"
41825  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41826    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41827    # FIXME: likely a bug, this disables debug symbols rather than enables them
41828    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41829  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41830    CFLAGS_DEBUG_SYMBOLS="-g"
41831    CXXFLAGS_DEBUG_SYMBOLS="-g"
41832  fi
41833
41834
41835
41836  # bounds, memory and behavior checking options
41837  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41838    case $DEBUG_LEVEL in
41839    release )
41840      # no adjustment
41841      ;;
41842    fastdebug )
41843      # no adjustment
41844      ;;
41845    slowdebug )
41846      # Add runtime stack smashing and undefined behavior checks.
41847      # Not all versions of gcc support -fstack-protector
41848      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
41849
41850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
41851$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
41852  supports=yes
41853
41854  saved_cflags="$CFLAGS"
41855  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
41856  ac_ext=c
41857ac_cpp='$CPP $CPPFLAGS'
41858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41860ac_compiler_gnu=$ac_cv_c_compiler_gnu
41861
41862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41863/* end confdefs.h.  */
41864int i;
41865_ACEOF
41866if ac_fn_c_try_compile "$LINENO"; then :
41867
41868else
41869  supports=no
41870fi
41871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41872  ac_ext=cpp
41873ac_cpp='$CXXCPP $CPPFLAGS'
41874ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41875ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41876ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41877
41878  CFLAGS="$saved_cflags"
41879
41880  saved_cxxflags="$CXXFLAGS"
41881  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
41882  ac_ext=cpp
41883ac_cpp='$CXXCPP $CPPFLAGS'
41884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41887
41888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41889/* end confdefs.h.  */
41890int i;
41891_ACEOF
41892if ac_fn_cxx_try_compile "$LINENO"; then :
41893
41894else
41895  supports=no
41896fi
41897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41898  ac_ext=cpp
41899ac_cpp='$CXXCPP $CPPFLAGS'
41900ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41901ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41902ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41903
41904  CXXFLAGS="$saved_cxxflags"
41905
41906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41907$as_echo "$supports" >&6; }
41908  if test "x$supports" = "xyes" ; then
41909    :
41910  else
41911    STACK_PROTECTOR_CFLAG=""
41912  fi
41913
41914
41915      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
41916      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
41917      ;;
41918    esac
41919  fi
41920
41921  # Optimization levels
41922  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41923    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41924
41925    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41926      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41927      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41928      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41929      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41930      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41931      C_O_FLAG_NONE="-xregs=no%frameptr"
41932      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41933      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41934      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41935      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41936      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41937      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41938        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41939        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41940      fi
41941    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41942      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41943      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41944      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41945      C_O_FLAG_DEBUG=""
41946      C_O_FLAG_NONE=""
41947      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41948      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41949      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41950      C_O_FLAG_DEBUG=""
41951      CXX_O_FLAG_NONE=""
41952    fi
41953  else
41954    # The remaining toolchains share opt flags between CC and CXX;
41955    # setup for C and duplicate afterwards.
41956    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41957      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41958        # On MacOSX we optimize for size, something
41959        # we should do for all platforms?
41960        C_O_FLAG_HIGHEST="-Os"
41961        C_O_FLAG_HI="-Os"
41962        C_O_FLAG_NORM="-Os"
41963      else
41964        C_O_FLAG_HIGHEST="-O3"
41965        C_O_FLAG_HI="-O3"
41966        C_O_FLAG_NORM="-O2"
41967      fi
41968      C_O_FLAG_DEBUG="-O0"
41969      C_O_FLAG_NONE="-O0"
41970    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41971      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41972        # On MacOSX we optimize for size, something
41973        # we should do for all platforms?
41974        C_O_FLAG_HIGHEST="-Os"
41975        C_O_FLAG_HI="-Os"
41976        C_O_FLAG_NORM="-Os"
41977      else
41978        C_O_FLAG_HIGHEST="-O3"
41979        C_O_FLAG_HI="-O3"
41980        C_O_FLAG_NORM="-O2"
41981      fi
41982      C_O_FLAG_DEBUG="-O0"
41983      C_O_FLAG_NONE="-O0"
41984    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41985      C_O_FLAG_HIGHEST="-O3"
41986      C_O_FLAG_HI="-O3 -qstrict"
41987      C_O_FLAG_NORM="-O2"
41988      C_O_FLAG_DEBUG="-qnoopt"
41989      C_O_FLAG_NONE="-qnoop"
41990    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41991      C_O_FLAG_HIGHEST="-O2"
41992      C_O_FLAG_HI="-O1"
41993      C_O_FLAG_NORM="-O1"
41994      C_O_FLAG_DEBUG="-Od"
41995      C_O_FLAG_NONE="-Od"
41996    fi
41997    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41998    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41999    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42000    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42001    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42002  fi
42003
42004  # Adjust optimization flags according to debug level.
42005  case $DEBUG_LEVEL in
42006    release )
42007      # no adjustment
42008      ;;
42009    fastdebug )
42010      # Not quite so much optimization
42011      C_O_FLAG_HI="$C_O_FLAG_NORM"
42012      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42013      ;;
42014    slowdebug )
42015      # Disable optimization
42016      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42017      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42018      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42019      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42020      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42021      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42022      ;;
42023  esac
42024
42025
42026
42027
42028
42029
42030
42031
42032
42033
42034
42035
42036
42037  # Special extras...
42038  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42039    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42040      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42041      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42042    fi
42043    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42044    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42045  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42046    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42047    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42048  fi
42049
42050  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42051    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42052$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42053  fi
42054
42055  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42056    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42057$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42058  fi
42059
42060  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42061    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42062$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42063  fi
42064
42065
42066# Check whether --with-extra-cflags was given.
42067if test "${with_extra_cflags+set}" = set; then :
42068  withval=$with_extra_cflags;
42069fi
42070
42071
42072
42073# Check whether --with-extra-cxxflags was given.
42074if test "${with_extra_cxxflags+set}" = set; then :
42075  withval=$with_extra_cxxflags;
42076fi
42077
42078
42079
42080# Check whether --with-extra-ldflags was given.
42081if test "${with_extra_ldflags+set}" = set; then :
42082  withval=$with_extra_ldflags;
42083fi
42084
42085
42086  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42087  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42088  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42089
42090  # Hotspot needs these set in their legacy form
42091  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42092  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42093  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42094
42095
42096
42097
42098
42099  ###############################################################################
42100  #
42101  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42102  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42103  #
42104
42105  # Setup compiler/platform specific flags into
42106  #    CFLAGS_JDK    - C Compiler flags
42107  #    CXXFLAGS_JDK  - C++ Compiler flags
42108  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42109  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42110    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42111      # Force compatibility with i586 on 32 bit intel platforms.
42112      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42113    fi
42114    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42115        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42116    case $OPENJDK_TARGET_CPU_ARCH in
42117      arm )
42118        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42119        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42120        ;;
42121      ppc )
42122        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42123        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42124        ;;
42125      * )
42126        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42127        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42128        ;;
42129    esac
42130  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42131    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42132    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42133      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42134    fi
42135
42136    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42137    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42138  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42139    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42140    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42141  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42142    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42143        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42144        -DWIN32_LEAN_AND_MEAN \
42145        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42146        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42147        -DWIN32 -DIAL"
42148    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42149      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42150    else
42151      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42152    fi
42153    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42154    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42155    # studio.
42156    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42157      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42158          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42159    fi
42160  fi
42161
42162  ###############################################################################
42163
42164  # Adjust flags according to debug level.
42165  case $DEBUG_LEVEL in
42166    fastdebug | slowdebug )
42167      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42168      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42169      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42170      ;;
42171    release )
42172      ;;
42173    * )
42174      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42175      ;;
42176  esac
42177
42178  # Setup LP64
42179  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42180
42181  # Set some common defines. These works for all compilers, but assume
42182  # -D is universally accepted.
42183
42184  # Setup endianness
42185  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42186    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42187    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42188    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42189    #   Note: -Dmacro         is the same as    #define macro 1
42190    #         -Dmacro=        is the same as    #define macro
42191    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42192      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42193    else
42194      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42195    fi
42196  else
42197    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42198    # are defined in the system?
42199    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42200      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42201    else
42202      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42203    fi
42204  fi
42205
42206  # Setup target OS define. Use OS target name but in upper case.
42207  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42208  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42209
42210  # Setup target CPU
42211  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42212
42213  # Setup debug/release defines
42214  if test "x$DEBUG_LEVEL" = xrelease; then
42215    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42216    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42217      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42218    fi
42219  else
42220    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42221  fi
42222
42223  # Setup release name
42224  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42225
42226
42227  # Set some additional per-OS defines.
42228  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42229    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42230  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42231    # FIXME: PPC64 should not be here.
42232    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42233  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42234    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42235  fi
42236
42237  # Additional macosx handling
42238  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42239    # Setting these parameters makes it an error to link to macosx APIs that are
42240    # newer than the given OS version and makes the linked binaries compatible
42241    # even if built on a newer version of the OS.
42242    # The expected format is X.Y.Z
42243    MACOSX_VERSION_MIN=10.7.0
42244
42245
42246    # The macro takes the version with no dots, ex: 1070
42247    # Let the flags variables get resolved in make for easier override on make
42248    # command line.
42249    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42250    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42251  fi
42252
42253  # Setup some hard coded includes
42254  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42255      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42256      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42257      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42258
42259  # The shared libraries are compiled using the picflag.
42260  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42261  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42262
42263  # Executable flags
42264  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42265  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42266
42267
42268
42269
42270
42271
42272  # Flags for compiling test libraries
42273  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42274  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42275
42276  # Flags for compiling test executables
42277  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42278  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42279
42280
42281
42282
42283
42284
42285  # Setup LDFLAGS et al.
42286  #
42287
42288  # Now this is odd. The JDK native libraries have to link against libjvm.so
42289  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42290  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42291  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42292  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42293  # libraries will link to whatever is in memory. Yuck.
42294  #
42295  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42296  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42297    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42298    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42299      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42300    fi
42301    # TODO: make -debug optional "--disable-full-debug-symbols"
42302    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42303  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42304    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42305    # We have previously set HAS_GNU_HASH if this is the case
42306    if test -n "$HAS_GNU_HASH"; then
42307      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42308    fi
42309    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42310      # And since we now know that the linker is gnu, then add -z defs, to forbid
42311      # undefined symbols in object files.
42312      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42313      case $DEBUG_LEVEL in
42314        release )
42315          # tell linker to optimize libraries.
42316          # Should this be supplied to the OSS linker as well?
42317          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42318          ;;
42319        slowdebug )
42320          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42321            # do relocations at load
42322            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42323            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42324          fi
42325          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42326            # mark relocations read only
42327            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42328            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42329          fi
42330          ;;
42331        fastdebug )
42332          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42333            # mark relocations read only
42334            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42335            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42336          fi
42337          ;;
42338        * )
42339          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42340          ;;
42341        esac
42342    fi
42343  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42344    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42345    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42346  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42347    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42348  fi
42349
42350  # Customize LDFLAGS for executables
42351
42352  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42353
42354  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42355    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42356      LDFLAGS_STACK_SIZE=1048576
42357    else
42358      LDFLAGS_STACK_SIZE=327680
42359    fi
42360    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42361  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42362    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42363  fi
42364
42365  # Customize LDFLAGS for libs
42366  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42367
42368  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42369    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42370    LDFLAGS_JDKLIB_SUFFIX=""
42371  else
42372    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42373        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42374
42375    # On some platforms (mac) the linker warns about non existing -L dirs.
42376    # Add server first if available. Linking aginst client does not always produce the same results.
42377    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42378    # Default to server for other variants.
42379    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42380      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42381    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42382      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42383    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42384      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42385    else
42386      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42387    fi
42388
42389    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42390    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42391      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42392    fi
42393  fi
42394
42395
42396
42397
42398
42399
42400
42401  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42402  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42403  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42404  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42405
42406
42407
42408
42409
42410
42411
42412  # Some Zero and Shark settings.
42413  # ZERO_ARCHFLAG tells the compiler which mode to build for
42414  case "${OPENJDK_TARGET_CPU}" in
42415    s390)
42416      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42417      ;;
42418    *)
42419      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42420  esac
42421
42422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42423$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42424  supports=yes
42425
42426  saved_cflags="$CFLAGS"
42427  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42428  ac_ext=c
42429ac_cpp='$CPP $CPPFLAGS'
42430ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42431ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42432ac_compiler_gnu=$ac_cv_c_compiler_gnu
42433
42434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42435/* end confdefs.h.  */
42436int i;
42437_ACEOF
42438if ac_fn_c_try_compile "$LINENO"; then :
42439
42440else
42441  supports=no
42442fi
42443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42444  ac_ext=cpp
42445ac_cpp='$CXXCPP $CPPFLAGS'
42446ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42447ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42448ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42449
42450  CFLAGS="$saved_cflags"
42451
42452  saved_cxxflags="$CXXFLAGS"
42453  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42454  ac_ext=cpp
42455ac_cpp='$CXXCPP $CPPFLAGS'
42456ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42457ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42458ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42459
42460  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42461/* end confdefs.h.  */
42462int i;
42463_ACEOF
42464if ac_fn_cxx_try_compile "$LINENO"; then :
42465
42466else
42467  supports=no
42468fi
42469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42470  ac_ext=cpp
42471ac_cpp='$CXXCPP $CPPFLAGS'
42472ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42473ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42474ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42475
42476  CXXFLAGS="$saved_cxxflags"
42477
42478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42479$as_echo "$supports" >&6; }
42480  if test "x$supports" = "xyes" ; then
42481    :
42482  else
42483    ZERO_ARCHFLAG=""
42484  fi
42485
42486
42487
42488  # Check that the compiler supports -mX (or -qX on AIX) flags
42489  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42490
42491  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42492$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42493  supports=yes
42494
42495  saved_cflags="$CFLAGS"
42496  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42497  ac_ext=c
42498ac_cpp='$CPP $CPPFLAGS'
42499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42501ac_compiler_gnu=$ac_cv_c_compiler_gnu
42502
42503  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42504/* end confdefs.h.  */
42505int i;
42506_ACEOF
42507if ac_fn_c_try_compile "$LINENO"; then :
42508
42509else
42510  supports=no
42511fi
42512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42513  ac_ext=cpp
42514ac_cpp='$CXXCPP $CPPFLAGS'
42515ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42516ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42517ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42518
42519  CFLAGS="$saved_cflags"
42520
42521  saved_cxxflags="$CXXFLAGS"
42522  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42523  ac_ext=cpp
42524ac_cpp='$CXXCPP $CPPFLAGS'
42525ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42526ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42527ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42528
42529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42530/* end confdefs.h.  */
42531int i;
42532_ACEOF
42533if ac_fn_cxx_try_compile "$LINENO"; then :
42534
42535else
42536  supports=no
42537fi
42538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42539  ac_ext=cpp
42540ac_cpp='$CXXCPP $CPPFLAGS'
42541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42544
42545  CXXFLAGS="$saved_cxxflags"
42546
42547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42548$as_echo "$supports" >&6; }
42549  if test "x$supports" = "xyes" ; then
42550    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42551  else
42552    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42553  fi
42554
42555
42556
42557  # Check whether --enable-warnings-as-errors was given.
42558if test "${enable_warnings_as_errors+set}" = set; then :
42559  enableval=$enable_warnings_as_errors;
42560fi
42561
42562
42563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42564$as_echo_n "checking if native warnings are errors... " >&6; }
42565  if test "x$enable_warnings_as_errors" = "xyes"; then
42566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42567$as_echo "yes (explicitely set)" >&6; }
42568    WARNINGS_AS_ERRORS=true
42569  elif test "x$enable_warnings_as_errors" = "xno"; then
42570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42571$as_echo "no" >&6; }
42572    WARNINGS_AS_ERRORS=false
42573  elif test "x$enable_warnings_as_errors" = "x"; then
42574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42575$as_echo "yes (default)" >&6; }
42576    WARNINGS_AS_ERRORS=true
42577  else
42578    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42579  fi
42580
42581
42582  case "${TOOLCHAIN_TYPE}" in
42583    microsoft)
42584      DISABLE_WARNING_PREFIX="-wd"
42585      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42586      ;;
42587    solstudio)
42588      DISABLE_WARNING_PREFIX="-erroff="
42589      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42590      ;;
42591    gcc)
42592      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42593
42594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42595$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42596  supports=yes
42597
42598  saved_cflags="$CFLAGS"
42599  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42600  ac_ext=c
42601ac_cpp='$CPP $CPPFLAGS'
42602ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42603ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42604ac_compiler_gnu=$ac_cv_c_compiler_gnu
42605
42606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42607/* end confdefs.h.  */
42608int i;
42609_ACEOF
42610if ac_fn_c_try_compile "$LINENO"; then :
42611
42612else
42613  supports=no
42614fi
42615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42616  ac_ext=cpp
42617ac_cpp='$CXXCPP $CPPFLAGS'
42618ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42619ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42620ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42621
42622  CFLAGS="$saved_cflags"
42623
42624  saved_cxxflags="$CXXFLAGS"
42625  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42626  ac_ext=cpp
42627ac_cpp='$CXXCPP $CPPFLAGS'
42628ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42629ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42630ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42631
42632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42633/* end confdefs.h.  */
42634int i;
42635_ACEOF
42636if ac_fn_cxx_try_compile "$LINENO"; then :
42637
42638else
42639  supports=no
42640fi
42641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42642  ac_ext=cpp
42643ac_cpp='$CXXCPP $CPPFLAGS'
42644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42647
42648  CXXFLAGS="$saved_cxxflags"
42649
42650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42651$as_echo "$supports" >&6; }
42652  if test "x$supports" = "xyes" ; then
42653    GCC_CAN_DISABLE_WARNINGS=true
42654  else
42655    GCC_CAN_DISABLE_WARNINGS=false
42656
42657  fi
42658
42659      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42660        DISABLE_WARNING_PREFIX="-Wno-"
42661      else
42662        DISABLE_WARNING_PREFIX=
42663      fi
42664      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42665      ;;
42666    clang)
42667      DISABLE_WARNING_PREFIX="-Wno-"
42668      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42669      ;;
42670  esac
42671
42672
42673
42674
42675# Setup debug symbols (need objcopy from the toolchain for that)
42676
42677  #
42678  # ENABLE_DEBUG_SYMBOLS
42679  # This must be done after the toolchain is setup, since we're looking at objcopy.
42680  #
42681  # Check whether --enable-debug-symbols was given.
42682if test "${enable_debug_symbols+set}" = set; then :
42683  enableval=$enable_debug_symbols;
42684fi
42685
42686
42687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42688$as_echo_n "checking if we should generate debug symbols... " >&6; }
42689
42690  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42691    # explicit enabling of enable-debug-symbols and can't find objcopy
42692    #   this is an error
42693    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42694  fi
42695
42696  if test "x$enable_debug_symbols" = "xyes"; then
42697    ENABLE_DEBUG_SYMBOLS=true
42698  elif test "x$enable_debug_symbols" = "xno"; then
42699    ENABLE_DEBUG_SYMBOLS=false
42700  else
42701    # Default is on if objcopy is found
42702    if test "x$OBJCOPY" != x; then
42703      ENABLE_DEBUG_SYMBOLS=true
42704    # MacOS X and Windows don't use objcopy but default is on for those OSes
42705    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42706      ENABLE_DEBUG_SYMBOLS=true
42707    else
42708      ENABLE_DEBUG_SYMBOLS=false
42709    fi
42710  fi
42711
42712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42713$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42714
42715  #
42716  # ZIP_DEBUGINFO_FILES
42717  #
42718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42719$as_echo_n "checking if we should zip debug-info files... " >&6; }
42720  # Check whether --enable-zip-debug-info was given.
42721if test "${enable_zip_debug_info+set}" = set; then :
42722  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42723else
42724  enable_zip_debug_info="yes"
42725fi
42726
42727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42728$as_echo "${enable_zip_debug_info}" >&6; }
42729
42730  if test "x${enable_zip_debug_info}" = "xno"; then
42731    ZIP_DEBUGINFO_FILES=false
42732  else
42733    ZIP_DEBUGINFO_FILES=true
42734  fi
42735
42736
42737
42738
42739
42740  # Check whether --enable-native-coverage was given.
42741if test "${enable_native_coverage+set}" = set; then :
42742  enableval=$enable_native_coverage;
42743fi
42744
42745  GCOV_ENABLED="false"
42746  if test "x$enable_native_coverage" = "xyes"; then
42747    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42748      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42749$as_echo_n "checking if native coverage is enabled... " >&6; }
42750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42751$as_echo "yes" >&6; }
42752      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42753      GCOV_LDFLAGS="-fprofile-arcs"
42754      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42755      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42756      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42757      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42758      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42759      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42760      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42761      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42762      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42763      GCOV_ENABLED="true"
42764    else
42765      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42766    fi
42767  elif test "x$enable_native_coverage" = "xno"; then
42768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42769$as_echo_n "checking if native coverage is enabled... " >&6; }
42770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42771$as_echo "no" >&6; }
42772  elif test "x$enable_native_coverage" != "x"; then
42773    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42774  fi
42775
42776
42777
42778
42779###############################################################################
42780#
42781# Check dependencies for external and internal libraries.
42782#
42783###############################################################################
42784
42785# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42786
42787  # When using cygwin or msys, we need a wrapper binary that renames
42788  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42789  # @files and rewrites these too! This wrapper binary is
42790  # called fixpath.
42791  FIXPATH=
42792  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42794$as_echo_n "checking if fixpath can be created... " >&6; }
42795    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42796    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
42797    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
42798    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42799      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42800      FIXPATH="$FIXPATH_BIN -c"
42801    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42802      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42803      # @ was chosen as separator to minimize risk of other tools messing around with it
42804      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
42805          | tr ' ' '\n' | grep '^/./' | sort | uniq`
42806      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42807      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
42808    fi
42809    FIXPATH_SRC_W="$FIXPATH_SRC"
42810    FIXPATH_BIN_W="$FIXPATH_BIN"
42811
42812  unix_path="$FIXPATH_SRC_W"
42813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42814    windows_path=`$CYGPATH -m "$unix_path"`
42815    FIXPATH_SRC_W="$windows_path"
42816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42817    windows_path=`cmd //c echo $unix_path`
42818    FIXPATH_SRC_W="$windows_path"
42819  fi
42820
42821
42822  unix_path="$FIXPATH_BIN_W"
42823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42824    windows_path=`$CYGPATH -m "$unix_path"`
42825    FIXPATH_BIN_W="$windows_path"
42826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42827    windows_path=`cmd //c echo $unix_path`
42828    FIXPATH_BIN_W="$windows_path"
42829  fi
42830
42831    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
42832    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
42833    cd $FIXPATH_DIR
42834    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
42835    cd $CURDIR
42836
42837    if test ! -x $FIXPATH_BIN; then
42838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42839$as_echo "no" >&6; }
42840      cat $FIXPATH_DIR/fixpath1.log
42841      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
42842    fi
42843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42844$as_echo "yes" >&6; }
42845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42846$as_echo_n "checking if fixpath.exe works... " >&6; }
42847    cd $FIXPATH_DIR
42848    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
42849        > $FIXPATH_DIR/fixpath2.log 2>&1
42850    cd $CURDIR
42851    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
42852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42853$as_echo "no" >&6; }
42854      cat $FIXPATH_DIR/fixpath2.log
42855      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42856    fi
42857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42858$as_echo "yes" >&6; }
42859  fi
42860
42861
42862
42863
42864
42865
42866  ###############################################################################
42867  #
42868  # OS specific settings that we never will need to probe.
42869  #
42870  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42872$as_echo_n "checking what is not needed on Linux?... " >&6; }
42873    PULSE_NOT_NEEDED=yes
42874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42875$as_echo "pulse" >&6; }
42876  fi
42877
42878  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42880$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42881    ALSA_NOT_NEEDED=yes
42882    PULSE_NOT_NEEDED=yes
42883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42884$as_echo "alsa pulse" >&6; }
42885  fi
42886
42887  if test "x$OPENJDK_TARGET_OS" = xaix; then
42888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42889$as_echo_n "checking what is not needed on AIX?... " >&6; }
42890    ALSA_NOT_NEEDED=yes
42891    PULSE_NOT_NEEDED=yes
42892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42893$as_echo "alsa pulse" >&6; }
42894  fi
42895
42896
42897  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42899$as_echo_n "checking what is not needed on Windows?... " >&6; }
42900    CUPS_NOT_NEEDED=yes
42901    ALSA_NOT_NEEDED=yes
42902    PULSE_NOT_NEEDED=yes
42903    X11_NOT_NEEDED=yes
42904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42905$as_echo "alsa cups pulse x11" >&6; }
42906  fi
42907
42908  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42910$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42911    ALSA_NOT_NEEDED=yes
42912    PULSE_NOT_NEEDED=yes
42913    X11_NOT_NEEDED=yes
42914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42915$as_echo "alsa pulse x11" >&6; }
42916  fi
42917
42918  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42920$as_echo_n "checking what is not needed on bsd?... " >&6; }
42921    ALSA_NOT_NEEDED=yes
42922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42923$as_echo "alsa" >&6; }
42924  fi
42925
42926  if test "x$OPENJDK" = "xfalse"; then
42927    FREETYPE_NOT_NEEDED=yes
42928  fi
42929
42930  if test "x$SUPPORT_HEADFUL" = xno; then
42931    X11_NOT_NEEDED=yes
42932  fi
42933
42934
42935
42936  ###############################################################################
42937  #
42938  # Check for X Windows
42939  #
42940
42941  if test "x$X11_NOT_NEEDED" = xyes; then
42942    if test "x${with_x}" != x; then
42943      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42944$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42945    fi
42946    X_CFLAGS=
42947    X_LIBS=
42948  else
42949    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42950    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42951    # --x-libraries for the sysroot, if that seems to be correct.
42952    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42953      if test "x$SYSROOT" != "x"; then
42954        if test "x$x_includes" = xNONE; then
42955          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42956            x_includes="$SYSROOT/usr/X11R6/include"
42957          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42958            x_includes="$SYSROOT/usr/include"
42959          fi
42960        fi
42961        if test "x$x_libraries" = xNONE; then
42962          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42963            x_libraries="$SYSROOT/usr/X11R6/lib"
42964          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42965            x_libraries="$SYSROOT/usr/lib64"
42966          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42967            x_libraries="$SYSROOT/usr/lib"
42968          fi
42969        fi
42970      fi
42971    fi
42972
42973    # Now let autoconf do it's magic
42974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42975$as_echo_n "checking for X... " >&6; }
42976
42977
42978# Check whether --with-x was given.
42979if test "${with_x+set}" = set; then :
42980  withval=$with_x;
42981fi
42982
42983# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42984if test "x$with_x" = xno; then
42985  # The user explicitly disabled X.
42986  have_x=disabled
42987else
42988  case $x_includes,$x_libraries in #(
42989    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42990    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42991  $as_echo_n "(cached) " >&6
42992else
42993  # One or both of the vars are not set, and there is no cached value.
42994ac_x_includes=no ac_x_libraries=no
42995rm -f -r conftest.dir
42996if mkdir conftest.dir; then
42997  cd conftest.dir
42998  cat >Imakefile <<'_ACEOF'
42999incroot:
43000	@echo incroot='${INCROOT}'
43001usrlibdir:
43002	@echo usrlibdir='${USRLIBDIR}'
43003libdir:
43004	@echo libdir='${LIBDIR}'
43005_ACEOF
43006  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43007    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43008    for ac_var in incroot usrlibdir libdir; do
43009      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43010    done
43011    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43012    for ac_extension in a so sl dylib la dll; do
43013      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43014	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43015	ac_im_usrlibdir=$ac_im_libdir; break
43016      fi
43017    done
43018    # Screen out bogus values from the imake configuration.  They are
43019    # bogus both because they are the default anyway, and because
43020    # using them would break gcc on systems where it needs fixed includes.
43021    case $ac_im_incroot in
43022	/usr/include) ac_x_includes= ;;
43023	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43024    esac
43025    case $ac_im_usrlibdir in
43026	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43027	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43028    esac
43029  fi
43030  cd ..
43031  rm -f -r conftest.dir
43032fi
43033
43034# Standard set of common directories for X headers.
43035# Check X11 before X11Rn because it is often a symlink to the current release.
43036ac_x_header_dirs='
43037/usr/X11/include
43038/usr/X11R7/include
43039/usr/X11R6/include
43040/usr/X11R5/include
43041/usr/X11R4/include
43042
43043/usr/include/X11
43044/usr/include/X11R7
43045/usr/include/X11R6
43046/usr/include/X11R5
43047/usr/include/X11R4
43048
43049/usr/local/X11/include
43050/usr/local/X11R7/include
43051/usr/local/X11R6/include
43052/usr/local/X11R5/include
43053/usr/local/X11R4/include
43054
43055/usr/local/include/X11
43056/usr/local/include/X11R7
43057/usr/local/include/X11R6
43058/usr/local/include/X11R5
43059/usr/local/include/X11R4
43060
43061/usr/X386/include
43062/usr/x386/include
43063/usr/XFree86/include/X11
43064
43065/usr/include
43066/usr/local/include
43067/usr/unsupported/include
43068/usr/athena/include
43069/usr/local/x11r5/include
43070/usr/lpp/Xamples/include
43071
43072/usr/openwin/include
43073/usr/openwin/share/include'
43074
43075if test "$ac_x_includes" = no; then
43076  # Guess where to find include files, by looking for Xlib.h.
43077  # First, try using that file with no special directory specified.
43078  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43079/* end confdefs.h.  */
43080#include <X11/Xlib.h>
43081_ACEOF
43082if ac_fn_cxx_try_cpp "$LINENO"; then :
43083  # We can compile using X headers with no special include directory.
43084ac_x_includes=
43085else
43086  for ac_dir in $ac_x_header_dirs; do
43087  if test -r "$ac_dir/X11/Xlib.h"; then
43088    ac_x_includes=$ac_dir
43089    break
43090  fi
43091done
43092fi
43093rm -f conftest.err conftest.i conftest.$ac_ext
43094fi # $ac_x_includes = no
43095
43096if test "$ac_x_libraries" = no; then
43097  # Check for the libraries.
43098  # See if we find them without any special options.
43099  # Don't add to $LIBS permanently.
43100  ac_save_LIBS=$LIBS
43101  LIBS="-lX11 $LIBS"
43102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43103/* end confdefs.h.  */
43104#include <X11/Xlib.h>
43105int
43106main ()
43107{
43108XrmInitialize ()
43109  ;
43110  return 0;
43111}
43112_ACEOF
43113if ac_fn_cxx_try_link "$LINENO"; then :
43114  LIBS=$ac_save_LIBS
43115# We can link X programs with no special library path.
43116ac_x_libraries=
43117else
43118  LIBS=$ac_save_LIBS
43119for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43120do
43121  # Don't even attempt the hair of trying to link an X program!
43122  for ac_extension in a so sl dylib la dll; do
43123    if test -r "$ac_dir/libX11.$ac_extension"; then
43124      ac_x_libraries=$ac_dir
43125      break 2
43126    fi
43127  done
43128done
43129fi
43130rm -f core conftest.err conftest.$ac_objext \
43131    conftest$ac_exeext conftest.$ac_ext
43132fi # $ac_x_libraries = no
43133
43134case $ac_x_includes,$ac_x_libraries in #(
43135  no,* | *,no | *\'*)
43136    # Didn't find X, or a directory has "'" in its name.
43137    ac_cv_have_x="have_x=no";; #(
43138  *)
43139    # Record where we found X for the cache.
43140    ac_cv_have_x="have_x=yes\
43141	ac_x_includes='$ac_x_includes'\
43142	ac_x_libraries='$ac_x_libraries'"
43143esac
43144fi
43145;; #(
43146    *) have_x=yes;;
43147  esac
43148  eval "$ac_cv_have_x"
43149fi # $with_x != no
43150
43151if test "$have_x" != yes; then
43152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43153$as_echo "$have_x" >&6; }
43154  no_x=yes
43155else
43156  # If each of the values was on the command line, it overrides each guess.
43157  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43158  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43159  # Update the cache value to reflect the command line values.
43160  ac_cv_have_x="have_x=yes\
43161	ac_x_includes='$x_includes'\
43162	ac_x_libraries='$x_libraries'"
43163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43164$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43165fi
43166
43167    if test "$no_x" = yes; then
43168  # Not all programs may use this symbol, but it does not hurt to define it.
43169
43170$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43171
43172  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43173else
43174  if test -n "$x_includes"; then
43175    X_CFLAGS="$X_CFLAGS -I$x_includes"
43176  fi
43177
43178  # It would also be nice to do this for all -L options, not just this one.
43179  if test -n "$x_libraries"; then
43180    X_LIBS="$X_LIBS -L$x_libraries"
43181    # For Solaris; some versions of Sun CC require a space after -R and
43182    # others require no space.  Words are not sufficient . . . .
43183    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43184$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43185    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43186    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43187    ac_cxx_werror_flag=yes
43188    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43189/* end confdefs.h.  */
43190
43191int
43192main ()
43193{
43194
43195  ;
43196  return 0;
43197}
43198_ACEOF
43199if ac_fn_cxx_try_link "$LINENO"; then :
43200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43201$as_echo "no" >&6; }
43202       X_LIBS="$X_LIBS -R$x_libraries"
43203else
43204  LIBS="$ac_xsave_LIBS -R $x_libraries"
43205       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43206/* end confdefs.h.  */
43207
43208int
43209main ()
43210{
43211
43212  ;
43213  return 0;
43214}
43215_ACEOF
43216if ac_fn_cxx_try_link "$LINENO"; then :
43217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43218$as_echo "yes" >&6; }
43219	  X_LIBS="$X_LIBS -R $x_libraries"
43220else
43221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43222$as_echo "neither works" >&6; }
43223fi
43224rm -f core conftest.err conftest.$ac_objext \
43225    conftest$ac_exeext conftest.$ac_ext
43226fi
43227rm -f core conftest.err conftest.$ac_objext \
43228    conftest$ac_exeext conftest.$ac_ext
43229    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43230    LIBS=$ac_xsave_LIBS
43231  fi
43232
43233  # Check for system-dependent libraries X programs must link with.
43234  # Do this before checking for the system-independent R6 libraries
43235  # (-lICE), since we may need -lsocket or whatever for X linking.
43236
43237  if test "$ISC" = yes; then
43238    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43239  else
43240    # Martyn Johnson says this is needed for Ultrix, if the X
43241    # libraries were built with DECnet support.  And Karl Berry says
43242    # the Alpha needs dnet_stub (dnet does not exist).
43243    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43244    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43245/* end confdefs.h.  */
43246
43247/* Override any GCC internal prototype to avoid an error.
43248   Use char because int might match the return type of a GCC
43249   builtin and then its argument prototype would still apply.  */
43250#ifdef __cplusplus
43251extern "C"
43252#endif
43253char XOpenDisplay ();
43254int
43255main ()
43256{
43257return XOpenDisplay ();
43258  ;
43259  return 0;
43260}
43261_ACEOF
43262if ac_fn_cxx_try_link "$LINENO"; then :
43263
43264else
43265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43266$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43267if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43268  $as_echo_n "(cached) " >&6
43269else
43270  ac_check_lib_save_LIBS=$LIBS
43271LIBS="-ldnet  $LIBS"
43272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43273/* end confdefs.h.  */
43274
43275/* Override any GCC internal prototype to avoid an error.
43276   Use char because int might match the return type of a GCC
43277   builtin and then its argument prototype would still apply.  */
43278#ifdef __cplusplus
43279extern "C"
43280#endif
43281char dnet_ntoa ();
43282int
43283main ()
43284{
43285return dnet_ntoa ();
43286  ;
43287  return 0;
43288}
43289_ACEOF
43290if ac_fn_cxx_try_link "$LINENO"; then :
43291  ac_cv_lib_dnet_dnet_ntoa=yes
43292else
43293  ac_cv_lib_dnet_dnet_ntoa=no
43294fi
43295rm -f core conftest.err conftest.$ac_objext \
43296    conftest$ac_exeext conftest.$ac_ext
43297LIBS=$ac_check_lib_save_LIBS
43298fi
43299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43300$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43301if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43302  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43303fi
43304
43305    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43306      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43307$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43308if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43309  $as_echo_n "(cached) " >&6
43310else
43311  ac_check_lib_save_LIBS=$LIBS
43312LIBS="-ldnet_stub  $LIBS"
43313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43314/* end confdefs.h.  */
43315
43316/* Override any GCC internal prototype to avoid an error.
43317   Use char because int might match the return type of a GCC
43318   builtin and then its argument prototype would still apply.  */
43319#ifdef __cplusplus
43320extern "C"
43321#endif
43322char dnet_ntoa ();
43323int
43324main ()
43325{
43326return dnet_ntoa ();
43327  ;
43328  return 0;
43329}
43330_ACEOF
43331if ac_fn_cxx_try_link "$LINENO"; then :
43332  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43333else
43334  ac_cv_lib_dnet_stub_dnet_ntoa=no
43335fi
43336rm -f core conftest.err conftest.$ac_objext \
43337    conftest$ac_exeext conftest.$ac_ext
43338LIBS=$ac_check_lib_save_LIBS
43339fi
43340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43341$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43342if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43343  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43344fi
43345
43346    fi
43347fi
43348rm -f core conftest.err conftest.$ac_objext \
43349    conftest$ac_exeext conftest.$ac_ext
43350    LIBS="$ac_xsave_LIBS"
43351
43352    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43353    # to get the SysV transport functions.
43354    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43355    # needs -lnsl.
43356    # The nsl library prevents programs from opening the X display
43357    # on Irix 5.2, according to T.E. Dickey.
43358    # The functions gethostbyname, getservbyname, and inet_addr are
43359    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43360    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43361if test "x$ac_cv_func_gethostbyname" = xyes; then :
43362
43363fi
43364
43365    if test $ac_cv_func_gethostbyname = no; then
43366      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43367$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43368if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43369  $as_echo_n "(cached) " >&6
43370else
43371  ac_check_lib_save_LIBS=$LIBS
43372LIBS="-lnsl  $LIBS"
43373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43374/* end confdefs.h.  */
43375
43376/* Override any GCC internal prototype to avoid an error.
43377   Use char because int might match the return type of a GCC
43378   builtin and then its argument prototype would still apply.  */
43379#ifdef __cplusplus
43380extern "C"
43381#endif
43382char gethostbyname ();
43383int
43384main ()
43385{
43386return gethostbyname ();
43387  ;
43388  return 0;
43389}
43390_ACEOF
43391if ac_fn_cxx_try_link "$LINENO"; then :
43392  ac_cv_lib_nsl_gethostbyname=yes
43393else
43394  ac_cv_lib_nsl_gethostbyname=no
43395fi
43396rm -f core conftest.err conftest.$ac_objext \
43397    conftest$ac_exeext conftest.$ac_ext
43398LIBS=$ac_check_lib_save_LIBS
43399fi
43400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43401$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43402if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43403  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43404fi
43405
43406      if test $ac_cv_lib_nsl_gethostbyname = no; then
43407	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43408$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43409if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43410  $as_echo_n "(cached) " >&6
43411else
43412  ac_check_lib_save_LIBS=$LIBS
43413LIBS="-lbsd  $LIBS"
43414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43415/* end confdefs.h.  */
43416
43417/* Override any GCC internal prototype to avoid an error.
43418   Use char because int might match the return type of a GCC
43419   builtin and then its argument prototype would still apply.  */
43420#ifdef __cplusplus
43421extern "C"
43422#endif
43423char gethostbyname ();
43424int
43425main ()
43426{
43427return gethostbyname ();
43428  ;
43429  return 0;
43430}
43431_ACEOF
43432if ac_fn_cxx_try_link "$LINENO"; then :
43433  ac_cv_lib_bsd_gethostbyname=yes
43434else
43435  ac_cv_lib_bsd_gethostbyname=no
43436fi
43437rm -f core conftest.err conftest.$ac_objext \
43438    conftest$ac_exeext conftest.$ac_ext
43439LIBS=$ac_check_lib_save_LIBS
43440fi
43441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43442$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43443if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43444  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43445fi
43446
43447      fi
43448    fi
43449
43450    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43451    # socket/setsockopt and other routines are undefined under SCO ODT
43452    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43453    # on later versions), says Simon Leinen: it contains gethostby*
43454    # variants that don't use the name server (or something).  -lsocket
43455    # must be given before -lnsl if both are needed.  We assume that
43456    # if connect needs -lnsl, so does gethostbyname.
43457    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43458if test "x$ac_cv_func_connect" = xyes; then :
43459
43460fi
43461
43462    if test $ac_cv_func_connect = no; then
43463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43464$as_echo_n "checking for connect in -lsocket... " >&6; }
43465if ${ac_cv_lib_socket_connect+:} false; then :
43466  $as_echo_n "(cached) " >&6
43467else
43468  ac_check_lib_save_LIBS=$LIBS
43469LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43471/* end confdefs.h.  */
43472
43473/* Override any GCC internal prototype to avoid an error.
43474   Use char because int might match the return type of a GCC
43475   builtin and then its argument prototype would still apply.  */
43476#ifdef __cplusplus
43477extern "C"
43478#endif
43479char connect ();
43480int
43481main ()
43482{
43483return connect ();
43484  ;
43485  return 0;
43486}
43487_ACEOF
43488if ac_fn_cxx_try_link "$LINENO"; then :
43489  ac_cv_lib_socket_connect=yes
43490else
43491  ac_cv_lib_socket_connect=no
43492fi
43493rm -f core conftest.err conftest.$ac_objext \
43494    conftest$ac_exeext conftest.$ac_ext
43495LIBS=$ac_check_lib_save_LIBS
43496fi
43497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43498$as_echo "$ac_cv_lib_socket_connect" >&6; }
43499if test "x$ac_cv_lib_socket_connect" = xyes; then :
43500  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43501fi
43502
43503    fi
43504
43505    # Guillermo Gomez says -lposix is necessary on A/UX.
43506    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43507if test "x$ac_cv_func_remove" = xyes; then :
43508
43509fi
43510
43511    if test $ac_cv_func_remove = no; then
43512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43513$as_echo_n "checking for remove in -lposix... " >&6; }
43514if ${ac_cv_lib_posix_remove+:} false; then :
43515  $as_echo_n "(cached) " >&6
43516else
43517  ac_check_lib_save_LIBS=$LIBS
43518LIBS="-lposix  $LIBS"
43519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43520/* end confdefs.h.  */
43521
43522/* Override any GCC internal prototype to avoid an error.
43523   Use char because int might match the return type of a GCC
43524   builtin and then its argument prototype would still apply.  */
43525#ifdef __cplusplus
43526extern "C"
43527#endif
43528char remove ();
43529int
43530main ()
43531{
43532return remove ();
43533  ;
43534  return 0;
43535}
43536_ACEOF
43537if ac_fn_cxx_try_link "$LINENO"; then :
43538  ac_cv_lib_posix_remove=yes
43539else
43540  ac_cv_lib_posix_remove=no
43541fi
43542rm -f core conftest.err conftest.$ac_objext \
43543    conftest$ac_exeext conftest.$ac_ext
43544LIBS=$ac_check_lib_save_LIBS
43545fi
43546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43547$as_echo "$ac_cv_lib_posix_remove" >&6; }
43548if test "x$ac_cv_lib_posix_remove" = xyes; then :
43549  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43550fi
43551
43552    fi
43553
43554    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43555    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43556if test "x$ac_cv_func_shmat" = xyes; then :
43557
43558fi
43559
43560    if test $ac_cv_func_shmat = no; then
43561      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43562$as_echo_n "checking for shmat in -lipc... " >&6; }
43563if ${ac_cv_lib_ipc_shmat+:} false; then :
43564  $as_echo_n "(cached) " >&6
43565else
43566  ac_check_lib_save_LIBS=$LIBS
43567LIBS="-lipc  $LIBS"
43568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43569/* end confdefs.h.  */
43570
43571/* Override any GCC internal prototype to avoid an error.
43572   Use char because int might match the return type of a GCC
43573   builtin and then its argument prototype would still apply.  */
43574#ifdef __cplusplus
43575extern "C"
43576#endif
43577char shmat ();
43578int
43579main ()
43580{
43581return shmat ();
43582  ;
43583  return 0;
43584}
43585_ACEOF
43586if ac_fn_cxx_try_link "$LINENO"; then :
43587  ac_cv_lib_ipc_shmat=yes
43588else
43589  ac_cv_lib_ipc_shmat=no
43590fi
43591rm -f core conftest.err conftest.$ac_objext \
43592    conftest$ac_exeext conftest.$ac_ext
43593LIBS=$ac_check_lib_save_LIBS
43594fi
43595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43596$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43597if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43598  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43599fi
43600
43601    fi
43602  fi
43603
43604  # Check for libraries that X11R6 Xt/Xaw programs need.
43605  ac_save_LDFLAGS=$LDFLAGS
43606  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43607  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43608  # check for ICE first), but we must link in the order -lSM -lICE or
43609  # we get undefined symbols.  So assume we have SM if we have ICE.
43610  # These have to be linked with before -lX11, unlike the other
43611  # libraries we check for below, so use a different variable.
43612  # John Interrante, Karl Berry
43613  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43614$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43615if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43616  $as_echo_n "(cached) " >&6
43617else
43618  ac_check_lib_save_LIBS=$LIBS
43619LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43621/* end confdefs.h.  */
43622
43623/* Override any GCC internal prototype to avoid an error.
43624   Use char because int might match the return type of a GCC
43625   builtin and then its argument prototype would still apply.  */
43626#ifdef __cplusplus
43627extern "C"
43628#endif
43629char IceConnectionNumber ();
43630int
43631main ()
43632{
43633return IceConnectionNumber ();
43634  ;
43635  return 0;
43636}
43637_ACEOF
43638if ac_fn_cxx_try_link "$LINENO"; then :
43639  ac_cv_lib_ICE_IceConnectionNumber=yes
43640else
43641  ac_cv_lib_ICE_IceConnectionNumber=no
43642fi
43643rm -f core conftest.err conftest.$ac_objext \
43644    conftest$ac_exeext conftest.$ac_ext
43645LIBS=$ac_check_lib_save_LIBS
43646fi
43647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43648$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43649if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43650  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43651fi
43652
43653  LDFLAGS=$ac_save_LDFLAGS
43654
43655fi
43656
43657
43658    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43659    # this doesn't make sense so we remove it.
43660    if test "x$COMPILE_TYPE" = xcross; then
43661      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43662    fi
43663
43664    if test "x$no_x" = xyes; then
43665
43666  # Print a helpful message on how to acquire the necessary build dependency.
43667  # x11 is the help tag: freetype, cups, pulse, alsa etc
43668  MISSING_DEPENDENCY=x11
43669
43670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43671    cygwin_help $MISSING_DEPENDENCY
43672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43673    msys_help $MISSING_DEPENDENCY
43674  else
43675    PKGHANDLER_COMMAND=
43676
43677    case $PKGHANDLER in
43678      apt-get)
43679        apt_help     $MISSING_DEPENDENCY ;;
43680      yum)
43681        yum_help     $MISSING_DEPENDENCY ;;
43682      port)
43683        port_help    $MISSING_DEPENDENCY ;;
43684      pkgutil)
43685        pkgutil_help $MISSING_DEPENDENCY ;;
43686      pkgadd)
43687        pkgadd_help  $MISSING_DEPENDENCY ;;
43688    esac
43689
43690    if test "x$PKGHANDLER_COMMAND" != x; then
43691      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43692    fi
43693  fi
43694
43695      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43696    fi
43697
43698    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43699      OPENWIN_HOME="/usr/openwin"
43700      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43701      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43702          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43703          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43704          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43705    fi
43706
43707    ac_ext=c
43708ac_cpp='$CPP $CPPFLAGS'
43709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43711ac_compiler_gnu=$ac_cv_c_compiler_gnu
43712
43713    OLD_CFLAGS="$CFLAGS"
43714    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43715
43716    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43717    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43718do :
43719  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43720ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43721          # include <X11/Xlib.h>
43722          # include <X11/Xutil.h>
43723
43724
43725"
43726if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43727  cat >>confdefs.h <<_ACEOF
43728#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43729_ACEOF
43730 X11_HEADERS_OK=yes
43731else
43732  X11_HEADERS_OK=no; break
43733fi
43734
43735done
43736
43737
43738    if test "x$X11_HEADERS_OK" = xno; then
43739
43740  # Print a helpful message on how to acquire the necessary build dependency.
43741  # x11 is the help tag: freetype, cups, pulse, alsa etc
43742  MISSING_DEPENDENCY=x11
43743
43744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43745    cygwin_help $MISSING_DEPENDENCY
43746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43747    msys_help $MISSING_DEPENDENCY
43748  else
43749    PKGHANDLER_COMMAND=
43750
43751    case $PKGHANDLER in
43752      apt-get)
43753        apt_help     $MISSING_DEPENDENCY ;;
43754      yum)
43755        yum_help     $MISSING_DEPENDENCY ;;
43756      port)
43757        port_help    $MISSING_DEPENDENCY ;;
43758      pkgutil)
43759        pkgutil_help $MISSING_DEPENDENCY ;;
43760      pkgadd)
43761        pkgadd_help  $MISSING_DEPENDENCY ;;
43762    esac
43763
43764    if test "x$PKGHANDLER_COMMAND" != x; then
43765      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43766    fi
43767  fi
43768
43769      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43770    fi
43771
43772    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43773    # defined in libawt_xawt.
43774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43775$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43776    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43777/* end confdefs.h.  */
43778#include <X11/extensions/Xrender.h>
43779int
43780main ()
43781{
43782XLinearGradient x;
43783  ;
43784  return 0;
43785}
43786_ACEOF
43787if ac_fn_c_try_compile "$LINENO"; then :
43788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43789$as_echo "yes" >&6; }
43790else
43791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43792$as_echo "no" >&6; }
43793         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43794fi
43795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43796
43797    CFLAGS="$OLD_CFLAGS"
43798    ac_ext=cpp
43799ac_cpp='$CXXCPP $CPPFLAGS'
43800ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43801ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43802ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43803
43804  fi # X11_NOT_NEEDED
43805
43806
43807
43808
43809
43810
43811  ###############################################################################
43812  #
43813  # The common unix printing system cups is used to print from java.
43814  #
43815
43816# Check whether --with-cups was given.
43817if test "${with_cups+set}" = set; then :
43818  withval=$with_cups;
43819fi
43820
43821
43822# Check whether --with-cups-include was given.
43823if test "${with_cups_include+set}" = set; then :
43824  withval=$with_cups_include;
43825fi
43826
43827
43828  if test "x$CUPS_NOT_NEEDED" = xyes; then
43829    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43830      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43831$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43832    fi
43833    CUPS_CFLAGS=
43834  else
43835    CUPS_FOUND=no
43836
43837    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43838      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43839    fi
43840
43841    if test "x${with_cups}" != x; then
43842      CUPS_CFLAGS="-I${with_cups}/include"
43843      CUPS_FOUND=yes
43844    fi
43845    if test "x${with_cups_include}" != x; then
43846      CUPS_CFLAGS="-I${with_cups_include}"
43847      CUPS_FOUND=yes
43848    fi
43849    if test "x$CUPS_FOUND" = xno; then
43850
43851
43852  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43853    # Source the builddeps file again, to make sure it uses the latest variables!
43854    . $builddepsfile
43855    # Look for a target and build machine specific resource!
43856    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43857    if test "x$resource" = x; then
43858      # Ok, lets instead look for a target specific resource
43859      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43860    fi
43861    if test "x$resource" = x; then
43862      # Ok, lets instead look for a build specific resource
43863      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43864    fi
43865    if test "x$resource" = x; then
43866      # Ok, lets instead look for a generic resource
43867      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43868      resource=${builddep_cups}
43869    fi
43870    if test "x$resource" != x; then
43871      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43872$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43873      # If the resource in the builddeps.conf file is an existing directory,
43874      # for example /java/linux/cups
43875      if test -d ${resource}; then
43876        depdir=${resource}
43877      else
43878
43879  # cups is for example mymodule
43880  # $resource is for example libs/general/libmymod_1_2_3.zip
43881  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43882  # $with_builddeps_dir is for example /localhome/builddeps
43883  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43884  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43885  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43886  filename=`basename $resource`
43887  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43888  filebase=${filename%%.*}
43889  extension=${filename#*.}
43890  installdir=$with_builddeps_dir/$filebase
43891  if test ! -f $installdir/$filename.unpacked; then
43892    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43893$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43894    if test ! -d $installdir; then
43895      mkdir -p $installdir
43896    fi
43897    if test ! -d $installdir; then
43898      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43899    fi
43900    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43901    touch $tmpfile
43902    if test ! -f $tmpfile; then
43903      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43904    fi
43905
43906  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43907  # $tmpfile is the local file name for the downloaded file.
43908  VALID_TOOL=no
43909  if test "x$BDEPS_FTP" = xwget; then
43910    VALID_TOOL=yes
43911    wget -O $tmpfile $with_builddeps_server/$resource
43912  fi
43913  if test "x$BDEPS_FTP" = xlftp; then
43914    VALID_TOOL=yes
43915    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43916  fi
43917  if test "x$BDEPS_FTP" = xftp; then
43918    VALID_TOOL=yes
43919    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43920    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43921    FTPUSERPWD=${FTPSERVER%%@*}
43922    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43923      FTPUSER=${userpwd%%:*}
43924      FTPPWD=${userpwd#*@}
43925      FTPSERVER=${FTPSERVER#*@}
43926    else
43927      FTPUSER=ftp
43928      FTPPWD=ftp
43929    fi
43930    # the "pass" command does not work on some
43931    # ftp clients (read ftp.exe) but if it works,
43932    # passive mode is better!
43933    ( \
43934        echo "user $FTPUSER $FTPPWD"        ; \
43935        echo "pass"                         ; \
43936        echo "bin"                          ; \
43937        echo "get $FTPPATH $tmpfile"              ; \
43938    ) | ftp -in $FTPSERVER
43939  fi
43940  if test "x$VALID_TOOL" != xyes; then
43941    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43942  fi
43943
43944    mv $tmpfile $installdir/$filename
43945    if test ! -s $installdir/$filename; then
43946      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43947    fi
43948    case "$extension" in
43949      zip)  echo "Unzipping $installdir/$filename..."
43950        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43951        ;;
43952      tar.gz) echo "Untaring $installdir/$filename..."
43953        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43954        ;;
43955      tgz) echo "Untaring $installdir/$filename..."
43956        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43957        ;;
43958      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43959        ;;
43960    esac
43961  fi
43962  if test -f $installdir/$filename.unpacked; then
43963    depdir=$installdir
43964  fi
43965
43966      fi
43967      # Source the builddeps file again, because in the previous command, the depdir
43968      # was updated to point at the current build dependency install directory.
43969      . $builddepsfile
43970      # Now extract variables from the builddeps.conf files.
43971      theroot=${builddep_cups_ROOT}
43972      thecflags=${builddep_cups_CFLAGS}
43973      thelibs=${builddep_cups_LIBS}
43974      if test "x$depdir" = x; then
43975        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43976      fi
43977      CUPS=$depdir
43978      if test "x$theroot" != x; then
43979        CUPS="$theroot"
43980      fi
43981      if test "x$thecflags" != x; then
43982        CUPS_CFLAGS="$thecflags"
43983      fi
43984      if test "x$thelibs" != x; then
43985        CUPS_LIBS="$thelibs"
43986      fi
43987      CUPS_FOUND=yes
43988
43989    fi
43990
43991  fi
43992
43993    fi
43994    if test "x$CUPS_FOUND" = xno; then
43995      # Are the cups headers installed in the default /usr/include location?
43996      for ac_header in cups/cups.h cups/ppd.h
43997do :
43998  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43999ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44000if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44001  cat >>confdefs.h <<_ACEOF
44002#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44003_ACEOF
44004
44005            CUPS_FOUND=yes
44006            CUPS_CFLAGS=
44007            DEFAULT_CUPS=yes
44008
44009
44010fi
44011
44012done
44013
44014    fi
44015    if test "x$CUPS_FOUND" = xno; then
44016      # Getting nervous now? Lets poke around for standard Solaris third-party
44017      # package installation locations.
44018      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44019$as_echo_n "checking for cups headers... " >&6; }
44020      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44021        # An SFW package seems to be installed!
44022        CUPS_FOUND=yes
44023        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44024      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44025        # A CSW package seems to be installed!
44026        CUPS_FOUND=yes
44027        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44028      fi
44029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44030$as_echo "$CUPS_FOUND" >&6; }
44031    fi
44032    if test "x$CUPS_FOUND" = xno; then
44033
44034  # Print a helpful message on how to acquire the necessary build dependency.
44035  # cups is the help tag: freetype, cups, pulse, alsa etc
44036  MISSING_DEPENDENCY=cups
44037
44038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44039    cygwin_help $MISSING_DEPENDENCY
44040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44041    msys_help $MISSING_DEPENDENCY
44042  else
44043    PKGHANDLER_COMMAND=
44044
44045    case $PKGHANDLER in
44046      apt-get)
44047        apt_help     $MISSING_DEPENDENCY ;;
44048      yum)
44049        yum_help     $MISSING_DEPENDENCY ;;
44050      port)
44051        port_help    $MISSING_DEPENDENCY ;;
44052      pkgutil)
44053        pkgutil_help $MISSING_DEPENDENCY ;;
44054      pkgadd)
44055        pkgadd_help  $MISSING_DEPENDENCY ;;
44056    esac
44057
44058    if test "x$PKGHANDLER_COMMAND" != x; then
44059      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44060    fi
44061  fi
44062
44063      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44064    fi
44065  fi
44066
44067
44068
44069
44070
44071
44072  ###############################################################################
44073  #
44074  # The ubiquitous freetype library is used to render fonts.
44075  #
44076
44077# Check whether --with-freetype was given.
44078if test "${with_freetype+set}" = set; then :
44079  withval=$with_freetype;
44080fi
44081
44082
44083# Check whether --with-freetype-include was given.
44084if test "${with_freetype_include+set}" = set; then :
44085  withval=$with_freetype_include;
44086fi
44087
44088
44089# Check whether --with-freetype-lib was given.
44090if test "${with_freetype_lib+set}" = set; then :
44091  withval=$with_freetype_lib;
44092fi
44093
44094
44095# Check whether --with-freetype-src was given.
44096if test "${with_freetype_src+set}" = set; then :
44097  withval=$with_freetype_src;
44098fi
44099
44100  # Check whether --enable-freetype-bundling was given.
44101if test "${enable_freetype_bundling+set}" = set; then :
44102  enableval=$enable_freetype_bundling;
44103fi
44104
44105
44106  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44107  FREETYPE_BASE_NAME=freetype
44108  FREETYPE_CFLAGS=
44109  FREETYPE_LIBS=
44110  FREETYPE_BUNDLE_LIB_PATH=
44111
44112  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44113    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
44114      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44115$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44116    fi
44117    if test "x$enable_freetype_bundling" != x; then
44118      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44119$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44120    fi
44121  else
44122    # freetype is needed to build; go get it!
44123
44124    BUNDLE_FREETYPE="$enable_freetype_bundling"
44125
44126    if  test "x$with_freetype_src" != x; then
44127      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44128        # Try to build freetype if --with-freetype-src was given on Windows
44129
44130  FREETYPE_SRC_PATH="$with_freetype_src"
44131  BUILD_FREETYPE=yes
44132
44133  # Check if the freetype sources are acessible..
44134  if ! test -d $FREETYPE_SRC_PATH; then
44135    { $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
44136$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44137    BUILD_FREETYPE=no
44138  fi
44139  # ..and contain a vc2010 project file
44140  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44141  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44142    { $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
44143$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44144    BUILD_FREETYPE=no
44145  fi
44146  # Now check if configure found a version of 'msbuild.exe'
44147  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44148    { $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
44149$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;}
44150    BUILD_FREETYPE=no
44151  fi
44152
44153  # Ready to go..
44154  if test "x$BUILD_FREETYPE" = xyes; then
44155
44156    # msbuild requires trailing slashes for output directories
44157    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44158    freetype_lib_path_unix="$freetype_lib_path"
44159    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44160
44161  unix_path="$vcxproj_path"
44162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44163    windows_path=`$CYGPATH -m "$unix_path"`
44164    vcxproj_path="$windows_path"
44165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44166    windows_path=`cmd //c echo $unix_path`
44167    vcxproj_path="$windows_path"
44168  fi
44169
44170
44171  unix_path="$freetype_lib_path"
44172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44173    windows_path=`$CYGPATH -m "$unix_path"`
44174    freetype_lib_path="$windows_path"
44175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44176    windows_path=`cmd //c echo $unix_path`
44177    freetype_lib_path="$windows_path"
44178  fi
44179
44180
44181  unix_path="$freetype_obj_path"
44182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44183    windows_path=`$CYGPATH -m "$unix_path"`
44184    freetype_obj_path="$windows_path"
44185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44186    windows_path=`cmd //c echo $unix_path`
44187    freetype_obj_path="$windows_path"
44188  fi
44189
44190    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44191      freetype_platform=x64
44192    else
44193      freetype_platform=win32
44194    fi
44195
44196    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44197    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44198    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44199    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44200    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44201$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44202
44203    # First we try to build the freetype.dll
44204    $ECHO -e "@echo off\n"\
44205	     "$MSBUILD $vcxproj_path "\
44206		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44207		       "/p:Configuration=\"Release Multithreaded\" "\
44208		       "/p:Platform=$freetype_platform "\
44209		       "/p:ConfigurationType=DynamicLibrary "\
44210		       "/p:TargetName=freetype "\
44211		       "/p:OutDir=\"$freetype_lib_path\" "\
44212		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44213    cmd /c freetype.bat
44214
44215    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44216      # If that succeeds we also build freetype.lib
44217      $ECHO -e "@echo off\n"\
44218	       "$MSBUILD $vcxproj_path "\
44219			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44220			 "/p:Configuration=\"Release Multithreaded\" "\
44221			 "/p:Platform=$freetype_platform "\
44222			 "/p:ConfigurationType=StaticLibrary "\
44223			 "/p:TargetName=freetype "\
44224			 "/p:OutDir=\"$freetype_lib_path\" "\
44225			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44226      cmd /c freetype.bat
44227
44228      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44229	# Once we build both, lib and dll, set freetype lib and include path appropriately
44230	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44231	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44232	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44233$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44234      else
44235	BUILD_FREETYPE=no
44236      fi
44237    else
44238      BUILD_FREETYPE=no
44239    fi
44240  fi
44241
44242        if test "x$BUILD_FREETYPE" = xyes; then
44243          # Okay, we built it. Check that it works.
44244
44245  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44246  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44247  METHOD="--with-freetype-src"
44248
44249  # Let's start with an optimistic view of the world :-)
44250  FOUND_FREETYPE=yes
44251
44252  # First look for the canonical freetype main include file ft2build.h.
44253  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44254    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44255    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44256    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44257      # Fail.
44258      FOUND_FREETYPE=no
44259    fi
44260  fi
44261
44262  if test "x$FOUND_FREETYPE" = xyes; then
44263    # Include file found, let's continue the sanity check.
44264    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44265$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44266
44267    # Reset to default value
44268    FREETYPE_BASE_NAME=freetype
44269    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44270    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44271      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44272          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44273        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44274        # for the .6 version explicitly.
44275        FREETYPE_BASE_NAME=freetype.6
44276        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44277        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44278$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44279      else
44280        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44281$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44282        FOUND_FREETYPE=no
44283      fi
44284    else
44285      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44286        # On Windows, we will need both .lib and .dll file.
44287        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44288          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44289$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44290          FOUND_FREETYPE=no
44291        fi
44292      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44293          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44294        # Found lib in isa dir, use that instead.
44295        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44296        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44297$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44298      fi
44299    fi
44300  fi
44301
44302  if test "x$FOUND_FREETYPE" = xyes; then
44303
44304  # Only process if variable expands to non-empty
44305
44306  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44308
44309  # Input might be given as Windows format, start by converting to
44310  # unix format.
44311  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44312  new_path=`$CYGPATH -u "$path"`
44313
44314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44317  # "foo.exe" is OK but "foo" is an error.
44318  #
44319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44320  # It is also a way to make sure we got the proper file name for the real test later on.
44321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44322  if test "x$test_shortpath" = x; then
44323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44325    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44326  fi
44327
44328  # Call helper function which possibly converts this using DOS-style short mode.
44329  # If so, the updated path is stored in $new_path.
44330
44331  input_path="$new_path"
44332  # Check if we need to convert this using DOS-style short mode. If the path
44333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44334  # take no chances and rewrite it.
44335  # Note: m4 eats our [], so we need to use [ and ] instead.
44336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44337  if test "x$has_forbidden_chars" != x; then
44338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44342      # Going to short mode and back again did indeed matter. Since short mode is
44343      # case insensitive, let's make it lowercase to improve readability.
44344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44345      # Now convert it back to Unix-style (cygpath)
44346      input_path=`$CYGPATH -u "$shortmode_path"`
44347      new_path="$input_path"
44348    fi
44349  fi
44350
44351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44352  if test "x$test_cygdrive_prefix" = x; then
44353    # As a simple fix, exclude /usr/bin since it's not a real path.
44354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44356      # a path prefixed by /cygdrive for fixpath to work.
44357      new_path="$CYGWIN_ROOT_PATH$input_path"
44358    fi
44359  fi
44360
44361
44362  if test "x$path" != "x$new_path"; then
44363    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44365$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44366  fi
44367
44368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44369
44370  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44371  has_colon=`$ECHO $path | $GREP ^.:`
44372  new_path="$path"
44373  if test "x$has_colon" = x; then
44374    # Not in mixed or Windows style, start by that.
44375    new_path=`cmd //c echo $path`
44376  fi
44377
44378
44379  input_path="$new_path"
44380  # Check if we need to convert this using DOS-style short mode. If the path
44381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44382  # take no chances and rewrite it.
44383  # Note: m4 eats our [], so we need to use [ and ] instead.
44384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44385  if test "x$has_forbidden_chars" != x; then
44386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44388  fi
44389
44390
44391  windows_path="$new_path"
44392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44393    unix_path=`$CYGPATH -u "$windows_path"`
44394    new_path="$unix_path"
44395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44397    new_path="$unix_path"
44398  fi
44399
44400  if test "x$path" != "x$new_path"; then
44401    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44403$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44404  fi
44405
44406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44408
44409    else
44410      # We're on a unix platform. Hooray! :)
44411      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44412      has_space=`$ECHO "$path" | $GREP " "`
44413      if test "x$has_space" != x; then
44414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44415$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44417      fi
44418
44419      # Use eval to expand a potential ~
44420      eval path="$path"
44421      if test ! -f "$path" && test ! -d "$path"; then
44422        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44423      fi
44424
44425      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44426    fi
44427  fi
44428
44429
44430  # Only process if variable expands to non-empty
44431
44432  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44434
44435  # Input might be given as Windows format, start by converting to
44436  # unix format.
44437  path="$POTENTIAL_FREETYPE_LIB_PATH"
44438  new_path=`$CYGPATH -u "$path"`
44439
44440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44443  # "foo.exe" is OK but "foo" is an error.
44444  #
44445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44446  # It is also a way to make sure we got the proper file name for the real test later on.
44447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44448  if test "x$test_shortpath" = x; then
44449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44450$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44451    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44452  fi
44453
44454  # Call helper function which possibly converts this using DOS-style short mode.
44455  # If so, the updated path is stored in $new_path.
44456
44457  input_path="$new_path"
44458  # Check if we need to convert this using DOS-style short mode. If the path
44459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44460  # take no chances and rewrite it.
44461  # Note: m4 eats our [], so we need to use [ and ] instead.
44462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44463  if test "x$has_forbidden_chars" != x; then
44464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44468      # Going to short mode and back again did indeed matter. Since short mode is
44469      # case insensitive, let's make it lowercase to improve readability.
44470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44471      # Now convert it back to Unix-style (cygpath)
44472      input_path=`$CYGPATH -u "$shortmode_path"`
44473      new_path="$input_path"
44474    fi
44475  fi
44476
44477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44478  if test "x$test_cygdrive_prefix" = x; then
44479    # As a simple fix, exclude /usr/bin since it's not a real path.
44480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44482      # a path prefixed by /cygdrive for fixpath to work.
44483      new_path="$CYGWIN_ROOT_PATH$input_path"
44484    fi
44485  fi
44486
44487
44488  if test "x$path" != "x$new_path"; then
44489    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44491$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44492  fi
44493
44494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44495
44496  path="$POTENTIAL_FREETYPE_LIB_PATH"
44497  has_colon=`$ECHO $path | $GREP ^.:`
44498  new_path="$path"
44499  if test "x$has_colon" = x; then
44500    # Not in mixed or Windows style, start by that.
44501    new_path=`cmd //c echo $path`
44502  fi
44503
44504
44505  input_path="$new_path"
44506  # Check if we need to convert this using DOS-style short mode. If the path
44507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44508  # take no chances and rewrite it.
44509  # Note: m4 eats our [], so we need to use [ and ] instead.
44510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44511  if test "x$has_forbidden_chars" != x; then
44512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44514  fi
44515
44516
44517  windows_path="$new_path"
44518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44519    unix_path=`$CYGPATH -u "$windows_path"`
44520    new_path="$unix_path"
44521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44523    new_path="$unix_path"
44524  fi
44525
44526  if test "x$path" != "x$new_path"; then
44527    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44529$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44530  fi
44531
44532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44534
44535    else
44536      # We're on a unix platform. Hooray! :)
44537      path="$POTENTIAL_FREETYPE_LIB_PATH"
44538      has_space=`$ECHO "$path" | $GREP " "`
44539      if test "x$has_space" != x; then
44540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44542        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44543      fi
44544
44545      # Use eval to expand a potential ~
44546      eval path="$path"
44547      if test ! -f "$path" && test ! -d "$path"; then
44548        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44549      fi
44550
44551      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44552    fi
44553  fi
44554
44555
44556    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44558$as_echo_n "checking for freetype includes... " >&6; }
44559    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44560$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44561    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44563$as_echo_n "checking for freetype libraries... " >&6; }
44564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44565$as_echo "$FREETYPE_LIB_PATH" >&6; }
44566  fi
44567
44568          if test "x$FOUND_FREETYPE" != xyes; then
44569            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44570          fi
44571        else
44572          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44573$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44574          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44575        fi
44576      else
44577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44578$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44579      fi
44580    fi
44581
44582    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44583      # User has specified settings
44584
44585      if test "x$BUNDLE_FREETYPE" = x; then
44586        # If not specified, default is to bundle freetype
44587        BUNDLE_FREETYPE=yes
44588      fi
44589
44590      if test "x$with_freetype" != x; then
44591        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44592        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44593      fi
44594
44595      # Allow --with-freetype-lib and --with-freetype-include to override
44596      if test "x$with_freetype_include" != x; then
44597        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44598      fi
44599      if test "x$with_freetype_lib" != x; then
44600        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44601      fi
44602
44603      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44604        # Okay, we got it. Check that it works.
44605
44606  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44607  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44608  METHOD="--with-freetype"
44609
44610  # Let's start with an optimistic view of the world :-)
44611  FOUND_FREETYPE=yes
44612
44613  # First look for the canonical freetype main include file ft2build.h.
44614  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44615    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44616    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44617    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44618      # Fail.
44619      FOUND_FREETYPE=no
44620    fi
44621  fi
44622
44623  if test "x$FOUND_FREETYPE" = xyes; then
44624    # Include file found, let's continue the sanity check.
44625    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44626$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44627
44628    # Reset to default value
44629    FREETYPE_BASE_NAME=freetype
44630    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44631    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44632      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44633          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44634        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44635        # for the .6 version explicitly.
44636        FREETYPE_BASE_NAME=freetype.6
44637        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44638        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44639$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44640      else
44641        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44642$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44643        FOUND_FREETYPE=no
44644      fi
44645    else
44646      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44647        # On Windows, we will need both .lib and .dll file.
44648        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44649          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44650$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44651          FOUND_FREETYPE=no
44652        fi
44653      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44654          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44655        # Found lib in isa dir, use that instead.
44656        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44657        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44658$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44659      fi
44660    fi
44661  fi
44662
44663  if test "x$FOUND_FREETYPE" = xyes; then
44664
44665  # Only process if variable expands to non-empty
44666
44667  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44669
44670  # Input might be given as Windows format, start by converting to
44671  # unix format.
44672  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44673  new_path=`$CYGPATH -u "$path"`
44674
44675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44678  # "foo.exe" is OK but "foo" is an error.
44679  #
44680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44681  # It is also a way to make sure we got the proper file name for the real test later on.
44682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44683  if test "x$test_shortpath" = x; then
44684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44685$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44686    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44687  fi
44688
44689  # Call helper function which possibly converts this using DOS-style short mode.
44690  # If so, the updated path is stored in $new_path.
44691
44692  input_path="$new_path"
44693  # Check if we need to convert this using DOS-style short mode. If the path
44694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44695  # take no chances and rewrite it.
44696  # Note: m4 eats our [], so we need to use [ and ] instead.
44697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44698  if test "x$has_forbidden_chars" != x; then
44699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44703      # Going to short mode and back again did indeed matter. Since short mode is
44704      # case insensitive, let's make it lowercase to improve readability.
44705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44706      # Now convert it back to Unix-style (cygpath)
44707      input_path=`$CYGPATH -u "$shortmode_path"`
44708      new_path="$input_path"
44709    fi
44710  fi
44711
44712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44713  if test "x$test_cygdrive_prefix" = x; then
44714    # As a simple fix, exclude /usr/bin since it's not a real path.
44715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44717      # a path prefixed by /cygdrive for fixpath to work.
44718      new_path="$CYGWIN_ROOT_PATH$input_path"
44719    fi
44720  fi
44721
44722
44723  if test "x$path" != "x$new_path"; then
44724    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44726$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44727  fi
44728
44729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44730
44731  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44732  has_colon=`$ECHO $path | $GREP ^.:`
44733  new_path="$path"
44734  if test "x$has_colon" = x; then
44735    # Not in mixed or Windows style, start by that.
44736    new_path=`cmd //c echo $path`
44737  fi
44738
44739
44740  input_path="$new_path"
44741  # Check if we need to convert this using DOS-style short mode. If the path
44742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44743  # take no chances and rewrite it.
44744  # Note: m4 eats our [], so we need to use [ and ] instead.
44745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44746  if test "x$has_forbidden_chars" != x; then
44747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44749  fi
44750
44751
44752  windows_path="$new_path"
44753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44754    unix_path=`$CYGPATH -u "$windows_path"`
44755    new_path="$unix_path"
44756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44758    new_path="$unix_path"
44759  fi
44760
44761  if test "x$path" != "x$new_path"; then
44762    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44764$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44765  fi
44766
44767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44769
44770    else
44771      # We're on a unix platform. Hooray! :)
44772      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44773      has_space=`$ECHO "$path" | $GREP " "`
44774      if test "x$has_space" != x; then
44775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44776$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44777        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44778      fi
44779
44780      # Use eval to expand a potential ~
44781      eval path="$path"
44782      if test ! -f "$path" && test ! -d "$path"; then
44783        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44784      fi
44785
44786      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44787    fi
44788  fi
44789
44790
44791  # Only process if variable expands to non-empty
44792
44793  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44795
44796  # Input might be given as Windows format, start by converting to
44797  # unix format.
44798  path="$POTENTIAL_FREETYPE_LIB_PATH"
44799  new_path=`$CYGPATH -u "$path"`
44800
44801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44804  # "foo.exe" is OK but "foo" is an error.
44805  #
44806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44807  # It is also a way to make sure we got the proper file name for the real test later on.
44808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44809  if test "x$test_shortpath" = x; then
44810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44812    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44813  fi
44814
44815  # Call helper function which possibly converts this using DOS-style short mode.
44816  # If so, the updated path is stored in $new_path.
44817
44818  input_path="$new_path"
44819  # Check if we need to convert this using DOS-style short mode. If the path
44820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44821  # take no chances and rewrite it.
44822  # Note: m4 eats our [], so we need to use [ and ] instead.
44823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44824  if test "x$has_forbidden_chars" != x; then
44825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44829      # Going to short mode and back again did indeed matter. Since short mode is
44830      # case insensitive, let's make it lowercase to improve readability.
44831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44832      # Now convert it back to Unix-style (cygpath)
44833      input_path=`$CYGPATH -u "$shortmode_path"`
44834      new_path="$input_path"
44835    fi
44836  fi
44837
44838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44839  if test "x$test_cygdrive_prefix" = x; then
44840    # As a simple fix, exclude /usr/bin since it's not a real path.
44841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44843      # a path prefixed by /cygdrive for fixpath to work.
44844      new_path="$CYGWIN_ROOT_PATH$input_path"
44845    fi
44846  fi
44847
44848
44849  if test "x$path" != "x$new_path"; then
44850    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44852$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44853  fi
44854
44855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44856
44857  path="$POTENTIAL_FREETYPE_LIB_PATH"
44858  has_colon=`$ECHO $path | $GREP ^.:`
44859  new_path="$path"
44860  if test "x$has_colon" = x; then
44861    # Not in mixed or Windows style, start by that.
44862    new_path=`cmd //c echo $path`
44863  fi
44864
44865
44866  input_path="$new_path"
44867  # Check if we need to convert this using DOS-style short mode. If the path
44868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44869  # take no chances and rewrite it.
44870  # Note: m4 eats our [], so we need to use [ and ] instead.
44871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44872  if test "x$has_forbidden_chars" != x; then
44873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44875  fi
44876
44877
44878  windows_path="$new_path"
44879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44880    unix_path=`$CYGPATH -u "$windows_path"`
44881    new_path="$unix_path"
44882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44884    new_path="$unix_path"
44885  fi
44886
44887  if test "x$path" != "x$new_path"; then
44888    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44891  fi
44892
44893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44895
44896    else
44897      # We're on a unix platform. Hooray! :)
44898      path="$POTENTIAL_FREETYPE_LIB_PATH"
44899      has_space=`$ECHO "$path" | $GREP " "`
44900      if test "x$has_space" != x; then
44901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44904      fi
44905
44906      # Use eval to expand a potential ~
44907      eval path="$path"
44908      if test ! -f "$path" && test ! -d "$path"; then
44909        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44910      fi
44911
44912      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44913    fi
44914  fi
44915
44916
44917    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44919$as_echo_n "checking for freetype includes... " >&6; }
44920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44921$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44922    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44924$as_echo_n "checking for freetype libraries... " >&6; }
44925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44926$as_echo "$FREETYPE_LIB_PATH" >&6; }
44927  fi
44928
44929        if test "x$FOUND_FREETYPE" != xyes; then
44930          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44931        fi
44932      else
44933        # User specified only one of lib or include. This is an error.
44934        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44935          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44936$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44937          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44938        else
44939          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44940$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44941          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44942        fi
44943      fi
44944    else
44945      # User did not specify settings, but we need freetype. Try to locate it.
44946
44947      if test "x$BUNDLE_FREETYPE" = x; then
44948        # If not specified, default is to bundle freetype only on windows
44949        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44950          BUNDLE_FREETYPE=yes
44951        else
44952          BUNDLE_FREETYPE=no
44953        fi
44954      fi
44955
44956      if test "x$FOUND_FREETYPE" != xyes; then
44957        # Check builddeps
44958
44959
44960  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44961    # Source the builddeps file again, to make sure it uses the latest variables!
44962    . $builddepsfile
44963    # Look for a target and build machine specific resource!
44964    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44965    if test "x$resource" = x; then
44966      # Ok, lets instead look for a target specific resource
44967      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44968    fi
44969    if test "x$resource" = x; then
44970      # Ok, lets instead look for a build specific resource
44971      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44972    fi
44973    if test "x$resource" = x; then
44974      # Ok, lets instead look for a generic resource
44975      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44976      resource=${builddep_freetype2}
44977    fi
44978    if test "x$resource" != x; then
44979      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44980$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44981      # If the resource in the builddeps.conf file is an existing directory,
44982      # for example /java/linux/cups
44983      if test -d ${resource}; then
44984        depdir=${resource}
44985      else
44986
44987  # freetype2 is for example mymodule
44988  # $resource is for example libs/general/libmymod_1_2_3.zip
44989  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44990  # $with_builddeps_dir is for example /localhome/builddeps
44991  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44992  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44993  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44994  filename=`basename $resource`
44995  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44996  filebase=${filename%%.*}
44997  extension=${filename#*.}
44998  installdir=$with_builddeps_dir/$filebase
44999  if test ! -f $installdir/$filename.unpacked; then
45000    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45001$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45002    if test ! -d $installdir; then
45003      mkdir -p $installdir
45004    fi
45005    if test ! -d $installdir; then
45006      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45007    fi
45008    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45009    touch $tmpfile
45010    if test ! -f $tmpfile; then
45011      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45012    fi
45013
45014  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45015  # $tmpfile is the local file name for the downloaded file.
45016  VALID_TOOL=no
45017  if test "x$BDEPS_FTP" = xwget; then
45018    VALID_TOOL=yes
45019    wget -O $tmpfile $with_builddeps_server/$resource
45020  fi
45021  if test "x$BDEPS_FTP" = xlftp; then
45022    VALID_TOOL=yes
45023    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45024  fi
45025  if test "x$BDEPS_FTP" = xftp; then
45026    VALID_TOOL=yes
45027    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45028    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45029    FTPUSERPWD=${FTPSERVER%%@*}
45030    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45031      FTPUSER=${userpwd%%:*}
45032      FTPPWD=${userpwd#*@}
45033      FTPSERVER=${FTPSERVER#*@}
45034    else
45035      FTPUSER=ftp
45036      FTPPWD=ftp
45037    fi
45038    # the "pass" command does not work on some
45039    # ftp clients (read ftp.exe) but if it works,
45040    # passive mode is better!
45041    ( \
45042        echo "user $FTPUSER $FTPPWD"        ; \
45043        echo "pass"                         ; \
45044        echo "bin"                          ; \
45045        echo "get $FTPPATH $tmpfile"              ; \
45046    ) | ftp -in $FTPSERVER
45047  fi
45048  if test "x$VALID_TOOL" != xyes; then
45049    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45050  fi
45051
45052    mv $tmpfile $installdir/$filename
45053    if test ! -s $installdir/$filename; then
45054      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45055    fi
45056    case "$extension" in
45057      zip)  echo "Unzipping $installdir/$filename..."
45058        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45059        ;;
45060      tar.gz) echo "Untaring $installdir/$filename..."
45061        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45062        ;;
45063      tgz) echo "Untaring $installdir/$filename..."
45064        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45065        ;;
45066      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45067        ;;
45068    esac
45069  fi
45070  if test -f $installdir/$filename.unpacked; then
45071    depdir=$installdir
45072  fi
45073
45074      fi
45075      # Source the builddeps file again, because in the previous command, the depdir
45076      # was updated to point at the current build dependency install directory.
45077      . $builddepsfile
45078      # Now extract variables from the builddeps.conf files.
45079      theroot=${builddep_freetype2_ROOT}
45080      thecflags=${builddep_freetype2_CFLAGS}
45081      thelibs=${builddep_freetype2_LIBS}
45082      if test "x$depdir" = x; then
45083        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45084      fi
45085      FREETYPE=$depdir
45086      if test "x$theroot" != x; then
45087        FREETYPE="$theroot"
45088      fi
45089      if test "x$thecflags" != x; then
45090        FREETYPE_CFLAGS="$thecflags"
45091      fi
45092      if test "x$thelibs" != x; then
45093        FREETYPE_LIBS="$thelibs"
45094      fi
45095      FOUND_FREETYPE=yes
45096      else FOUND_FREETYPE=no
45097
45098    fi
45099    else FOUND_FREETYPE=no
45100
45101  fi
45102
45103        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45104        if test "x$FOUND_FREETYPE" = xyes; then
45105          if test "x$BUNDLE_FREETYPE" = xyes; then
45106            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45107$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45108            FOUND_FREETYPE=no
45109          else
45110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45111$as_echo_n "checking for freetype... " >&6; }
45112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45113$as_echo "yes (using builddeps)" >&6; }
45114          fi
45115        fi
45116      fi
45117
45118      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45119      if test "x$SYSROOT" = x; then
45120        if test "x$FOUND_FREETYPE" != xyes; then
45121          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45122          if test "x$PKG_CONFIG" != x; then
45123
45124pkg_failed=no
45125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45126$as_echo_n "checking for FREETYPE... " >&6; }
45127
45128if test -n "$FREETYPE_CFLAGS"; then
45129    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45130 elif test -n "$PKG_CONFIG"; then
45131    if test -n "$PKG_CONFIG" && \
45132    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45133  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45134  ac_status=$?
45135  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45136  test $ac_status = 0; }; then
45137  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45138else
45139  pkg_failed=yes
45140fi
45141 else
45142    pkg_failed=untried
45143fi
45144if test -n "$FREETYPE_LIBS"; then
45145    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45146 elif test -n "$PKG_CONFIG"; then
45147    if test -n "$PKG_CONFIG" && \
45148    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45149  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45150  ac_status=$?
45151  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45152  test $ac_status = 0; }; then
45153  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45154else
45155  pkg_failed=yes
45156fi
45157 else
45158    pkg_failed=untried
45159fi
45160
45161
45162
45163if test $pkg_failed = yes; then
45164
45165if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45166        _pkg_short_errors_supported=yes
45167else
45168        _pkg_short_errors_supported=no
45169fi
45170        if test $_pkg_short_errors_supported = yes; then
45171	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45172        else
45173	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45174        fi
45175	# Put the nasty error message in config.log where it belongs
45176	echo "$FREETYPE_PKG_ERRORS" >&5
45177
45178	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45179$as_echo "no" >&6; }
45180                FOUND_FREETYPE=no
45181elif test $pkg_failed = untried; then
45182	FOUND_FREETYPE=no
45183else
45184	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45185	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45187$as_echo "yes" >&6; }
45188	FOUND_FREETYPE=yes
45189fi
45190            if test "x$FOUND_FREETYPE" = xyes; then
45191              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45192              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45193              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45194              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45195                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45196              fi
45197              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45198              if test "x$BUNDLE_FREETYPE" = xyes; then
45199                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45200$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45201                FOUND_FREETYPE=no
45202              else
45203                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45204$as_echo_n "checking for freetype... " >&6; }
45205                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45206$as_echo "yes (using pkg-config)" >&6; }
45207              fi
45208            fi
45209          fi
45210        fi
45211      fi
45212
45213      if test "x$FOUND_FREETYPE" != xyes; then
45214        # Check in well-known locations
45215        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45216          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45217
45218  windows_path="$FREETYPE_BASE_DIR"
45219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45220    unix_path=`$CYGPATH -u "$windows_path"`
45221    FREETYPE_BASE_DIR="$unix_path"
45222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45224    FREETYPE_BASE_DIR="$unix_path"
45225  fi
45226
45227
45228  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45229  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45230  METHOD="well-known location"
45231
45232  # Let's start with an optimistic view of the world :-)
45233  FOUND_FREETYPE=yes
45234
45235  # First look for the canonical freetype main include file ft2build.h.
45236  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45237    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45238    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45239    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45240      # Fail.
45241      FOUND_FREETYPE=no
45242    fi
45243  fi
45244
45245  if test "x$FOUND_FREETYPE" = xyes; then
45246    # Include file found, let's continue the sanity check.
45247    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45248$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45249
45250    # Reset to default value
45251    FREETYPE_BASE_NAME=freetype
45252    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45253    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45254      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45255          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45256        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45257        # for the .6 version explicitly.
45258        FREETYPE_BASE_NAME=freetype.6
45259        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45260        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45261$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45262      else
45263        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45264$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45265        FOUND_FREETYPE=no
45266      fi
45267    else
45268      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45269        # On Windows, we will need both .lib and .dll file.
45270        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45271          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45272$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45273          FOUND_FREETYPE=no
45274        fi
45275      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45276          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45277        # Found lib in isa dir, use that instead.
45278        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45279        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45280$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45281      fi
45282    fi
45283  fi
45284
45285  if test "x$FOUND_FREETYPE" = xyes; then
45286
45287  # Only process if variable expands to non-empty
45288
45289  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45291
45292  # Input might be given as Windows format, start by converting to
45293  # unix format.
45294  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45295  new_path=`$CYGPATH -u "$path"`
45296
45297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45300  # "foo.exe" is OK but "foo" is an error.
45301  #
45302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45303  # It is also a way to make sure we got the proper file name for the real test later on.
45304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45305  if test "x$test_shortpath" = x; then
45306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45307$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45308    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45309  fi
45310
45311  # Call helper function which possibly converts this using DOS-style short mode.
45312  # If so, the updated path is stored in $new_path.
45313
45314  input_path="$new_path"
45315  # Check if we need to convert this using DOS-style short mode. If the path
45316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45317  # take no chances and rewrite it.
45318  # Note: m4 eats our [], so we need to use [ and ] instead.
45319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45320  if test "x$has_forbidden_chars" != x; then
45321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45325      # Going to short mode and back again did indeed matter. Since short mode is
45326      # case insensitive, let's make it lowercase to improve readability.
45327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45328      # Now convert it back to Unix-style (cygpath)
45329      input_path=`$CYGPATH -u "$shortmode_path"`
45330      new_path="$input_path"
45331    fi
45332  fi
45333
45334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45335  if test "x$test_cygdrive_prefix" = x; then
45336    # As a simple fix, exclude /usr/bin since it's not a real path.
45337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45339      # a path prefixed by /cygdrive for fixpath to work.
45340      new_path="$CYGWIN_ROOT_PATH$input_path"
45341    fi
45342  fi
45343
45344
45345  if test "x$path" != "x$new_path"; then
45346    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45348$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45349  fi
45350
45351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45352
45353  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45354  has_colon=`$ECHO $path | $GREP ^.:`
45355  new_path="$path"
45356  if test "x$has_colon" = x; then
45357    # Not in mixed or Windows style, start by that.
45358    new_path=`cmd //c echo $path`
45359  fi
45360
45361
45362  input_path="$new_path"
45363  # Check if we need to convert this using DOS-style short mode. If the path
45364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45365  # take no chances and rewrite it.
45366  # Note: m4 eats our [], so we need to use [ and ] instead.
45367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45368  if test "x$has_forbidden_chars" != x; then
45369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45371  fi
45372
45373
45374  windows_path="$new_path"
45375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45376    unix_path=`$CYGPATH -u "$windows_path"`
45377    new_path="$unix_path"
45378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45380    new_path="$unix_path"
45381  fi
45382
45383  if test "x$path" != "x$new_path"; then
45384    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45387  fi
45388
45389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45391
45392    else
45393      # We're on a unix platform. Hooray! :)
45394      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45395      has_space=`$ECHO "$path" | $GREP " "`
45396      if test "x$has_space" != x; then
45397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45398$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45400      fi
45401
45402      # Use eval to expand a potential ~
45403      eval path="$path"
45404      if test ! -f "$path" && test ! -d "$path"; then
45405        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45406      fi
45407
45408      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45409    fi
45410  fi
45411
45412
45413  # Only process if variable expands to non-empty
45414
45415  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45417
45418  # Input might be given as Windows format, start by converting to
45419  # unix format.
45420  path="$POTENTIAL_FREETYPE_LIB_PATH"
45421  new_path=`$CYGPATH -u "$path"`
45422
45423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45426  # "foo.exe" is OK but "foo" is an error.
45427  #
45428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45429  # It is also a way to make sure we got the proper file name for the real test later on.
45430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45431  if test "x$test_shortpath" = x; then
45432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45433$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45434    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45435  fi
45436
45437  # Call helper function which possibly converts this using DOS-style short mode.
45438  # If so, the updated path is stored in $new_path.
45439
45440  input_path="$new_path"
45441  # Check if we need to convert this using DOS-style short mode. If the path
45442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45443  # take no chances and rewrite it.
45444  # Note: m4 eats our [], so we need to use [ and ] instead.
45445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45446  if test "x$has_forbidden_chars" != x; then
45447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45451      # Going to short mode and back again did indeed matter. Since short mode is
45452      # case insensitive, let's make it lowercase to improve readability.
45453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45454      # Now convert it back to Unix-style (cygpath)
45455      input_path=`$CYGPATH -u "$shortmode_path"`
45456      new_path="$input_path"
45457    fi
45458  fi
45459
45460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45461  if test "x$test_cygdrive_prefix" = x; then
45462    # As a simple fix, exclude /usr/bin since it's not a real path.
45463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45465      # a path prefixed by /cygdrive for fixpath to work.
45466      new_path="$CYGWIN_ROOT_PATH$input_path"
45467    fi
45468  fi
45469
45470
45471  if test "x$path" != "x$new_path"; then
45472    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45475  fi
45476
45477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45478
45479  path="$POTENTIAL_FREETYPE_LIB_PATH"
45480  has_colon=`$ECHO $path | $GREP ^.:`
45481  new_path="$path"
45482  if test "x$has_colon" = x; then
45483    # Not in mixed or Windows style, start by that.
45484    new_path=`cmd //c echo $path`
45485  fi
45486
45487
45488  input_path="$new_path"
45489  # Check if we need to convert this using DOS-style short mode. If the path
45490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45491  # take no chances and rewrite it.
45492  # Note: m4 eats our [], so we need to use [ and ] instead.
45493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45494  if test "x$has_forbidden_chars" != x; then
45495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45497  fi
45498
45499
45500  windows_path="$new_path"
45501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45502    unix_path=`$CYGPATH -u "$windows_path"`
45503    new_path="$unix_path"
45504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45506    new_path="$unix_path"
45507  fi
45508
45509  if test "x$path" != "x$new_path"; then
45510    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45513  fi
45514
45515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45517
45518    else
45519      # We're on a unix platform. Hooray! :)
45520      path="$POTENTIAL_FREETYPE_LIB_PATH"
45521      has_space=`$ECHO "$path" | $GREP " "`
45522      if test "x$has_space" != x; then
45523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45526      fi
45527
45528      # Use eval to expand a potential ~
45529      eval path="$path"
45530      if test ! -f "$path" && test ! -d "$path"; then
45531        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45532      fi
45533
45534      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45535    fi
45536  fi
45537
45538
45539    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45541$as_echo_n "checking for freetype includes... " >&6; }
45542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45543$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45544    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45546$as_echo_n "checking for freetype libraries... " >&6; }
45547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45548$as_echo "$FREETYPE_LIB_PATH" >&6; }
45549  fi
45550
45551          if test "x$FOUND_FREETYPE" != xyes; then
45552            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45553
45554  windows_path="$FREETYPE_BASE_DIR"
45555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45556    unix_path=`$CYGPATH -u "$windows_path"`
45557    FREETYPE_BASE_DIR="$unix_path"
45558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45560    FREETYPE_BASE_DIR="$unix_path"
45561  fi
45562
45563
45564  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45565  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45566  METHOD="well-known location"
45567
45568  # Let's start with an optimistic view of the world :-)
45569  FOUND_FREETYPE=yes
45570
45571  # First look for the canonical freetype main include file ft2build.h.
45572  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45573    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45574    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45575    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45576      # Fail.
45577      FOUND_FREETYPE=no
45578    fi
45579  fi
45580
45581  if test "x$FOUND_FREETYPE" = xyes; then
45582    # Include file found, let's continue the sanity check.
45583    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45584$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45585
45586    # Reset to default value
45587    FREETYPE_BASE_NAME=freetype
45588    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45589    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45590      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45591          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45592        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45593        # for the .6 version explicitly.
45594        FREETYPE_BASE_NAME=freetype.6
45595        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45596        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45597$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45598      else
45599        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45600$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45601        FOUND_FREETYPE=no
45602      fi
45603    else
45604      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45605        # On Windows, we will need both .lib and .dll file.
45606        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45607          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45608$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45609          FOUND_FREETYPE=no
45610        fi
45611      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45612          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45613        # Found lib in isa dir, use that instead.
45614        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45615        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45616$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45617      fi
45618    fi
45619  fi
45620
45621  if test "x$FOUND_FREETYPE" = xyes; then
45622
45623  # Only process if variable expands to non-empty
45624
45625  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45627
45628  # Input might be given as Windows format, start by converting to
45629  # unix format.
45630  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45631  new_path=`$CYGPATH -u "$path"`
45632
45633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45636  # "foo.exe" is OK but "foo" is an error.
45637  #
45638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45639  # It is also a way to make sure we got the proper file name for the real test later on.
45640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45641  if test "x$test_shortpath" = x; then
45642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45645  fi
45646
45647  # Call helper function which possibly converts this using DOS-style short mode.
45648  # If so, the updated path is stored in $new_path.
45649
45650  input_path="$new_path"
45651  # Check if we need to convert this using DOS-style short mode. If the path
45652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45653  # take no chances and rewrite it.
45654  # Note: m4 eats our [], so we need to use [ and ] instead.
45655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45656  if test "x$has_forbidden_chars" != x; then
45657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45661      # Going to short mode and back again did indeed matter. Since short mode is
45662      # case insensitive, let's make it lowercase to improve readability.
45663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45664      # Now convert it back to Unix-style (cygpath)
45665      input_path=`$CYGPATH -u "$shortmode_path"`
45666      new_path="$input_path"
45667    fi
45668  fi
45669
45670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45671  if test "x$test_cygdrive_prefix" = x; then
45672    # As a simple fix, exclude /usr/bin since it's not a real path.
45673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45675      # a path prefixed by /cygdrive for fixpath to work.
45676      new_path="$CYGWIN_ROOT_PATH$input_path"
45677    fi
45678  fi
45679
45680
45681  if test "x$path" != "x$new_path"; then
45682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45685  fi
45686
45687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45688
45689  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45690  has_colon=`$ECHO $path | $GREP ^.:`
45691  new_path="$path"
45692  if test "x$has_colon" = x; then
45693    # Not in mixed or Windows style, start by that.
45694    new_path=`cmd //c echo $path`
45695  fi
45696
45697
45698  input_path="$new_path"
45699  # Check if we need to convert this using DOS-style short mode. If the path
45700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45701  # take no chances and rewrite it.
45702  # Note: m4 eats our [], so we need to use [ and ] instead.
45703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45704  if test "x$has_forbidden_chars" != x; then
45705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45707  fi
45708
45709
45710  windows_path="$new_path"
45711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45712    unix_path=`$CYGPATH -u "$windows_path"`
45713    new_path="$unix_path"
45714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45716    new_path="$unix_path"
45717  fi
45718
45719  if test "x$path" != "x$new_path"; then
45720    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45723  fi
45724
45725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45727
45728    else
45729      # We're on a unix platform. Hooray! :)
45730      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45731      has_space=`$ECHO "$path" | $GREP " "`
45732      if test "x$has_space" != x; then
45733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45736      fi
45737
45738      # Use eval to expand a potential ~
45739      eval path="$path"
45740      if test ! -f "$path" && test ! -d "$path"; then
45741        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45742      fi
45743
45744      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45745    fi
45746  fi
45747
45748
45749  # Only process if variable expands to non-empty
45750
45751  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45753
45754  # Input might be given as Windows format, start by converting to
45755  # unix format.
45756  path="$POTENTIAL_FREETYPE_LIB_PATH"
45757  new_path=`$CYGPATH -u "$path"`
45758
45759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45762  # "foo.exe" is OK but "foo" is an error.
45763  #
45764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45765  # It is also a way to make sure we got the proper file name for the real test later on.
45766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45767  if test "x$test_shortpath" = x; then
45768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45770    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45771  fi
45772
45773  # Call helper function which possibly converts this using DOS-style short mode.
45774  # If so, the updated path is stored in $new_path.
45775
45776  input_path="$new_path"
45777  # Check if we need to convert this using DOS-style short mode. If the path
45778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45779  # take no chances and rewrite it.
45780  # Note: m4 eats our [], so we need to use [ and ] instead.
45781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45782  if test "x$has_forbidden_chars" != x; then
45783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45787      # Going to short mode and back again did indeed matter. Since short mode is
45788      # case insensitive, let's make it lowercase to improve readability.
45789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45790      # Now convert it back to Unix-style (cygpath)
45791      input_path=`$CYGPATH -u "$shortmode_path"`
45792      new_path="$input_path"
45793    fi
45794  fi
45795
45796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45797  if test "x$test_cygdrive_prefix" = x; then
45798    # As a simple fix, exclude /usr/bin since it's not a real path.
45799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45801      # a path prefixed by /cygdrive for fixpath to work.
45802      new_path="$CYGWIN_ROOT_PATH$input_path"
45803    fi
45804  fi
45805
45806
45807  if test "x$path" != "x$new_path"; then
45808    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45810$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45811  fi
45812
45813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45814
45815  path="$POTENTIAL_FREETYPE_LIB_PATH"
45816  has_colon=`$ECHO $path | $GREP ^.:`
45817  new_path="$path"
45818  if test "x$has_colon" = x; then
45819    # Not in mixed or Windows style, start by that.
45820    new_path=`cmd //c echo $path`
45821  fi
45822
45823
45824  input_path="$new_path"
45825  # Check if we need to convert this using DOS-style short mode. If the path
45826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45827  # take no chances and rewrite it.
45828  # Note: m4 eats our [], so we need to use [ and ] instead.
45829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45830  if test "x$has_forbidden_chars" != x; then
45831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45833  fi
45834
45835
45836  windows_path="$new_path"
45837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45838    unix_path=`$CYGPATH -u "$windows_path"`
45839    new_path="$unix_path"
45840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45842    new_path="$unix_path"
45843  fi
45844
45845  if test "x$path" != "x$new_path"; then
45846    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45849  fi
45850
45851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45853
45854    else
45855      # We're on a unix platform. Hooray! :)
45856      path="$POTENTIAL_FREETYPE_LIB_PATH"
45857      has_space=`$ECHO "$path" | $GREP " "`
45858      if test "x$has_space" != x; then
45859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45860$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45862      fi
45863
45864      # Use eval to expand a potential ~
45865      eval path="$path"
45866      if test ! -f "$path" && test ! -d "$path"; then
45867        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45868      fi
45869
45870      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45871    fi
45872  fi
45873
45874
45875    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45877$as_echo_n "checking for freetype includes... " >&6; }
45878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45879$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45880    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45882$as_echo_n "checking for freetype libraries... " >&6; }
45883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45884$as_echo "$FREETYPE_LIB_PATH" >&6; }
45885  fi
45886
45887          fi
45888        else
45889          FREETYPE_BASE_DIR="$SYSROOT/usr"
45890
45891  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45892  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45893  METHOD="well-known location"
45894
45895  # Let's start with an optimistic view of the world :-)
45896  FOUND_FREETYPE=yes
45897
45898  # First look for the canonical freetype main include file ft2build.h.
45899  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45900    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45901    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45902    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45903      # Fail.
45904      FOUND_FREETYPE=no
45905    fi
45906  fi
45907
45908  if test "x$FOUND_FREETYPE" = xyes; then
45909    # Include file found, let's continue the sanity check.
45910    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45911$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45912
45913    # Reset to default value
45914    FREETYPE_BASE_NAME=freetype
45915    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45916    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45917      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45918          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45919        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45920        # for the .6 version explicitly.
45921        FREETYPE_BASE_NAME=freetype.6
45922        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45923        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45924$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45925      else
45926        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45927$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45928        FOUND_FREETYPE=no
45929      fi
45930    else
45931      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45932        # On Windows, we will need both .lib and .dll file.
45933        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45934          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45935$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45936          FOUND_FREETYPE=no
45937        fi
45938      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45939          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45940        # Found lib in isa dir, use that instead.
45941        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45942        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45943$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45944      fi
45945    fi
45946  fi
45947
45948  if test "x$FOUND_FREETYPE" = xyes; then
45949
45950  # Only process if variable expands to non-empty
45951
45952  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45954
45955  # Input might be given as Windows format, start by converting to
45956  # unix format.
45957  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45958  new_path=`$CYGPATH -u "$path"`
45959
45960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45963  # "foo.exe" is OK but "foo" is an error.
45964  #
45965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45966  # It is also a way to make sure we got the proper file name for the real test later on.
45967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45968  if test "x$test_shortpath" = x; then
45969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45971    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45972  fi
45973
45974  # Call helper function which possibly converts this using DOS-style short mode.
45975  # If so, the updated path is stored in $new_path.
45976
45977  input_path="$new_path"
45978  # Check if we need to convert this using DOS-style short mode. If the path
45979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45980  # take no chances and rewrite it.
45981  # Note: m4 eats our [], so we need to use [ and ] instead.
45982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45983  if test "x$has_forbidden_chars" != x; then
45984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45988      # Going to short mode and back again did indeed matter. Since short mode is
45989      # case insensitive, let's make it lowercase to improve readability.
45990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45991      # Now convert it back to Unix-style (cygpath)
45992      input_path=`$CYGPATH -u "$shortmode_path"`
45993      new_path="$input_path"
45994    fi
45995  fi
45996
45997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45998  if test "x$test_cygdrive_prefix" = x; then
45999    # As a simple fix, exclude /usr/bin since it's not a real path.
46000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46002      # a path prefixed by /cygdrive for fixpath to work.
46003      new_path="$CYGWIN_ROOT_PATH$input_path"
46004    fi
46005  fi
46006
46007
46008  if test "x$path" != "x$new_path"; then
46009    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46011$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46012  fi
46013
46014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46015
46016  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46017  has_colon=`$ECHO $path | $GREP ^.:`
46018  new_path="$path"
46019  if test "x$has_colon" = x; then
46020    # Not in mixed or Windows style, start by that.
46021    new_path=`cmd //c echo $path`
46022  fi
46023
46024
46025  input_path="$new_path"
46026  # Check if we need to convert this using DOS-style short mode. If the path
46027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46028  # take no chances and rewrite it.
46029  # Note: m4 eats our [], so we need to use [ and ] instead.
46030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46031  if test "x$has_forbidden_chars" != x; then
46032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46034  fi
46035
46036
46037  windows_path="$new_path"
46038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46039    unix_path=`$CYGPATH -u "$windows_path"`
46040    new_path="$unix_path"
46041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46043    new_path="$unix_path"
46044  fi
46045
46046  if test "x$path" != "x$new_path"; then
46047    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46050  fi
46051
46052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46054
46055    else
46056      # We're on a unix platform. Hooray! :)
46057      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46058      has_space=`$ECHO "$path" | $GREP " "`
46059      if test "x$has_space" != x; then
46060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46062        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46063      fi
46064
46065      # Use eval to expand a potential ~
46066      eval path="$path"
46067      if test ! -f "$path" && test ! -d "$path"; then
46068        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46069      fi
46070
46071      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46072    fi
46073  fi
46074
46075
46076  # Only process if variable expands to non-empty
46077
46078  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46080
46081  # Input might be given as Windows format, start by converting to
46082  # unix format.
46083  path="$POTENTIAL_FREETYPE_LIB_PATH"
46084  new_path=`$CYGPATH -u "$path"`
46085
46086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46089  # "foo.exe" is OK but "foo" is an error.
46090  #
46091  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46092  # It is also a way to make sure we got the proper file name for the real test later on.
46093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46094  if test "x$test_shortpath" = x; then
46095    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46096$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46097    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46098  fi
46099
46100  # Call helper function which possibly converts this using DOS-style short mode.
46101  # If so, the updated path is stored in $new_path.
46102
46103  input_path="$new_path"
46104  # Check if we need to convert this using DOS-style short mode. If the path
46105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46106  # take no chances and rewrite it.
46107  # Note: m4 eats our [], so we need to use [ and ] instead.
46108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46109  if test "x$has_forbidden_chars" != x; then
46110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46114      # Going to short mode and back again did indeed matter. Since short mode is
46115      # case insensitive, let's make it lowercase to improve readability.
46116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46117      # Now convert it back to Unix-style (cygpath)
46118      input_path=`$CYGPATH -u "$shortmode_path"`
46119      new_path="$input_path"
46120    fi
46121  fi
46122
46123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46124  if test "x$test_cygdrive_prefix" = x; then
46125    # As a simple fix, exclude /usr/bin since it's not a real path.
46126    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46128      # a path prefixed by /cygdrive for fixpath to work.
46129      new_path="$CYGWIN_ROOT_PATH$input_path"
46130    fi
46131  fi
46132
46133
46134  if test "x$path" != "x$new_path"; then
46135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46138  fi
46139
46140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46141
46142  path="$POTENTIAL_FREETYPE_LIB_PATH"
46143  has_colon=`$ECHO $path | $GREP ^.:`
46144  new_path="$path"
46145  if test "x$has_colon" = x; then
46146    # Not in mixed or Windows style, start by that.
46147    new_path=`cmd //c echo $path`
46148  fi
46149
46150
46151  input_path="$new_path"
46152  # Check if we need to convert this using DOS-style short mode. If the path
46153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46154  # take no chances and rewrite it.
46155  # Note: m4 eats our [], so we need to use [ and ] instead.
46156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46157  if test "x$has_forbidden_chars" != x; then
46158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46159    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46160  fi
46161
46162
46163  windows_path="$new_path"
46164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46165    unix_path=`$CYGPATH -u "$windows_path"`
46166    new_path="$unix_path"
46167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46169    new_path="$unix_path"
46170  fi
46171
46172  if test "x$path" != "x$new_path"; then
46173    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46176  fi
46177
46178  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46179  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46180
46181    else
46182      # We're on a unix platform. Hooray! :)
46183      path="$POTENTIAL_FREETYPE_LIB_PATH"
46184      has_space=`$ECHO "$path" | $GREP " "`
46185      if test "x$has_space" != x; then
46186        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46188        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46189      fi
46190
46191      # Use eval to expand a potential ~
46192      eval path="$path"
46193      if test ! -f "$path" && test ! -d "$path"; then
46194        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46195      fi
46196
46197      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46198    fi
46199  fi
46200
46201
46202    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46204$as_echo_n "checking for freetype includes... " >&6; }
46205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46206$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46207    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46209$as_echo_n "checking for freetype libraries... " >&6; }
46210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46211$as_echo "$FREETYPE_LIB_PATH" >&6; }
46212  fi
46213
46214
46215          if test "x$FOUND_FREETYPE" != xyes; then
46216            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46217
46218  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46219  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46220  METHOD="well-known location"
46221
46222  # Let's start with an optimistic view of the world :-)
46223  FOUND_FREETYPE=yes
46224
46225  # First look for the canonical freetype main include file ft2build.h.
46226  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46227    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46228    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46229    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46230      # Fail.
46231      FOUND_FREETYPE=no
46232    fi
46233  fi
46234
46235  if test "x$FOUND_FREETYPE" = xyes; then
46236    # Include file found, let's continue the sanity check.
46237    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46238$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46239
46240    # Reset to default value
46241    FREETYPE_BASE_NAME=freetype
46242    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46243    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46244      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46245          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46246        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46247        # for the .6 version explicitly.
46248        FREETYPE_BASE_NAME=freetype.6
46249        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46250        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46251$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46252      else
46253        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46254$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46255        FOUND_FREETYPE=no
46256      fi
46257    else
46258      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46259        # On Windows, we will need both .lib and .dll file.
46260        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46261          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46262$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46263          FOUND_FREETYPE=no
46264        fi
46265      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46266          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46267        # Found lib in isa dir, use that instead.
46268        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46269        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46270$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46271      fi
46272    fi
46273  fi
46274
46275  if test "x$FOUND_FREETYPE" = xyes; then
46276
46277  # Only process if variable expands to non-empty
46278
46279  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46281
46282  # Input might be given as Windows format, start by converting to
46283  # unix format.
46284  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46285  new_path=`$CYGPATH -u "$path"`
46286
46287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46290  # "foo.exe" is OK but "foo" is an error.
46291  #
46292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46293  # It is also a way to make sure we got the proper file name for the real test later on.
46294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46295  if test "x$test_shortpath" = x; then
46296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46297$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46298    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46299  fi
46300
46301  # Call helper function which possibly converts this using DOS-style short mode.
46302  # If so, the updated path is stored in $new_path.
46303
46304  input_path="$new_path"
46305  # Check if we need to convert this using DOS-style short mode. If the path
46306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46307  # take no chances and rewrite it.
46308  # Note: m4 eats our [], so we need to use [ and ] instead.
46309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46310  if test "x$has_forbidden_chars" != x; then
46311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46315      # Going to short mode and back again did indeed matter. Since short mode is
46316      # case insensitive, let's make it lowercase to improve readability.
46317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46318      # Now convert it back to Unix-style (cygpath)
46319      input_path=`$CYGPATH -u "$shortmode_path"`
46320      new_path="$input_path"
46321    fi
46322  fi
46323
46324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46325  if test "x$test_cygdrive_prefix" = x; then
46326    # As a simple fix, exclude /usr/bin since it's not a real path.
46327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46329      # a path prefixed by /cygdrive for fixpath to work.
46330      new_path="$CYGWIN_ROOT_PATH$input_path"
46331    fi
46332  fi
46333
46334
46335  if test "x$path" != "x$new_path"; then
46336    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46339  fi
46340
46341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46342
46343  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46344  has_colon=`$ECHO $path | $GREP ^.:`
46345  new_path="$path"
46346  if test "x$has_colon" = x; then
46347    # Not in mixed or Windows style, start by that.
46348    new_path=`cmd //c echo $path`
46349  fi
46350
46351
46352  input_path="$new_path"
46353  # Check if we need to convert this using DOS-style short mode. If the path
46354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46355  # take no chances and rewrite it.
46356  # Note: m4 eats our [], so we need to use [ and ] instead.
46357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46358  if test "x$has_forbidden_chars" != x; then
46359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46361  fi
46362
46363
46364  windows_path="$new_path"
46365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46366    unix_path=`$CYGPATH -u "$windows_path"`
46367    new_path="$unix_path"
46368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46370    new_path="$unix_path"
46371  fi
46372
46373  if test "x$path" != "x$new_path"; then
46374    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46376$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46377  fi
46378
46379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46381
46382    else
46383      # We're on a unix platform. Hooray! :)
46384      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46385      has_space=`$ECHO "$path" | $GREP " "`
46386      if test "x$has_space" != x; then
46387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46390      fi
46391
46392      # Use eval to expand a potential ~
46393      eval path="$path"
46394      if test ! -f "$path" && test ! -d "$path"; then
46395        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46396      fi
46397
46398      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46399    fi
46400  fi
46401
46402
46403  # Only process if variable expands to non-empty
46404
46405  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46407
46408  # Input might be given as Windows format, start by converting to
46409  # unix format.
46410  path="$POTENTIAL_FREETYPE_LIB_PATH"
46411  new_path=`$CYGPATH -u "$path"`
46412
46413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46416  # "foo.exe" is OK but "foo" is an error.
46417  #
46418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46419  # It is also a way to make sure we got the proper file name for the real test later on.
46420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46421  if test "x$test_shortpath" = x; then
46422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46424    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46425  fi
46426
46427  # Call helper function which possibly converts this using DOS-style short mode.
46428  # If so, the updated path is stored in $new_path.
46429
46430  input_path="$new_path"
46431  # Check if we need to convert this using DOS-style short mode. If the path
46432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46433  # take no chances and rewrite it.
46434  # Note: m4 eats our [], so we need to use [ and ] instead.
46435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46436  if test "x$has_forbidden_chars" != x; then
46437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46441      # Going to short mode and back again did indeed matter. Since short mode is
46442      # case insensitive, let's make it lowercase to improve readability.
46443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46444      # Now convert it back to Unix-style (cygpath)
46445      input_path=`$CYGPATH -u "$shortmode_path"`
46446      new_path="$input_path"
46447    fi
46448  fi
46449
46450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46451  if test "x$test_cygdrive_prefix" = x; then
46452    # As a simple fix, exclude /usr/bin since it's not a real path.
46453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46455      # a path prefixed by /cygdrive for fixpath to work.
46456      new_path="$CYGWIN_ROOT_PATH$input_path"
46457    fi
46458  fi
46459
46460
46461  if test "x$path" != "x$new_path"; then
46462    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46464$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46465  fi
46466
46467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46468
46469  path="$POTENTIAL_FREETYPE_LIB_PATH"
46470  has_colon=`$ECHO $path | $GREP ^.:`
46471  new_path="$path"
46472  if test "x$has_colon" = x; then
46473    # Not in mixed or Windows style, start by that.
46474    new_path=`cmd //c echo $path`
46475  fi
46476
46477
46478  input_path="$new_path"
46479  # Check if we need to convert this using DOS-style short mode. If the path
46480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46481  # take no chances and rewrite it.
46482  # Note: m4 eats our [], so we need to use [ and ] instead.
46483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46484  if test "x$has_forbidden_chars" != x; then
46485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46487  fi
46488
46489
46490  windows_path="$new_path"
46491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46492    unix_path=`$CYGPATH -u "$windows_path"`
46493    new_path="$unix_path"
46494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46496    new_path="$unix_path"
46497  fi
46498
46499  if test "x$path" != "x$new_path"; then
46500    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46503  fi
46504
46505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46507
46508    else
46509      # We're on a unix platform. Hooray! :)
46510      path="$POTENTIAL_FREETYPE_LIB_PATH"
46511      has_space=`$ECHO "$path" | $GREP " "`
46512      if test "x$has_space" != x; then
46513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46516      fi
46517
46518      # Use eval to expand a potential ~
46519      eval path="$path"
46520      if test ! -f "$path" && test ! -d "$path"; then
46521        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46522      fi
46523
46524      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46525    fi
46526  fi
46527
46528
46529    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46530    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46531$as_echo_n "checking for freetype includes... " >&6; }
46532    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46533$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46534    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46535    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46536$as_echo_n "checking for freetype libraries... " >&6; }
46537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46538$as_echo "$FREETYPE_LIB_PATH" >&6; }
46539  fi
46540
46541          fi
46542
46543          if test "x$FOUND_FREETYPE" != xyes; then
46544            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46545
46546  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46547  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46548  METHOD="well-known location"
46549
46550  # Let's start with an optimistic view of the world :-)
46551  FOUND_FREETYPE=yes
46552
46553  # First look for the canonical freetype main include file ft2build.h.
46554  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46555    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46556    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46557    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46558      # Fail.
46559      FOUND_FREETYPE=no
46560    fi
46561  fi
46562
46563  if test "x$FOUND_FREETYPE" = xyes; then
46564    # Include file found, let's continue the sanity check.
46565    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46566$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46567
46568    # Reset to default value
46569    FREETYPE_BASE_NAME=freetype
46570    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46571    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46572      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46573          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46574        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46575        # for the .6 version explicitly.
46576        FREETYPE_BASE_NAME=freetype.6
46577        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46578        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46579$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46580      else
46581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46582$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46583        FOUND_FREETYPE=no
46584      fi
46585    else
46586      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46587        # On Windows, we will need both .lib and .dll file.
46588        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46589          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46590$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46591          FOUND_FREETYPE=no
46592        fi
46593      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46594          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46595        # Found lib in isa dir, use that instead.
46596        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46597        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46598$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46599      fi
46600    fi
46601  fi
46602
46603  if test "x$FOUND_FREETYPE" = xyes; then
46604
46605  # Only process if variable expands to non-empty
46606
46607  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46609
46610  # Input might be given as Windows format, start by converting to
46611  # unix format.
46612  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46613  new_path=`$CYGPATH -u "$path"`
46614
46615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46618  # "foo.exe" is OK but "foo" is an error.
46619  #
46620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46621  # It is also a way to make sure we got the proper file name for the real test later on.
46622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46623  if test "x$test_shortpath" = x; then
46624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46626    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46627  fi
46628
46629  # Call helper function which possibly converts this using DOS-style short mode.
46630  # If so, the updated path is stored in $new_path.
46631
46632  input_path="$new_path"
46633  # Check if we need to convert this using DOS-style short mode. If the path
46634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46635  # take no chances and rewrite it.
46636  # Note: m4 eats our [], so we need to use [ and ] instead.
46637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46638  if test "x$has_forbidden_chars" != x; then
46639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46643      # Going to short mode and back again did indeed matter. Since short mode is
46644      # case insensitive, let's make it lowercase to improve readability.
46645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46646      # Now convert it back to Unix-style (cygpath)
46647      input_path=`$CYGPATH -u "$shortmode_path"`
46648      new_path="$input_path"
46649    fi
46650  fi
46651
46652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46653  if test "x$test_cygdrive_prefix" = x; then
46654    # As a simple fix, exclude /usr/bin since it's not a real path.
46655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46657      # a path prefixed by /cygdrive for fixpath to work.
46658      new_path="$CYGWIN_ROOT_PATH$input_path"
46659    fi
46660  fi
46661
46662
46663  if test "x$path" != "x$new_path"; then
46664    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46666$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46667  fi
46668
46669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46670
46671  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46672  has_colon=`$ECHO $path | $GREP ^.:`
46673  new_path="$path"
46674  if test "x$has_colon" = x; then
46675    # Not in mixed or Windows style, start by that.
46676    new_path=`cmd //c echo $path`
46677  fi
46678
46679
46680  input_path="$new_path"
46681  # Check if we need to convert this using DOS-style short mode. If the path
46682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46683  # take no chances and rewrite it.
46684  # Note: m4 eats our [], so we need to use [ and ] instead.
46685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46686  if test "x$has_forbidden_chars" != x; then
46687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46689  fi
46690
46691
46692  windows_path="$new_path"
46693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46694    unix_path=`$CYGPATH -u "$windows_path"`
46695    new_path="$unix_path"
46696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46698    new_path="$unix_path"
46699  fi
46700
46701  if test "x$path" != "x$new_path"; then
46702    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46705  fi
46706
46707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46709
46710    else
46711      # We're on a unix platform. Hooray! :)
46712      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46713      has_space=`$ECHO "$path" | $GREP " "`
46714      if test "x$has_space" != x; then
46715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46718      fi
46719
46720      # Use eval to expand a potential ~
46721      eval path="$path"
46722      if test ! -f "$path" && test ! -d "$path"; then
46723        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46724      fi
46725
46726      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46727    fi
46728  fi
46729
46730
46731  # Only process if variable expands to non-empty
46732
46733  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46735
46736  # Input might be given as Windows format, start by converting to
46737  # unix format.
46738  path="$POTENTIAL_FREETYPE_LIB_PATH"
46739  new_path=`$CYGPATH -u "$path"`
46740
46741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46744  # "foo.exe" is OK but "foo" is an error.
46745  #
46746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46747  # It is also a way to make sure we got the proper file name for the real test later on.
46748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46749  if test "x$test_shortpath" = x; then
46750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46751$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46752    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46753  fi
46754
46755  # Call helper function which possibly converts this using DOS-style short mode.
46756  # If so, the updated path is stored in $new_path.
46757
46758  input_path="$new_path"
46759  # Check if we need to convert this using DOS-style short mode. If the path
46760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46761  # take no chances and rewrite it.
46762  # Note: m4 eats our [], so we need to use [ and ] instead.
46763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46764  if test "x$has_forbidden_chars" != x; then
46765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46769      # Going to short mode and back again did indeed matter. Since short mode is
46770      # case insensitive, let's make it lowercase to improve readability.
46771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46772      # Now convert it back to Unix-style (cygpath)
46773      input_path=`$CYGPATH -u "$shortmode_path"`
46774      new_path="$input_path"
46775    fi
46776  fi
46777
46778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46779  if test "x$test_cygdrive_prefix" = x; then
46780    # As a simple fix, exclude /usr/bin since it's not a real path.
46781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46783      # a path prefixed by /cygdrive for fixpath to work.
46784      new_path="$CYGWIN_ROOT_PATH$input_path"
46785    fi
46786  fi
46787
46788
46789  if test "x$path" != "x$new_path"; then
46790    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46792$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46793  fi
46794
46795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46796
46797  path="$POTENTIAL_FREETYPE_LIB_PATH"
46798  has_colon=`$ECHO $path | $GREP ^.:`
46799  new_path="$path"
46800  if test "x$has_colon" = x; then
46801    # Not in mixed or Windows style, start by that.
46802    new_path=`cmd //c echo $path`
46803  fi
46804
46805
46806  input_path="$new_path"
46807  # Check if we need to convert this using DOS-style short mode. If the path
46808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46809  # take no chances and rewrite it.
46810  # Note: m4 eats our [], so we need to use [ and ] instead.
46811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46812  if test "x$has_forbidden_chars" != x; then
46813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46815  fi
46816
46817
46818  windows_path="$new_path"
46819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46820    unix_path=`$CYGPATH -u "$windows_path"`
46821    new_path="$unix_path"
46822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46824    new_path="$unix_path"
46825  fi
46826
46827  if test "x$path" != "x$new_path"; then
46828    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46830$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46831  fi
46832
46833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46835
46836    else
46837      # We're on a unix platform. Hooray! :)
46838      path="$POTENTIAL_FREETYPE_LIB_PATH"
46839      has_space=`$ECHO "$path" | $GREP " "`
46840      if test "x$has_space" != x; then
46841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46844      fi
46845
46846      # Use eval to expand a potential ~
46847      eval path="$path"
46848      if test ! -f "$path" && test ! -d "$path"; then
46849        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46850      fi
46851
46852      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46853    fi
46854  fi
46855
46856
46857    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46859$as_echo_n "checking for freetype includes... " >&6; }
46860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46861$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46862    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46864$as_echo_n "checking for freetype libraries... " >&6; }
46865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46866$as_echo "$FREETYPE_LIB_PATH" >&6; }
46867  fi
46868
46869          fi
46870
46871          if test "x$FOUND_FREETYPE" != xyes; then
46872            FREETYPE_BASE_DIR="$SYSROOT/usr"
46873            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46874
46875  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46876  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46877  METHOD="well-known location"
46878
46879  # Let's start with an optimistic view of the world :-)
46880  FOUND_FREETYPE=yes
46881
46882  # First look for the canonical freetype main include file ft2build.h.
46883  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46884    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46885    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46886    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46887      # Fail.
46888      FOUND_FREETYPE=no
46889    fi
46890  fi
46891
46892  if test "x$FOUND_FREETYPE" = xyes; then
46893    # Include file found, let's continue the sanity check.
46894    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46895$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46896
46897    # Reset to default value
46898    FREETYPE_BASE_NAME=freetype
46899    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46900    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46901      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46902          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46903        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46904        # for the .6 version explicitly.
46905        FREETYPE_BASE_NAME=freetype.6
46906        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46907        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46908$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46909      else
46910        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46911$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46912        FOUND_FREETYPE=no
46913      fi
46914    else
46915      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46916        # On Windows, we will need both .lib and .dll file.
46917        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46918          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46919$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46920          FOUND_FREETYPE=no
46921        fi
46922      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46923          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46924        # Found lib in isa dir, use that instead.
46925        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46926        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46927$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46928      fi
46929    fi
46930  fi
46931
46932  if test "x$FOUND_FREETYPE" = xyes; then
46933
46934  # Only process if variable expands to non-empty
46935
46936  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46938
46939  # Input might be given as Windows format, start by converting to
46940  # unix format.
46941  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46942  new_path=`$CYGPATH -u "$path"`
46943
46944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46947  # "foo.exe" is OK but "foo" is an error.
46948  #
46949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46950  # It is also a way to make sure we got the proper file name for the real test later on.
46951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46952  if test "x$test_shortpath" = x; then
46953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46954$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46955    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46956  fi
46957
46958  # Call helper function which possibly converts this using DOS-style short mode.
46959  # If so, the updated path is stored in $new_path.
46960
46961  input_path="$new_path"
46962  # Check if we need to convert this using DOS-style short mode. If the path
46963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46964  # take no chances and rewrite it.
46965  # Note: m4 eats our [], so we need to use [ and ] instead.
46966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46967  if test "x$has_forbidden_chars" != x; then
46968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46972      # Going to short mode and back again did indeed matter. Since short mode is
46973      # case insensitive, let's make it lowercase to improve readability.
46974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46975      # Now convert it back to Unix-style (cygpath)
46976      input_path=`$CYGPATH -u "$shortmode_path"`
46977      new_path="$input_path"
46978    fi
46979  fi
46980
46981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46982  if test "x$test_cygdrive_prefix" = x; then
46983    # As a simple fix, exclude /usr/bin since it's not a real path.
46984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46986      # a path prefixed by /cygdrive for fixpath to work.
46987      new_path="$CYGWIN_ROOT_PATH$input_path"
46988    fi
46989  fi
46990
46991
46992  if test "x$path" != "x$new_path"; then
46993    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46995$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46996  fi
46997
46998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46999
47000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47001  has_colon=`$ECHO $path | $GREP ^.:`
47002  new_path="$path"
47003  if test "x$has_colon" = x; then
47004    # Not in mixed or Windows style, start by that.
47005    new_path=`cmd //c echo $path`
47006  fi
47007
47008
47009  input_path="$new_path"
47010  # Check if we need to convert this using DOS-style short mode. If the path
47011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47012  # take no chances and rewrite it.
47013  # Note: m4 eats our [], so we need to use [ and ] instead.
47014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47015  if test "x$has_forbidden_chars" != x; then
47016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47018  fi
47019
47020
47021  windows_path="$new_path"
47022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47023    unix_path=`$CYGPATH -u "$windows_path"`
47024    new_path="$unix_path"
47025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47027    new_path="$unix_path"
47028  fi
47029
47030  if test "x$path" != "x$new_path"; then
47031    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47033$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47034  fi
47035
47036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47038
47039    else
47040      # We're on a unix platform. Hooray! :)
47041      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47042      has_space=`$ECHO "$path" | $GREP " "`
47043      if test "x$has_space" != x; then
47044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47045$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47047      fi
47048
47049      # Use eval to expand a potential ~
47050      eval path="$path"
47051      if test ! -f "$path" && test ! -d "$path"; then
47052        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47053      fi
47054
47055      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47056    fi
47057  fi
47058
47059
47060  # Only process if variable expands to non-empty
47061
47062  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47064
47065  # Input might be given as Windows format, start by converting to
47066  # unix format.
47067  path="$POTENTIAL_FREETYPE_LIB_PATH"
47068  new_path=`$CYGPATH -u "$path"`
47069
47070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47073  # "foo.exe" is OK but "foo" is an error.
47074  #
47075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47076  # It is also a way to make sure we got the proper file name for the real test later on.
47077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47078  if test "x$test_shortpath" = x; then
47079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47081    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47082  fi
47083
47084  # Call helper function which possibly converts this using DOS-style short mode.
47085  # If so, the updated path is stored in $new_path.
47086
47087  input_path="$new_path"
47088  # Check if we need to convert this using DOS-style short mode. If the path
47089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47090  # take no chances and rewrite it.
47091  # Note: m4 eats our [], so we need to use [ and ] instead.
47092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47093  if test "x$has_forbidden_chars" != x; then
47094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47098      # Going to short mode and back again did indeed matter. Since short mode is
47099      # case insensitive, let's make it lowercase to improve readability.
47100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47101      # Now convert it back to Unix-style (cygpath)
47102      input_path=`$CYGPATH -u "$shortmode_path"`
47103      new_path="$input_path"
47104    fi
47105  fi
47106
47107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47108  if test "x$test_cygdrive_prefix" = x; then
47109    # As a simple fix, exclude /usr/bin since it's not a real path.
47110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47112      # a path prefixed by /cygdrive for fixpath to work.
47113      new_path="$CYGWIN_ROOT_PATH$input_path"
47114    fi
47115  fi
47116
47117
47118  if test "x$path" != "x$new_path"; then
47119    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47122  fi
47123
47124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47125
47126  path="$POTENTIAL_FREETYPE_LIB_PATH"
47127  has_colon=`$ECHO $path | $GREP ^.:`
47128  new_path="$path"
47129  if test "x$has_colon" = x; then
47130    # Not in mixed or Windows style, start by that.
47131    new_path=`cmd //c echo $path`
47132  fi
47133
47134
47135  input_path="$new_path"
47136  # Check if we need to convert this using DOS-style short mode. If the path
47137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47138  # take no chances and rewrite it.
47139  # Note: m4 eats our [], so we need to use [ and ] instead.
47140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47141  if test "x$has_forbidden_chars" != x; then
47142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47144  fi
47145
47146
47147  windows_path="$new_path"
47148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47149    unix_path=`$CYGPATH -u "$windows_path"`
47150    new_path="$unix_path"
47151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47153    new_path="$unix_path"
47154  fi
47155
47156  if test "x$path" != "x$new_path"; then
47157    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47159$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47160  fi
47161
47162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47164
47165    else
47166      # We're on a unix platform. Hooray! :)
47167      path="$POTENTIAL_FREETYPE_LIB_PATH"
47168      has_space=`$ECHO "$path" | $GREP " "`
47169      if test "x$has_space" != x; then
47170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47171$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47172        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47173      fi
47174
47175      # Use eval to expand a potential ~
47176      eval path="$path"
47177      if test ! -f "$path" && test ! -d "$path"; then
47178        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47179      fi
47180
47181      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47182    fi
47183  fi
47184
47185
47186    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47188$as_echo_n "checking for freetype includes... " >&6; }
47189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47190$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47191    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47193$as_echo_n "checking for freetype libraries... " >&6; }
47194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47195$as_echo "$FREETYPE_LIB_PATH" >&6; }
47196  fi
47197
47198            else
47199
47200  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47201  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47202  METHOD="well-known location"
47203
47204  # Let's start with an optimistic view of the world :-)
47205  FOUND_FREETYPE=yes
47206
47207  # First look for the canonical freetype main include file ft2build.h.
47208  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47209    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47210    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47211    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47212      # Fail.
47213      FOUND_FREETYPE=no
47214    fi
47215  fi
47216
47217  if test "x$FOUND_FREETYPE" = xyes; then
47218    # Include file found, let's continue the sanity check.
47219    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47220$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47221
47222    # Reset to default value
47223    FREETYPE_BASE_NAME=freetype
47224    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47225    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47226      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47227          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47228        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47229        # for the .6 version explicitly.
47230        FREETYPE_BASE_NAME=freetype.6
47231        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47232        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47233$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47234      else
47235        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47236$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47237        FOUND_FREETYPE=no
47238      fi
47239    else
47240      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47241        # On Windows, we will need both .lib and .dll file.
47242        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47243          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47244$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47245          FOUND_FREETYPE=no
47246        fi
47247      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47248          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47249        # Found lib in isa dir, use that instead.
47250        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47251        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47252$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47253      fi
47254    fi
47255  fi
47256
47257  if test "x$FOUND_FREETYPE" = xyes; then
47258
47259  # Only process if variable expands to non-empty
47260
47261  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47263
47264  # Input might be given as Windows format, start by converting to
47265  # unix format.
47266  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47267  new_path=`$CYGPATH -u "$path"`
47268
47269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47272  # "foo.exe" is OK but "foo" is an error.
47273  #
47274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47275  # It is also a way to make sure we got the proper file name for the real test later on.
47276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47277  if test "x$test_shortpath" = x; then
47278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47279$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47280    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47281  fi
47282
47283  # Call helper function which possibly converts this using DOS-style short mode.
47284  # If so, the updated path is stored in $new_path.
47285
47286  input_path="$new_path"
47287  # Check if we need to convert this using DOS-style short mode. If the path
47288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47289  # take no chances and rewrite it.
47290  # Note: m4 eats our [], so we need to use [ and ] instead.
47291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47292  if test "x$has_forbidden_chars" != x; then
47293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47297      # Going to short mode and back again did indeed matter. Since short mode is
47298      # case insensitive, let's make it lowercase to improve readability.
47299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47300      # Now convert it back to Unix-style (cygpath)
47301      input_path=`$CYGPATH -u "$shortmode_path"`
47302      new_path="$input_path"
47303    fi
47304  fi
47305
47306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47307  if test "x$test_cygdrive_prefix" = x; then
47308    # As a simple fix, exclude /usr/bin since it's not a real path.
47309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47311      # a path prefixed by /cygdrive for fixpath to work.
47312      new_path="$CYGWIN_ROOT_PATH$input_path"
47313    fi
47314  fi
47315
47316
47317  if test "x$path" != "x$new_path"; then
47318    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47320$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47321  fi
47322
47323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47324
47325  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47326  has_colon=`$ECHO $path | $GREP ^.:`
47327  new_path="$path"
47328  if test "x$has_colon" = x; then
47329    # Not in mixed or Windows style, start by that.
47330    new_path=`cmd //c echo $path`
47331  fi
47332
47333
47334  input_path="$new_path"
47335  # Check if we need to convert this using DOS-style short mode. If the path
47336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47337  # take no chances and rewrite it.
47338  # Note: m4 eats our [], so we need to use [ and ] instead.
47339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47340  if test "x$has_forbidden_chars" != x; then
47341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47343  fi
47344
47345
47346  windows_path="$new_path"
47347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47348    unix_path=`$CYGPATH -u "$windows_path"`
47349    new_path="$unix_path"
47350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47352    new_path="$unix_path"
47353  fi
47354
47355  if test "x$path" != "x$new_path"; then
47356    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47358$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47359  fi
47360
47361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47363
47364    else
47365      # We're on a unix platform. Hooray! :)
47366      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47367      has_space=`$ECHO "$path" | $GREP " "`
47368      if test "x$has_space" != x; then
47369        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47370$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47371        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47372      fi
47373
47374      # Use eval to expand a potential ~
47375      eval path="$path"
47376      if test ! -f "$path" && test ! -d "$path"; then
47377        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47378      fi
47379
47380      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47381    fi
47382  fi
47383
47384
47385  # Only process if variable expands to non-empty
47386
47387  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47389
47390  # Input might be given as Windows format, start by converting to
47391  # unix format.
47392  path="$POTENTIAL_FREETYPE_LIB_PATH"
47393  new_path=`$CYGPATH -u "$path"`
47394
47395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47398  # "foo.exe" is OK but "foo" is an error.
47399  #
47400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47401  # It is also a way to make sure we got the proper file name for the real test later on.
47402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47403  if test "x$test_shortpath" = x; then
47404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47405$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47406    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47407  fi
47408
47409  # Call helper function which possibly converts this using DOS-style short mode.
47410  # If so, the updated path is stored in $new_path.
47411
47412  input_path="$new_path"
47413  # Check if we need to convert this using DOS-style short mode. If the path
47414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47415  # take no chances and rewrite it.
47416  # Note: m4 eats our [], so we need to use [ and ] instead.
47417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47418  if test "x$has_forbidden_chars" != x; then
47419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47423      # Going to short mode and back again did indeed matter. Since short mode is
47424      # case insensitive, let's make it lowercase to improve readability.
47425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47426      # Now convert it back to Unix-style (cygpath)
47427      input_path=`$CYGPATH -u "$shortmode_path"`
47428      new_path="$input_path"
47429    fi
47430  fi
47431
47432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47433  if test "x$test_cygdrive_prefix" = x; then
47434    # As a simple fix, exclude /usr/bin since it's not a real path.
47435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47437      # a path prefixed by /cygdrive for fixpath to work.
47438      new_path="$CYGWIN_ROOT_PATH$input_path"
47439    fi
47440  fi
47441
47442
47443  if test "x$path" != "x$new_path"; then
47444    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47447  fi
47448
47449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47450
47451  path="$POTENTIAL_FREETYPE_LIB_PATH"
47452  has_colon=`$ECHO $path | $GREP ^.:`
47453  new_path="$path"
47454  if test "x$has_colon" = x; then
47455    # Not in mixed or Windows style, start by that.
47456    new_path=`cmd //c echo $path`
47457  fi
47458
47459
47460  input_path="$new_path"
47461  # Check if we need to convert this using DOS-style short mode. If the path
47462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47463  # take no chances and rewrite it.
47464  # Note: m4 eats our [], so we need to use [ and ] instead.
47465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47466  if test "x$has_forbidden_chars" != x; then
47467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47469  fi
47470
47471
47472  windows_path="$new_path"
47473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47474    unix_path=`$CYGPATH -u "$windows_path"`
47475    new_path="$unix_path"
47476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47478    new_path="$unix_path"
47479  fi
47480
47481  if test "x$path" != "x$new_path"; then
47482    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47484$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47485  fi
47486
47487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47489
47490    else
47491      # We're on a unix platform. Hooray! :)
47492      path="$POTENTIAL_FREETYPE_LIB_PATH"
47493      has_space=`$ECHO "$path" | $GREP " "`
47494      if test "x$has_space" != x; then
47495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47496$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47497        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47498      fi
47499
47500      # Use eval to expand a potential ~
47501      eval path="$path"
47502      if test ! -f "$path" && test ! -d "$path"; then
47503        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47504      fi
47505
47506      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47507    fi
47508  fi
47509
47510
47511    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47512    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47513$as_echo_n "checking for freetype includes... " >&6; }
47514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47515$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47516    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47518$as_echo_n "checking for freetype libraries... " >&6; }
47519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47520$as_echo "$FREETYPE_LIB_PATH" >&6; }
47521  fi
47522
47523              if test "x$FOUND_FREETYPE" != xyes; then
47524
47525  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47526  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47527  METHOD="well-known location"
47528
47529  # Let's start with an optimistic view of the world :-)
47530  FOUND_FREETYPE=yes
47531
47532  # First look for the canonical freetype main include file ft2build.h.
47533  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47534    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47535    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47536    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47537      # Fail.
47538      FOUND_FREETYPE=no
47539    fi
47540  fi
47541
47542  if test "x$FOUND_FREETYPE" = xyes; then
47543    # Include file found, let's continue the sanity check.
47544    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47545$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47546
47547    # Reset to default value
47548    FREETYPE_BASE_NAME=freetype
47549    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47550    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47551      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47552          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47553        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47554        # for the .6 version explicitly.
47555        FREETYPE_BASE_NAME=freetype.6
47556        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47557        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47558$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47559      else
47560        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47561$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47562        FOUND_FREETYPE=no
47563      fi
47564    else
47565      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47566        # On Windows, we will need both .lib and .dll file.
47567        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47568          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47569$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47570          FOUND_FREETYPE=no
47571        fi
47572      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47573          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47574        # Found lib in isa dir, use that instead.
47575        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47576        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47577$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47578      fi
47579    fi
47580  fi
47581
47582  if test "x$FOUND_FREETYPE" = xyes; then
47583
47584  # Only process if variable expands to non-empty
47585
47586  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47588
47589  # Input might be given as Windows format, start by converting to
47590  # unix format.
47591  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47592  new_path=`$CYGPATH -u "$path"`
47593
47594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47597  # "foo.exe" is OK but "foo" is an error.
47598  #
47599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47600  # It is also a way to make sure we got the proper file name for the real test later on.
47601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47602  if test "x$test_shortpath" = x; then
47603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47605    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47606  fi
47607
47608  # Call helper function which possibly converts this using DOS-style short mode.
47609  # If so, the updated path is stored in $new_path.
47610
47611  input_path="$new_path"
47612  # Check if we need to convert this using DOS-style short mode. If the path
47613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47614  # take no chances and rewrite it.
47615  # Note: m4 eats our [], so we need to use [ and ] instead.
47616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47617  if test "x$has_forbidden_chars" != x; then
47618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47622      # Going to short mode and back again did indeed matter. Since short mode is
47623      # case insensitive, let's make it lowercase to improve readability.
47624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47625      # Now convert it back to Unix-style (cygpath)
47626      input_path=`$CYGPATH -u "$shortmode_path"`
47627      new_path="$input_path"
47628    fi
47629  fi
47630
47631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47632  if test "x$test_cygdrive_prefix" = x; then
47633    # As a simple fix, exclude /usr/bin since it's not a real path.
47634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47636      # a path prefixed by /cygdrive for fixpath to work.
47637      new_path="$CYGWIN_ROOT_PATH$input_path"
47638    fi
47639  fi
47640
47641
47642  if test "x$path" != "x$new_path"; then
47643    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47646  fi
47647
47648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47649
47650  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47651  has_colon=`$ECHO $path | $GREP ^.:`
47652  new_path="$path"
47653  if test "x$has_colon" = x; then
47654    # Not in mixed or Windows style, start by that.
47655    new_path=`cmd //c echo $path`
47656  fi
47657
47658
47659  input_path="$new_path"
47660  # Check if we need to convert this using DOS-style short mode. If the path
47661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47662  # take no chances and rewrite it.
47663  # Note: m4 eats our [], so we need to use [ and ] instead.
47664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47665  if test "x$has_forbidden_chars" != x; then
47666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47668  fi
47669
47670
47671  windows_path="$new_path"
47672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47673    unix_path=`$CYGPATH -u "$windows_path"`
47674    new_path="$unix_path"
47675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47677    new_path="$unix_path"
47678  fi
47679
47680  if test "x$path" != "x$new_path"; then
47681    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47684  fi
47685
47686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47688
47689    else
47690      # We're on a unix platform. Hooray! :)
47691      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47692      has_space=`$ECHO "$path" | $GREP " "`
47693      if test "x$has_space" != x; then
47694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47697      fi
47698
47699      # Use eval to expand a potential ~
47700      eval path="$path"
47701      if test ! -f "$path" && test ! -d "$path"; then
47702        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47703      fi
47704
47705      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47706    fi
47707  fi
47708
47709
47710  # Only process if variable expands to non-empty
47711
47712  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47714
47715  # Input might be given as Windows format, start by converting to
47716  # unix format.
47717  path="$POTENTIAL_FREETYPE_LIB_PATH"
47718  new_path=`$CYGPATH -u "$path"`
47719
47720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47723  # "foo.exe" is OK but "foo" is an error.
47724  #
47725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47726  # It is also a way to make sure we got the proper file name for the real test later on.
47727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47728  if test "x$test_shortpath" = x; then
47729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47731    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47732  fi
47733
47734  # Call helper function which possibly converts this using DOS-style short mode.
47735  # If so, the updated path is stored in $new_path.
47736
47737  input_path="$new_path"
47738  # Check if we need to convert this using DOS-style short mode. If the path
47739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47740  # take no chances and rewrite it.
47741  # Note: m4 eats our [], so we need to use [ and ] instead.
47742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47743  if test "x$has_forbidden_chars" != x; then
47744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47748      # Going to short mode and back again did indeed matter. Since short mode is
47749      # case insensitive, let's make it lowercase to improve readability.
47750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47751      # Now convert it back to Unix-style (cygpath)
47752      input_path=`$CYGPATH -u "$shortmode_path"`
47753      new_path="$input_path"
47754    fi
47755  fi
47756
47757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47758  if test "x$test_cygdrive_prefix" = x; then
47759    # As a simple fix, exclude /usr/bin since it's not a real path.
47760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47762      # a path prefixed by /cygdrive for fixpath to work.
47763      new_path="$CYGWIN_ROOT_PATH$input_path"
47764    fi
47765  fi
47766
47767
47768  if test "x$path" != "x$new_path"; then
47769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47772  fi
47773
47774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47775
47776  path="$POTENTIAL_FREETYPE_LIB_PATH"
47777  has_colon=`$ECHO $path | $GREP ^.:`
47778  new_path="$path"
47779  if test "x$has_colon" = x; then
47780    # Not in mixed or Windows style, start by that.
47781    new_path=`cmd //c echo $path`
47782  fi
47783
47784
47785  input_path="$new_path"
47786  # Check if we need to convert this using DOS-style short mode. If the path
47787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47788  # take no chances and rewrite it.
47789  # Note: m4 eats our [], so we need to use [ and ] instead.
47790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47791  if test "x$has_forbidden_chars" != x; then
47792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47794  fi
47795
47796
47797  windows_path="$new_path"
47798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47799    unix_path=`$CYGPATH -u "$windows_path"`
47800    new_path="$unix_path"
47801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47803    new_path="$unix_path"
47804  fi
47805
47806  if test "x$path" != "x$new_path"; then
47807    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47810  fi
47811
47812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47814
47815    else
47816      # We're on a unix platform. Hooray! :)
47817      path="$POTENTIAL_FREETYPE_LIB_PATH"
47818      has_space=`$ECHO "$path" | $GREP " "`
47819      if test "x$has_space" != x; then
47820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47823      fi
47824
47825      # Use eval to expand a potential ~
47826      eval path="$path"
47827      if test ! -f "$path" && test ! -d "$path"; then
47828        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47829      fi
47830
47831      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47832    fi
47833  fi
47834
47835
47836    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47838$as_echo_n "checking for freetype includes... " >&6; }
47839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47840$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47841    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47843$as_echo_n "checking for freetype libraries... " >&6; }
47844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47845$as_echo "$FREETYPE_LIB_PATH" >&6; }
47846  fi
47847
47848              fi
47849            fi
47850          fi
47851        fi
47852      fi # end check in well-known locations
47853
47854      if test "x$FOUND_FREETYPE" != xyes; then
47855
47856  # Print a helpful message on how to acquire the necessary build dependency.
47857  # freetype is the help tag: freetype, cups, pulse, alsa etc
47858  MISSING_DEPENDENCY=freetype
47859
47860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47861    cygwin_help $MISSING_DEPENDENCY
47862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47863    msys_help $MISSING_DEPENDENCY
47864  else
47865    PKGHANDLER_COMMAND=
47866
47867    case $PKGHANDLER in
47868      apt-get)
47869        apt_help     $MISSING_DEPENDENCY ;;
47870      yum)
47871        yum_help     $MISSING_DEPENDENCY ;;
47872      port)
47873        port_help    $MISSING_DEPENDENCY ;;
47874      pkgutil)
47875        pkgutil_help $MISSING_DEPENDENCY ;;
47876      pkgadd)
47877        pkgadd_help  $MISSING_DEPENDENCY ;;
47878    esac
47879
47880    if test "x$PKGHANDLER_COMMAND" != x; then
47881      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47882    fi
47883  fi
47884
47885        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47886      fi
47887    fi # end user specified settings
47888
47889    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47890    if test "x$FREETYPE_CFLAGS" = x; then
47891
47892  # Only process if variable expands to non-empty
47893
47894  if test "x$FREETYPE_INCLUDE_PATH" != x; then
47895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47896
47897  # Input might be given as Windows format, start by converting to
47898  # unix format.
47899  path="$FREETYPE_INCLUDE_PATH"
47900  new_path=`$CYGPATH -u "$path"`
47901
47902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47905  # "foo.exe" is OK but "foo" is an error.
47906  #
47907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47908  # It is also a way to make sure we got the proper file name for the real test later on.
47909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47910  if test "x$test_shortpath" = x; then
47911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47912$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47913    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47914  fi
47915
47916  # Call helper function which possibly converts this using DOS-style short mode.
47917  # If so, the updated path is stored in $new_path.
47918
47919  input_path="$new_path"
47920  # Check if we need to convert this using DOS-style short mode. If the path
47921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47922  # take no chances and rewrite it.
47923  # Note: m4 eats our [], so we need to use [ and ] instead.
47924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47925  if test "x$has_forbidden_chars" != x; then
47926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47930      # Going to short mode and back again did indeed matter. Since short mode is
47931      # case insensitive, let's make it lowercase to improve readability.
47932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47933      # Now convert it back to Unix-style (cygpath)
47934      input_path=`$CYGPATH -u "$shortmode_path"`
47935      new_path="$input_path"
47936    fi
47937  fi
47938
47939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47940  if test "x$test_cygdrive_prefix" = x; then
47941    # As a simple fix, exclude /usr/bin since it's not a real path.
47942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47944      # a path prefixed by /cygdrive for fixpath to work.
47945      new_path="$CYGWIN_ROOT_PATH$input_path"
47946    fi
47947  fi
47948
47949
47950  if test "x$path" != "x$new_path"; then
47951    FREETYPE_INCLUDE_PATH="$new_path"
47952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47953$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47954  fi
47955
47956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47957
47958  path="$FREETYPE_INCLUDE_PATH"
47959  has_colon=`$ECHO $path | $GREP ^.:`
47960  new_path="$path"
47961  if test "x$has_colon" = x; then
47962    # Not in mixed or Windows style, start by that.
47963    new_path=`cmd //c echo $path`
47964  fi
47965
47966
47967  input_path="$new_path"
47968  # Check if we need to convert this using DOS-style short mode. If the path
47969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47970  # take no chances and rewrite it.
47971  # Note: m4 eats our [], so we need to use [ and ] instead.
47972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47973  if test "x$has_forbidden_chars" != x; then
47974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47976  fi
47977
47978
47979  windows_path="$new_path"
47980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47981    unix_path=`$CYGPATH -u "$windows_path"`
47982    new_path="$unix_path"
47983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47985    new_path="$unix_path"
47986  fi
47987
47988  if test "x$path" != "x$new_path"; then
47989    FREETYPE_INCLUDE_PATH="$new_path"
47990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47991$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47992  fi
47993
47994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47996
47997    else
47998      # We're on a unix platform. Hooray! :)
47999      path="$FREETYPE_INCLUDE_PATH"
48000      has_space=`$ECHO "$path" | $GREP " "`
48001      if test "x$has_space" != x; then
48002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48003$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48005      fi
48006
48007      # Use eval to expand a potential ~
48008      eval path="$path"
48009      if test ! -f "$path" && test ! -d "$path"; then
48010        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48011      fi
48012
48013      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48014    fi
48015  fi
48016
48017      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48018        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48019      else
48020        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48021      fi
48022    fi
48023
48024    if test "x$FREETYPE_LIBS" = x; then
48025
48026  # Only process if variable expands to non-empty
48027
48028  if test "x$FREETYPE_LIB_PATH" != x; then
48029    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48030
48031  # Input might be given as Windows format, start by converting to
48032  # unix format.
48033  path="$FREETYPE_LIB_PATH"
48034  new_path=`$CYGPATH -u "$path"`
48035
48036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48039  # "foo.exe" is OK but "foo" is an error.
48040  #
48041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48042  # It is also a way to make sure we got the proper file name for the real test later on.
48043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48044  if test "x$test_shortpath" = x; then
48045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48046$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48047    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48048  fi
48049
48050  # Call helper function which possibly converts this using DOS-style short mode.
48051  # If so, the updated path is stored in $new_path.
48052
48053  input_path="$new_path"
48054  # Check if we need to convert this using DOS-style short mode. If the path
48055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48056  # take no chances and rewrite it.
48057  # Note: m4 eats our [], so we need to use [ and ] instead.
48058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48059  if test "x$has_forbidden_chars" != x; then
48060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48064      # Going to short mode and back again did indeed matter. Since short mode is
48065      # case insensitive, let's make it lowercase to improve readability.
48066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48067      # Now convert it back to Unix-style (cygpath)
48068      input_path=`$CYGPATH -u "$shortmode_path"`
48069      new_path="$input_path"
48070    fi
48071  fi
48072
48073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48074  if test "x$test_cygdrive_prefix" = x; then
48075    # As a simple fix, exclude /usr/bin since it's not a real path.
48076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48078      # a path prefixed by /cygdrive for fixpath to work.
48079      new_path="$CYGWIN_ROOT_PATH$input_path"
48080    fi
48081  fi
48082
48083
48084  if test "x$path" != "x$new_path"; then
48085    FREETYPE_LIB_PATH="$new_path"
48086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48087$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48088  fi
48089
48090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48091
48092  path="$FREETYPE_LIB_PATH"
48093  has_colon=`$ECHO $path | $GREP ^.:`
48094  new_path="$path"
48095  if test "x$has_colon" = x; then
48096    # Not in mixed or Windows style, start by that.
48097    new_path=`cmd //c echo $path`
48098  fi
48099
48100
48101  input_path="$new_path"
48102  # Check if we need to convert this using DOS-style short mode. If the path
48103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48104  # take no chances and rewrite it.
48105  # Note: m4 eats our [], so we need to use [ and ] instead.
48106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48107  if test "x$has_forbidden_chars" != x; then
48108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48110  fi
48111
48112
48113  windows_path="$new_path"
48114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48115    unix_path=`$CYGPATH -u "$windows_path"`
48116    new_path="$unix_path"
48117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48119    new_path="$unix_path"
48120  fi
48121
48122  if test "x$path" != "x$new_path"; then
48123    FREETYPE_LIB_PATH="$new_path"
48124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48125$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48126  fi
48127
48128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48130
48131    else
48132      # We're on a unix platform. Hooray! :)
48133      path="$FREETYPE_LIB_PATH"
48134      has_space=`$ECHO "$path" | $GREP " "`
48135      if test "x$has_space" != x; then
48136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48137$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48138        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48139      fi
48140
48141      # Use eval to expand a potential ~
48142      eval path="$path"
48143      if test ! -f "$path" && test ! -d "$path"; then
48144        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48145      fi
48146
48147      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48148    fi
48149  fi
48150
48151      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48152        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48153      else
48154        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48155      fi
48156    fi
48157
48158    # Try to compile it
48159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48160$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48161    ac_ext=cpp
48162ac_cpp='$CXXCPP $CPPFLAGS'
48163ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48164ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48165ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48166
48167    PREV_CXXCFLAGS="$CXXFLAGS"
48168    PREV_LIBS="$LIBS"
48169    PREV_CXX="$CXX"
48170    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48171    LIBS="$LIBS $FREETYPE_LIBS"
48172    CXX="$FIXPATH $CXX"
48173    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48174/* end confdefs.h.  */
48175
48176          #include<ft2build.h>
48177          #include FT_FREETYPE_H
48178          int main () {
48179            FT_Init_FreeType(NULL);
48180            return 0;
48181          }
48182
48183_ACEOF
48184if ac_fn_cxx_try_link "$LINENO"; then :
48185
48186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48187$as_echo "yes" >&6; }
48188
48189else
48190
48191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48192$as_echo "no" >&6; }
48193          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48194$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48195          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48196$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48197
48198
48199  # Print a helpful message on how to acquire the necessary build dependency.
48200  # freetype is the help tag: freetype, cups, pulse, alsa etc
48201  MISSING_DEPENDENCY=freetype
48202
48203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48204    cygwin_help $MISSING_DEPENDENCY
48205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48206    msys_help $MISSING_DEPENDENCY
48207  else
48208    PKGHANDLER_COMMAND=
48209
48210    case $PKGHANDLER in
48211      apt-get)
48212        apt_help     $MISSING_DEPENDENCY ;;
48213      yum)
48214        yum_help     $MISSING_DEPENDENCY ;;
48215      port)
48216        port_help    $MISSING_DEPENDENCY ;;
48217      pkgutil)
48218        pkgutil_help $MISSING_DEPENDENCY ;;
48219      pkgadd)
48220        pkgadd_help  $MISSING_DEPENDENCY ;;
48221    esac
48222
48223    if test "x$PKGHANDLER_COMMAND" != x; then
48224      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48225    fi
48226  fi
48227
48228
48229          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48230
48231
48232fi
48233rm -f core conftest.err conftest.$ac_objext \
48234    conftest$ac_exeext conftest.$ac_ext
48235    CXXCFLAGS="$PREV_CXXFLAGS"
48236    LIBS="$PREV_LIBS"
48237    CXX="$PREV_CXX"
48238    ac_ext=cpp
48239ac_cpp='$CXXCPP $CPPFLAGS'
48240ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48241ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48242ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48243
48244
48245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48246$as_echo_n "checking if we should bundle freetype... " >&6; }
48247    if test "x$BUNDLE_FREETYPE" = xyes; then
48248      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48249    fi
48250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48251$as_echo "$BUNDLE_FREETYPE" >&6; }
48252
48253  fi # end freetype needed
48254
48255
48256
48257
48258
48259
48260
48261  ###############################################################################
48262  #
48263  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48264  #
48265
48266# Check whether --with-alsa was given.
48267if test "${with_alsa+set}" = set; then :
48268  withval=$with_alsa;
48269fi
48270
48271
48272# Check whether --with-alsa-include was given.
48273if test "${with_alsa_include+set}" = set; then :
48274  withval=$with_alsa_include;
48275fi
48276
48277
48278# Check whether --with-alsa-lib was given.
48279if test "${with_alsa_lib+set}" = set; then :
48280  withval=$with_alsa_lib;
48281fi
48282
48283
48284  if test "x$ALSA_NOT_NEEDED" = xyes; then
48285    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48286      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48287$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48288    fi
48289    ALSA_CFLAGS=
48290    ALSA_LIBS=
48291  else
48292    ALSA_FOUND=no
48293
48294    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48295      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48296    fi
48297
48298    if test "x${with_alsa}" != x; then
48299      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48300      ALSA_CFLAGS="-I${with_alsa}/include"
48301      ALSA_FOUND=yes
48302    fi
48303    if test "x${with_alsa_include}" != x; then
48304      ALSA_CFLAGS="-I${with_alsa_include}"
48305      ALSA_FOUND=yes
48306    fi
48307    if test "x${with_alsa_lib}" != x; then
48308      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48309      ALSA_FOUND=yes
48310    fi
48311    if test "x$ALSA_FOUND" = xno; then
48312
48313
48314  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48315    # Source the builddeps file again, to make sure it uses the latest variables!
48316    . $builddepsfile
48317    # Look for a target and build machine specific resource!
48318    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48319    if test "x$resource" = x; then
48320      # Ok, lets instead look for a target specific resource
48321      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48322    fi
48323    if test "x$resource" = x; then
48324      # Ok, lets instead look for a build specific resource
48325      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48326    fi
48327    if test "x$resource" = x; then
48328      # Ok, lets instead look for a generic resource
48329      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48330      resource=${builddep_alsa}
48331    fi
48332    if test "x$resource" != x; then
48333      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48334$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48335      # If the resource in the builddeps.conf file is an existing directory,
48336      # for example /java/linux/cups
48337      if test -d ${resource}; then
48338        depdir=${resource}
48339      else
48340
48341  # alsa is for example mymodule
48342  # $resource is for example libs/general/libmymod_1_2_3.zip
48343  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48344  # $with_builddeps_dir is for example /localhome/builddeps
48345  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48346  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48347  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48348  filename=`basename $resource`
48349  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48350  filebase=${filename%%.*}
48351  extension=${filename#*.}
48352  installdir=$with_builddeps_dir/$filebase
48353  if test ! -f $installdir/$filename.unpacked; then
48354    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48355$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48356    if test ! -d $installdir; then
48357      mkdir -p $installdir
48358    fi
48359    if test ! -d $installdir; then
48360      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48361    fi
48362    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48363    touch $tmpfile
48364    if test ! -f $tmpfile; then
48365      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48366    fi
48367
48368  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48369  # $tmpfile is the local file name for the downloaded file.
48370  VALID_TOOL=no
48371  if test "x$BDEPS_FTP" = xwget; then
48372    VALID_TOOL=yes
48373    wget -O $tmpfile $with_builddeps_server/$resource
48374  fi
48375  if test "x$BDEPS_FTP" = xlftp; then
48376    VALID_TOOL=yes
48377    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48378  fi
48379  if test "x$BDEPS_FTP" = xftp; then
48380    VALID_TOOL=yes
48381    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48382    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48383    FTPUSERPWD=${FTPSERVER%%@*}
48384    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48385      FTPUSER=${userpwd%%:*}
48386      FTPPWD=${userpwd#*@}
48387      FTPSERVER=${FTPSERVER#*@}
48388    else
48389      FTPUSER=ftp
48390      FTPPWD=ftp
48391    fi
48392    # the "pass" command does not work on some
48393    # ftp clients (read ftp.exe) but if it works,
48394    # passive mode is better!
48395    ( \
48396        echo "user $FTPUSER $FTPPWD"        ; \
48397        echo "pass"                         ; \
48398        echo "bin"                          ; \
48399        echo "get $FTPPATH $tmpfile"              ; \
48400    ) | ftp -in $FTPSERVER
48401  fi
48402  if test "x$VALID_TOOL" != xyes; then
48403    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48404  fi
48405
48406    mv $tmpfile $installdir/$filename
48407    if test ! -s $installdir/$filename; then
48408      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48409    fi
48410    case "$extension" in
48411      zip)  echo "Unzipping $installdir/$filename..."
48412        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48413        ;;
48414      tar.gz) echo "Untaring $installdir/$filename..."
48415        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48416        ;;
48417      tgz) echo "Untaring $installdir/$filename..."
48418        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48419        ;;
48420      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48421        ;;
48422    esac
48423  fi
48424  if test -f $installdir/$filename.unpacked; then
48425    depdir=$installdir
48426  fi
48427
48428      fi
48429      # Source the builddeps file again, because in the previous command, the depdir
48430      # was updated to point at the current build dependency install directory.
48431      . $builddepsfile
48432      # Now extract variables from the builddeps.conf files.
48433      theroot=${builddep_alsa_ROOT}
48434      thecflags=${builddep_alsa_CFLAGS}
48435      thelibs=${builddep_alsa_LIBS}
48436      if test "x$depdir" = x; then
48437        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48438      fi
48439      ALSA=$depdir
48440      if test "x$theroot" != x; then
48441        ALSA="$theroot"
48442      fi
48443      if test "x$thecflags" != x; then
48444        ALSA_CFLAGS="$thecflags"
48445      fi
48446      if test "x$thelibs" != x; then
48447        ALSA_LIBS="$thelibs"
48448      fi
48449      ALSA_FOUND=yes
48450      else ALSA_FOUND=no
48451
48452    fi
48453    else ALSA_FOUND=no
48454
48455  fi
48456
48457    fi
48458    # Do not try pkg-config if we have a sysroot set.
48459    if test "x$SYSROOT" = x; then
48460      if test "x$ALSA_FOUND" = xno; then
48461
48462pkg_failed=no
48463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48464$as_echo_n "checking for ALSA... " >&6; }
48465
48466if test -n "$ALSA_CFLAGS"; then
48467    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48468 elif test -n "$PKG_CONFIG"; then
48469    if test -n "$PKG_CONFIG" && \
48470    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48471  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48472  ac_status=$?
48473  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48474  test $ac_status = 0; }; then
48475  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48476else
48477  pkg_failed=yes
48478fi
48479 else
48480    pkg_failed=untried
48481fi
48482if test -n "$ALSA_LIBS"; then
48483    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48484 elif test -n "$PKG_CONFIG"; then
48485    if test -n "$PKG_CONFIG" && \
48486    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48487  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48488  ac_status=$?
48489  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48490  test $ac_status = 0; }; then
48491  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48492else
48493  pkg_failed=yes
48494fi
48495 else
48496    pkg_failed=untried
48497fi
48498
48499
48500
48501if test $pkg_failed = yes; then
48502
48503if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48504        _pkg_short_errors_supported=yes
48505else
48506        _pkg_short_errors_supported=no
48507fi
48508        if test $_pkg_short_errors_supported = yes; then
48509	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48510        else
48511	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48512        fi
48513	# Put the nasty error message in config.log where it belongs
48514	echo "$ALSA_PKG_ERRORS" >&5
48515
48516	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48517$as_echo "no" >&6; }
48518                ALSA_FOUND=no
48519elif test $pkg_failed = untried; then
48520	ALSA_FOUND=no
48521else
48522	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48523	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48525$as_echo "yes" >&6; }
48526	ALSA_FOUND=yes
48527fi
48528      fi
48529    fi
48530    if test "x$ALSA_FOUND" = xno; then
48531      for ac_header in alsa/asoundlib.h
48532do :
48533  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48534if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48535  cat >>confdefs.h <<_ACEOF
48536#define HAVE_ALSA_ASOUNDLIB_H 1
48537_ACEOF
48538
48539            ALSA_FOUND=yes
48540            ALSA_CFLAGS=-Iignoreme
48541            ALSA_LIBS=-lasound
48542            DEFAULT_ALSA=yes
48543
48544else
48545  ALSA_FOUND=no
48546fi
48547
48548done
48549
48550    fi
48551    if test "x$ALSA_FOUND" = xno; then
48552
48553  # Print a helpful message on how to acquire the necessary build dependency.
48554  # alsa is the help tag: freetype, cups, pulse, alsa etc
48555  MISSING_DEPENDENCY=alsa
48556
48557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48558    cygwin_help $MISSING_DEPENDENCY
48559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48560    msys_help $MISSING_DEPENDENCY
48561  else
48562    PKGHANDLER_COMMAND=
48563
48564    case $PKGHANDLER in
48565      apt-get)
48566        apt_help     $MISSING_DEPENDENCY ;;
48567      yum)
48568        yum_help     $MISSING_DEPENDENCY ;;
48569      port)
48570        port_help    $MISSING_DEPENDENCY ;;
48571      pkgutil)
48572        pkgutil_help $MISSING_DEPENDENCY ;;
48573      pkgadd)
48574        pkgadd_help  $MISSING_DEPENDENCY ;;
48575    esac
48576
48577    if test "x$PKGHANDLER_COMMAND" != x; then
48578      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48579    fi
48580  fi
48581
48582      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48583    fi
48584  fi
48585
48586
48587
48588
48589
48590
48591  ###############################################################################
48592  #
48593  # Check for the jpeg library
48594  #
48595
48596
48597# Check whether --with-libjpeg was given.
48598if test "${with_libjpeg+set}" = set; then :
48599  withval=$with_libjpeg;
48600fi
48601
48602
48603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48604$as_echo_n "checking for which libjpeg to use... " >&6; }
48605
48606  # default is bundled
48607  DEFAULT_LIBJPEG=bundled
48608
48609  #
48610  # if user didn't specify, use DEFAULT_LIBJPEG
48611  #
48612  if test "x${with_libjpeg}" = "x"; then
48613    with_libjpeg=${DEFAULT_LIBJPEG}
48614  fi
48615
48616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48617$as_echo "${with_libjpeg}" >&6; }
48618
48619  if test "x${with_libjpeg}" = "xbundled"; then
48620    USE_EXTERNAL_LIBJPEG=false
48621  elif test "x${with_libjpeg}" = "xsystem"; then
48622    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48623if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48624
48625else
48626   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48627fi
48628
48629
48630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48631$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48632if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48633  $as_echo_n "(cached) " >&6
48634else
48635  ac_check_lib_save_LIBS=$LIBS
48636LIBS="-ljpeg  $LIBS"
48637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48638/* end confdefs.h.  */
48639
48640/* Override any GCC internal prototype to avoid an error.
48641   Use char because int might match the return type of a GCC
48642   builtin and then its argument prototype would still apply.  */
48643#ifdef __cplusplus
48644extern "C"
48645#endif
48646char jpeg_CreateDecompress ();
48647int
48648main ()
48649{
48650return jpeg_CreateDecompress ();
48651  ;
48652  return 0;
48653}
48654_ACEOF
48655if ac_fn_cxx_try_link "$LINENO"; then :
48656  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48657else
48658  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48659fi
48660rm -f core conftest.err conftest.$ac_objext \
48661    conftest$ac_exeext conftest.$ac_ext
48662LIBS=$ac_check_lib_save_LIBS
48663fi
48664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48665$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48666if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48667  cat >>confdefs.h <<_ACEOF
48668#define HAVE_LIBJPEG 1
48669_ACEOF
48670
48671  LIBS="-ljpeg $LIBS"
48672
48673else
48674   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48675fi
48676
48677
48678    USE_EXTERNAL_LIBJPEG=true
48679  else
48680    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48681  fi
48682
48683
48684
48685  ###############################################################################
48686  #
48687  # Check for the gif library
48688  #
48689
48690
48691# Check whether --with-giflib was given.
48692if test "${with_giflib+set}" = set; then :
48693  withval=$with_giflib;
48694fi
48695
48696
48697
48698  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48699$as_echo_n "checking for which giflib to use... " >&6; }
48700
48701  # default is bundled
48702  DEFAULT_GIFLIB=bundled
48703
48704  #
48705  # if user didn't specify, use DEFAULT_GIFLIB
48706  #
48707  if test "x${with_giflib}" = "x"; then
48708    with_giflib=${DEFAULT_GIFLIB}
48709  fi
48710
48711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48712$as_echo "${with_giflib}" >&6; }
48713
48714  if test "x${with_giflib}" = "xbundled"; then
48715    USE_EXTERNAL_LIBGIF=false
48716  elif test "x${with_giflib}" = "xsystem"; then
48717    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48718if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48719
48720else
48721   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48722fi
48723
48724
48725    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48726$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48727if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48728  $as_echo_n "(cached) " >&6
48729else
48730  ac_check_lib_save_LIBS=$LIBS
48731LIBS="-lgif  $LIBS"
48732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48733/* end confdefs.h.  */
48734
48735/* Override any GCC internal prototype to avoid an error.
48736   Use char because int might match the return type of a GCC
48737   builtin and then its argument prototype would still apply.  */
48738#ifdef __cplusplus
48739extern "C"
48740#endif
48741char DGifGetCode ();
48742int
48743main ()
48744{
48745return DGifGetCode ();
48746  ;
48747  return 0;
48748}
48749_ACEOF
48750if ac_fn_cxx_try_link "$LINENO"; then :
48751  ac_cv_lib_gif_DGifGetCode=yes
48752else
48753  ac_cv_lib_gif_DGifGetCode=no
48754fi
48755rm -f core conftest.err conftest.$ac_objext \
48756    conftest$ac_exeext conftest.$ac_ext
48757LIBS=$ac_check_lib_save_LIBS
48758fi
48759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48760$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48761if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48762  cat >>confdefs.h <<_ACEOF
48763#define HAVE_LIBGIF 1
48764_ACEOF
48765
48766  LIBS="-lgif $LIBS"
48767
48768else
48769   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48770fi
48771
48772
48773    USE_EXTERNAL_LIBGIF=true
48774  else
48775    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48776  fi
48777
48778
48779  ###############################################################################
48780  #
48781  # Check for the lcms2 library
48782  #
48783
48784
48785# Check whether --with-lcms was given.
48786if test "${with_lcms+set}" = set; then :
48787  withval=$with_lcms;
48788fi
48789
48790
48791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48792$as_echo_n "checking for which lcms to use... " >&6; }
48793
48794  DEFAULT_LCMS=bundled
48795
48796  #
48797  # If user didn't specify, use DEFAULT_LCMS
48798  #
48799  if test "x${with_lcms}" = "x"; then
48800      with_lcms=${DEFAULT_LCMS}
48801  fi
48802
48803  if test "x${with_lcms}" = "xbundled"; then
48804    USE_EXTERNAL_LCMS=false
48805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48806$as_echo "bundled" >&6; }
48807  elif test "x${with_lcms}" = "xsystem"; then
48808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48809$as_echo "system" >&6; }
48810
48811pkg_failed=no
48812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48813$as_echo_n "checking for LCMS... " >&6; }
48814
48815if test -n "$LCMS_CFLAGS"; then
48816    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48817 elif test -n "$PKG_CONFIG"; then
48818    if test -n "$PKG_CONFIG" && \
48819    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48820  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48821  ac_status=$?
48822  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48823  test $ac_status = 0; }; then
48824  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48825else
48826  pkg_failed=yes
48827fi
48828 else
48829    pkg_failed=untried
48830fi
48831if test -n "$LCMS_LIBS"; then
48832    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48833 elif test -n "$PKG_CONFIG"; then
48834    if test -n "$PKG_CONFIG" && \
48835    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48836  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48837  ac_status=$?
48838  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48839  test $ac_status = 0; }; then
48840  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48841else
48842  pkg_failed=yes
48843fi
48844 else
48845    pkg_failed=untried
48846fi
48847
48848
48849
48850if test $pkg_failed = yes; then
48851
48852if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48853        _pkg_short_errors_supported=yes
48854else
48855        _pkg_short_errors_supported=no
48856fi
48857        if test $_pkg_short_errors_supported = yes; then
48858	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48859        else
48860	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48861        fi
48862	# Put the nasty error message in config.log where it belongs
48863	echo "$LCMS_PKG_ERRORS" >&5
48864
48865	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48866$as_echo "no" >&6; }
48867                LCMS_FOUND=no
48868elif test $pkg_failed = untried; then
48869	LCMS_FOUND=no
48870else
48871	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48872	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48874$as_echo "yes" >&6; }
48875	LCMS_FOUND=yes
48876fi
48877    if test "x${LCMS_FOUND}" = "xyes"; then
48878      USE_EXTERNAL_LCMS=true
48879    else
48880      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48881    fi
48882  else
48883    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48884  fi
48885
48886
48887
48888  ###############################################################################
48889  #
48890  # Check for the png library
48891  #
48892
48893
48894# Check whether --with-libpng was given.
48895if test "${with_libpng+set}" = set; then :
48896  withval=$with_libpng;
48897fi
48898
48899
48900
48901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48902$as_echo_n "checking for which libpng to use... " >&6; }
48903
48904  # default is bundled
48905  DEFAULT_LIBPNG=bundled
48906
48907  #
48908  # if user didn't specify, use DEFAULT_LIBPNG
48909  #
48910  if test "x${with_libpng}" = "x"; then
48911      with_libpng=${DEFAULT_LIBPNG}
48912  fi
48913
48914  if test "x${with_libpng}" = "xbundled"; then
48915      USE_EXTERNAL_LIBPNG=false
48916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48917$as_echo "bundled" >&6; }
48918  elif test "x${with_libpng}" = "xsystem"; then
48919
48920pkg_failed=no
48921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48922$as_echo_n "checking for PNG... " >&6; }
48923
48924if test -n "$PNG_CFLAGS"; then
48925    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48926 elif test -n "$PKG_CONFIG"; then
48927    if test -n "$PKG_CONFIG" && \
48928    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48929  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48930  ac_status=$?
48931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48932  test $ac_status = 0; }; then
48933  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48934else
48935  pkg_failed=yes
48936fi
48937 else
48938    pkg_failed=untried
48939fi
48940if test -n "$PNG_LIBS"; then
48941    pkg_cv_PNG_LIBS="$PNG_LIBS"
48942 elif test -n "$PKG_CONFIG"; then
48943    if test -n "$PKG_CONFIG" && \
48944    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48945  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48946  ac_status=$?
48947  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48948  test $ac_status = 0; }; then
48949  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48950else
48951  pkg_failed=yes
48952fi
48953 else
48954    pkg_failed=untried
48955fi
48956
48957
48958
48959if test $pkg_failed = yes; then
48960
48961if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48962        _pkg_short_errors_supported=yes
48963else
48964        _pkg_short_errors_supported=no
48965fi
48966        if test $_pkg_short_errors_supported = yes; then
48967	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48968        else
48969	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48970        fi
48971	# Put the nasty error message in config.log where it belongs
48972	echo "$PNG_PKG_ERRORS" >&5
48973
48974	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48975$as_echo "no" >&6; }
48976                 LIBPNG_FOUND=no
48977elif test $pkg_failed = untried; then
48978	 LIBPNG_FOUND=no
48979else
48980	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48981	PNG_LIBS=$pkg_cv_PNG_LIBS
48982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48983$as_echo "yes" >&6; }
48984	 LIBPNG_FOUND=yes
48985fi
48986      if test "x${LIBPNG_FOUND}" = "xyes"; then
48987          USE_EXTERNAL_LIBPNG=true
48988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48989$as_echo "system" >&6; }
48990      else
48991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48992$as_echo "system not found" >&6; }
48993          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48994      fi
48995  else
48996      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48997  fi
48998
48999
49000  ###############################################################################
49001  #
49002  # Check for the zlib library
49003  #
49004
49005
49006# Check whether --with-zlib was given.
49007if test "${with_zlib+set}" = set; then :
49008  withval=$with_zlib;
49009fi
49010
49011
49012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49013$as_echo_n "checking for compress in -lz... " >&6; }
49014if ${ac_cv_lib_z_compress+:} false; then :
49015  $as_echo_n "(cached) " >&6
49016else
49017  ac_check_lib_save_LIBS=$LIBS
49018LIBS="-lz  $LIBS"
49019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49020/* end confdefs.h.  */
49021
49022/* Override any GCC internal prototype to avoid an error.
49023   Use char because int might match the return type of a GCC
49024   builtin and then its argument prototype would still apply.  */
49025#ifdef __cplusplus
49026extern "C"
49027#endif
49028char compress ();
49029int
49030main ()
49031{
49032return compress ();
49033  ;
49034  return 0;
49035}
49036_ACEOF
49037if ac_fn_cxx_try_link "$LINENO"; then :
49038  ac_cv_lib_z_compress=yes
49039else
49040  ac_cv_lib_z_compress=no
49041fi
49042rm -f core conftest.err conftest.$ac_objext \
49043    conftest$ac_exeext conftest.$ac_ext
49044LIBS=$ac_check_lib_save_LIBS
49045fi
49046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49047$as_echo "$ac_cv_lib_z_compress" >&6; }
49048if test "x$ac_cv_lib_z_compress" = xyes; then :
49049   ZLIB_FOUND=yes
49050else
49051   ZLIB_FOUND=no
49052fi
49053
49054
49055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49056$as_echo_n "checking for which zlib to use... " >&6; }
49057
49058  DEFAULT_ZLIB=bundled
49059  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49060    #
49061    # On macosx default is system...on others default is
49062    #
49063    DEFAULT_ZLIB=system
49064  fi
49065
49066  if test "x${ZLIB_FOUND}" != "xyes"; then
49067    #
49068    # If we don't find any system...set default to bundled
49069    #
49070    DEFAULT_ZLIB=bundled
49071  fi
49072
49073  #
49074  # If user didn't specify, use DEFAULT_ZLIB
49075  #
49076  if test "x${with_zlib}" = "x"; then
49077    with_zlib=${DEFAULT_ZLIB}
49078  fi
49079
49080  if test "x${with_zlib}" = "xbundled"; then
49081    USE_EXTERNAL_LIBZ=false
49082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49083$as_echo "bundled" >&6; }
49084  elif test "x${with_zlib}" = "xsystem"; then
49085    if test "x${ZLIB_FOUND}" = "xyes"; then
49086      USE_EXTERNAL_LIBZ=true
49087      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49088$as_echo "system" >&6; }
49089    else
49090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49091$as_echo "system not found" >&6; }
49092      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49093    fi
49094  else
49095    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49096  fi
49097
49098
49099
49100  ###############################################################################
49101  LIBZIP_CAN_USE_MMAP=true
49102
49103
49104
49105  ###############################################################################
49106  #
49107  # Check if altzone exists in time.h
49108  #
49109
49110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49111/* end confdefs.h.  */
49112#include <time.h>
49113int
49114main ()
49115{
49116return (int)altzone;
49117  ;
49118  return 0;
49119}
49120_ACEOF
49121if ac_fn_cxx_try_link "$LINENO"; then :
49122  has_altzone=yes
49123else
49124  has_altzone=no
49125fi
49126rm -f core conftest.err conftest.$ac_objext \
49127    conftest$ac_exeext conftest.$ac_ext
49128  if test "x$has_altzone" = xyes; then
49129
49130$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49131
49132  fi
49133
49134  ###############################################################################
49135  #
49136  # Check the maths library
49137  #
49138
49139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49140$as_echo_n "checking for cos in -lm... " >&6; }
49141if ${ac_cv_lib_m_cos+:} false; then :
49142  $as_echo_n "(cached) " >&6
49143else
49144  ac_check_lib_save_LIBS=$LIBS
49145LIBS="-lm  $LIBS"
49146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49147/* end confdefs.h.  */
49148
49149/* Override any GCC internal prototype to avoid an error.
49150   Use char because int might match the return type of a GCC
49151   builtin and then its argument prototype would still apply.  */
49152#ifdef __cplusplus
49153extern "C"
49154#endif
49155char cos ();
49156int
49157main ()
49158{
49159return cos ();
49160  ;
49161  return 0;
49162}
49163_ACEOF
49164if ac_fn_cxx_try_link "$LINENO"; then :
49165  ac_cv_lib_m_cos=yes
49166else
49167  ac_cv_lib_m_cos=no
49168fi
49169rm -f core conftest.err conftest.$ac_objext \
49170    conftest$ac_exeext conftest.$ac_ext
49171LIBS=$ac_check_lib_save_LIBS
49172fi
49173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49174$as_echo "$ac_cv_lib_m_cos" >&6; }
49175if test "x$ac_cv_lib_m_cos" = xyes; then :
49176  cat >>confdefs.h <<_ACEOF
49177#define HAVE_LIBM 1
49178_ACEOF
49179
49180  LIBS="-lm $LIBS"
49181
49182else
49183
49184        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49185$as_echo "$as_me: Maths library was not found" >&6;}
49186
49187
49188fi
49189
49190
49191
49192  ###############################################################################
49193  #
49194  # Check for libdl.so
49195
49196  save_LIBS="$LIBS"
49197  LIBS=""
49198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49199$as_echo_n "checking for dlopen in -ldl... " >&6; }
49200if ${ac_cv_lib_dl_dlopen+:} false; then :
49201  $as_echo_n "(cached) " >&6
49202else
49203  ac_check_lib_save_LIBS=$LIBS
49204LIBS="-ldl  $LIBS"
49205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49206/* end confdefs.h.  */
49207
49208/* Override any GCC internal prototype to avoid an error.
49209   Use char because int might match the return type of a GCC
49210   builtin and then its argument prototype would still apply.  */
49211#ifdef __cplusplus
49212extern "C"
49213#endif
49214char dlopen ();
49215int
49216main ()
49217{
49218return dlopen ();
49219  ;
49220  return 0;
49221}
49222_ACEOF
49223if ac_fn_cxx_try_link "$LINENO"; then :
49224  ac_cv_lib_dl_dlopen=yes
49225else
49226  ac_cv_lib_dl_dlopen=no
49227fi
49228rm -f core conftest.err conftest.$ac_objext \
49229    conftest$ac_exeext conftest.$ac_ext
49230LIBS=$ac_check_lib_save_LIBS
49231fi
49232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49233$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49234if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49235  cat >>confdefs.h <<_ACEOF
49236#define HAVE_LIBDL 1
49237_ACEOF
49238
49239  LIBS="-ldl $LIBS"
49240
49241fi
49242
49243  LIBDL="$LIBS"
49244
49245  LIBS="$save_LIBS"
49246
49247
49248  ###############################################################################
49249  #
49250  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49251  # dynamic build is configured on command line.
49252  #
49253
49254# Check whether --with-stdc++lib was given.
49255if test "${with_stdc__lib+set}" = set; then :
49256  withval=$with_stdc__lib;
49257        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49258                && test "x$with_stdc__lib" != xdefault; then
49259          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49260        fi
49261
49262else
49263  with_stdc__lib=default
49264
49265fi
49266
49267
49268  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49269    # Test if -lstdc++ works.
49270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49271$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49272    ac_ext=cpp
49273ac_cpp='$CXXCPP $CPPFLAGS'
49274ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49275ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49276ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49277
49278    OLD_CXXFLAGS="$CXXFLAGS"
49279    CXXFLAGS="$CXXFLAGS -lstdc++"
49280    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49281/* end confdefs.h.  */
49282
49283int
49284main ()
49285{
49286return 0;
49287  ;
49288  return 0;
49289}
49290_ACEOF
49291if ac_fn_cxx_try_link "$LINENO"; then :
49292  has_dynamic_libstdcxx=yes
49293else
49294  has_dynamic_libstdcxx=no
49295fi
49296rm -f core conftest.err conftest.$ac_objext \
49297    conftest$ac_exeext conftest.$ac_ext
49298    CXXFLAGS="$OLD_CXXFLAGS"
49299    ac_ext=cpp
49300ac_cpp='$CXXCPP $CPPFLAGS'
49301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49304
49305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49306$as_echo "$has_dynamic_libstdcxx" >&6; }
49307
49308    # Test if stdc++ can be linked statically.
49309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49310$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49311    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49312    ac_ext=cpp
49313ac_cpp='$CXXCPP $CPPFLAGS'
49314ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49315ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49316ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49317
49318    OLD_LIBS="$LIBS"
49319    OLD_CXX="$CXX"
49320    LIBS="$STATIC_STDCXX_FLAGS"
49321    CXX="$CC"
49322    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49323/* end confdefs.h.  */
49324
49325int
49326main ()
49327{
49328return 0;
49329  ;
49330  return 0;
49331}
49332_ACEOF
49333if ac_fn_cxx_try_link "$LINENO"; then :
49334  has_static_libstdcxx=yes
49335else
49336  has_static_libstdcxx=no
49337fi
49338rm -f core conftest.err conftest.$ac_objext \
49339    conftest$ac_exeext conftest.$ac_ext
49340    LIBS="$OLD_LIBS"
49341    CXX="$OLD_CXX"
49342    ac_ext=cpp
49343ac_cpp='$CXXCPP $CPPFLAGS'
49344ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49345ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49346ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49347
49348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49349$as_echo "$has_static_libstdcxx" >&6; }
49350
49351    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49352      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49353    fi
49354
49355    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49356      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49357    fi
49358
49359    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49360      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49361    fi
49362
49363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49364$as_echo_n "checking how to link with libstdc++... " >&6; }
49365    # If dynamic was requested, it's available since it would fail above otherwise.
49366    # If dynamic wasn't requested, go with static unless it isn't available.
49367    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49368      LIBCXX="$LIBCXX -lstdc++"
49369      LDCXX="$CXX"
49370      STATIC_CXX_SETTING="STATIC_CXX=false"
49371      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49372$as_echo "dynamic" >&6; }
49373    else
49374      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49375      LDCXX="$CC"
49376      STATIC_CXX_SETTING="STATIC_CXX=true"
49377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49378$as_echo "static" >&6; }
49379    fi
49380  fi
49381
49382
49383  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49384    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49385
49386pkg_failed=no
49387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49388$as_echo_n "checking for LIBFFI... " >&6; }
49389
49390if test -n "$LIBFFI_CFLAGS"; then
49391    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49392 elif test -n "$PKG_CONFIG"; then
49393    if test -n "$PKG_CONFIG" && \
49394    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49395  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49396  ac_status=$?
49397  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49398  test $ac_status = 0; }; then
49399  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49400else
49401  pkg_failed=yes
49402fi
49403 else
49404    pkg_failed=untried
49405fi
49406if test -n "$LIBFFI_LIBS"; then
49407    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49408 elif test -n "$PKG_CONFIG"; then
49409    if test -n "$PKG_CONFIG" && \
49410    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49411  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49412  ac_status=$?
49413  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49414  test $ac_status = 0; }; then
49415  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49416else
49417  pkg_failed=yes
49418fi
49419 else
49420    pkg_failed=untried
49421fi
49422
49423
49424
49425if test $pkg_failed = yes; then
49426
49427if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49428        _pkg_short_errors_supported=yes
49429else
49430        _pkg_short_errors_supported=no
49431fi
49432        if test $_pkg_short_errors_supported = yes; then
49433	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49434        else
49435	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49436        fi
49437	# Put the nasty error message in config.log where it belongs
49438	echo "$LIBFFI_PKG_ERRORS" >&5
49439
49440	as_fn_error $? "Package requirements (libffi) were not met:
49441
49442$LIBFFI_PKG_ERRORS
49443
49444Consider adjusting the PKG_CONFIG_PATH environment variable if you
49445installed software in a non-standard prefix.
49446
49447Alternatively, you may set the environment variables LIBFFI_CFLAGS
49448and LIBFFI_LIBS to avoid the need to call pkg-config.
49449See the pkg-config man page for more details.
49450" "$LINENO" 5
49451elif test $pkg_failed = untried; then
49452	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49454as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49455is in your PATH or set the PKG_CONFIG environment variable to the full
49456path to pkg-config.
49457
49458Alternatively, you may set the environment variables LIBFFI_CFLAGS
49459and LIBFFI_LIBS to avoid the need to call pkg-config.
49460See the pkg-config man page for more details.
49461
49462To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49463See \`config.log' for more details" "$LINENO" 5; }
49464else
49465	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49466	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49468$as_echo "yes" >&6; }
49469	:
49470fi
49471
49472  fi
49473
49474  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49475    # Extract the first word of "llvm-config", so it can be a program name with args.
49476set dummy llvm-config; ac_word=$2
49477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49478$as_echo_n "checking for $ac_word... " >&6; }
49479if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49480  $as_echo_n "(cached) " >&6
49481else
49482  if test -n "$LLVM_CONFIG"; then
49483  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49484else
49485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49486for as_dir in $PATH
49487do
49488  IFS=$as_save_IFS
49489  test -z "$as_dir" && as_dir=.
49490    for ac_exec_ext in '' $ac_executable_extensions; do
49491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49492    ac_cv_prog_LLVM_CONFIG="llvm-config"
49493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49494    break 2
49495  fi
49496done
49497  done
49498IFS=$as_save_IFS
49499
49500fi
49501fi
49502LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49503if test -n "$LLVM_CONFIG"; then
49504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49505$as_echo "$LLVM_CONFIG" >&6; }
49506else
49507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49508$as_echo "no" >&6; }
49509fi
49510
49511
49512
49513    if test "x$LLVM_CONFIG" != xllvm-config; then
49514      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49515    fi
49516
49517    llvm_components="jit mcjit engine nativecodegen native"
49518    unset LLVM_CFLAGS
49519    for flag in $("$LLVM_CONFIG" --cxxflags); do
49520      if echo "${flag}" | grep -q '^-[ID]'; then
49521        if test "${flag}" != "-D_DEBUG" ; then
49522          if test "${LLVM_CFLAGS}" != "" ; then
49523            LLVM_CFLAGS="${LLVM_CFLAGS} "
49524          fi
49525          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49526        fi
49527      fi
49528    done
49529    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49530    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49531
49532    unset LLVM_LDFLAGS
49533    for flag in $("${LLVM_CONFIG}" --ldflags); do
49534      if echo "${flag}" | grep -q '^-L'; then
49535        if test "${LLVM_LDFLAGS}" != ""; then
49536          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49537        fi
49538        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49539      fi
49540    done
49541
49542    unset LLVM_LIBS
49543    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49544      if echo "${flag}" | grep -q '^-l'; then
49545        if test "${LLVM_LIBS}" != ""; then
49546          LLVM_LIBS="${LLVM_LIBS} "
49547        fi
49548        LLVM_LIBS="${LLVM_LIBS}${flag}"
49549      fi
49550    done
49551
49552
49553
49554
49555  fi
49556
49557  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49558  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49559    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49560  fi
49561
49562  # TODO better (platform agnostic) test
49563  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49564    LIBCXX="-lstdc++"
49565  fi
49566
49567
49568
49569
49570  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49571
49572
49573# Check whether --with-msvcr-dll was given.
49574if test "${with_msvcr_dll+set}" = set; then :
49575  withval=$with_msvcr_dll;
49576fi
49577
49578
49579  if test "x$with_msvcr_dll" != x; then
49580    # If given explicitely by user, do not probe. If not present, fail directly.
49581
49582  DLL_NAME="$MSVCR_NAME"
49583  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49584  METHOD="--with-msvcr-dll"
49585  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49587$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49588
49589    # Need to check if the found msvcr is correct architecture
49590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49591$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49592    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49594      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49595      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49596      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49597        CORRECT_MSVCR_ARCH="PE32 executable"
49598      else
49599        CORRECT_MSVCR_ARCH="PE32+ executable"
49600      fi
49601    else
49602      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49603        CORRECT_MSVCR_ARCH=386
49604      else
49605        CORRECT_MSVCR_ARCH=x86-64
49606      fi
49607    fi
49608    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49609      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49610$as_echo "ok" >&6; }
49611      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49612
49613  # Only process if variable expands to non-empty
49614
49615  if test "x$MSVC_DLL" != x; then
49616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49617
49618  # Input might be given as Windows format, start by converting to
49619  # unix format.
49620  path="$MSVC_DLL"
49621  new_path=`$CYGPATH -u "$path"`
49622
49623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49626  # "foo.exe" is OK but "foo" is an error.
49627  #
49628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49629  # It is also a way to make sure we got the proper file name for the real test later on.
49630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49631  if test "x$test_shortpath" = x; then
49632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49633$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49634    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49635  fi
49636
49637  # Call helper function which possibly converts this using DOS-style short mode.
49638  # If so, the updated path is stored in $new_path.
49639
49640  input_path="$new_path"
49641  # Check if we need to convert this using DOS-style short mode. If the path
49642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49643  # take no chances and rewrite it.
49644  # Note: m4 eats our [], so we need to use [ and ] instead.
49645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49646  if test "x$has_forbidden_chars" != x; then
49647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49651      # Going to short mode and back again did indeed matter. Since short mode is
49652      # case insensitive, let's make it lowercase to improve readability.
49653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49654      # Now convert it back to Unix-style (cygpath)
49655      input_path=`$CYGPATH -u "$shortmode_path"`
49656      new_path="$input_path"
49657    fi
49658  fi
49659
49660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49661  if test "x$test_cygdrive_prefix" = x; then
49662    # As a simple fix, exclude /usr/bin since it's not a real path.
49663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49665      # a path prefixed by /cygdrive for fixpath to work.
49666      new_path="$CYGWIN_ROOT_PATH$input_path"
49667    fi
49668  fi
49669
49670
49671  if test "x$path" != "x$new_path"; then
49672    MSVC_DLL="$new_path"
49673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49674$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49675  fi
49676
49677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49678
49679  path="$MSVC_DLL"
49680  has_colon=`$ECHO $path | $GREP ^.:`
49681  new_path="$path"
49682  if test "x$has_colon" = x; then
49683    # Not in mixed or Windows style, start by that.
49684    new_path=`cmd //c echo $path`
49685  fi
49686
49687
49688  input_path="$new_path"
49689  # Check if we need to convert this using DOS-style short mode. If the path
49690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49691  # take no chances and rewrite it.
49692  # Note: m4 eats our [], so we need to use [ and ] instead.
49693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49694  if test "x$has_forbidden_chars" != x; then
49695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49697  fi
49698
49699
49700  windows_path="$new_path"
49701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49702    unix_path=`$CYGPATH -u "$windows_path"`
49703    new_path="$unix_path"
49704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49706    new_path="$unix_path"
49707  fi
49708
49709  if test "x$path" != "x$new_path"; then
49710    MSVC_DLL="$new_path"
49711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49712$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49713  fi
49714
49715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49717
49718    else
49719      # We're on a unix platform. Hooray! :)
49720      path="$MSVC_DLL"
49721      has_space=`$ECHO "$path" | $GREP " "`
49722      if test "x$has_space" != x; then
49723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49724$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49726      fi
49727
49728      # Use eval to expand a potential ~
49729      eval path="$path"
49730      if test ! -f "$path" && test ! -d "$path"; then
49731        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49732      fi
49733
49734      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49735    fi
49736  fi
49737
49738      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49739$as_echo_n "checking for $DLL_NAME... " >&6; }
49740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49741$as_echo "$MSVC_DLL" >&6; }
49742    else
49743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49744$as_echo "incorrect, ignoring" >&6; }
49745      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49746$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49747    fi
49748  fi
49749
49750    if test "x$MSVC_DLL" = x; then
49751      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49752    fi
49753    MSVCR_DLL="$MSVC_DLL"
49754  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49755
49756  DLL_NAME="$MSVCR_NAME"
49757  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49758  METHOD="devkit"
49759  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49760    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49761$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49762
49763    # Need to check if the found msvcr is correct architecture
49764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49765$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49766    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49768      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49769      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49770      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49771        CORRECT_MSVCR_ARCH="PE32 executable"
49772      else
49773        CORRECT_MSVCR_ARCH="PE32+ executable"
49774      fi
49775    else
49776      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49777        CORRECT_MSVCR_ARCH=386
49778      else
49779        CORRECT_MSVCR_ARCH=x86-64
49780      fi
49781    fi
49782    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49784$as_echo "ok" >&6; }
49785      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49786
49787  # Only process if variable expands to non-empty
49788
49789  if test "x$MSVC_DLL" != x; then
49790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49791
49792  # Input might be given as Windows format, start by converting to
49793  # unix format.
49794  path="$MSVC_DLL"
49795  new_path=`$CYGPATH -u "$path"`
49796
49797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49800  # "foo.exe" is OK but "foo" is an error.
49801  #
49802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49803  # It is also a way to make sure we got the proper file name for the real test later on.
49804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49805  if test "x$test_shortpath" = x; then
49806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49807$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49808    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49809  fi
49810
49811  # Call helper function which possibly converts this using DOS-style short mode.
49812  # If so, the updated path is stored in $new_path.
49813
49814  input_path="$new_path"
49815  # Check if we need to convert this using DOS-style short mode. If the path
49816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49817  # take no chances and rewrite it.
49818  # Note: m4 eats our [], so we need to use [ and ] instead.
49819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49820  if test "x$has_forbidden_chars" != x; then
49821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49825      # Going to short mode and back again did indeed matter. Since short mode is
49826      # case insensitive, let's make it lowercase to improve readability.
49827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49828      # Now convert it back to Unix-style (cygpath)
49829      input_path=`$CYGPATH -u "$shortmode_path"`
49830      new_path="$input_path"
49831    fi
49832  fi
49833
49834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49835  if test "x$test_cygdrive_prefix" = x; then
49836    # As a simple fix, exclude /usr/bin since it's not a real path.
49837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49839      # a path prefixed by /cygdrive for fixpath to work.
49840      new_path="$CYGWIN_ROOT_PATH$input_path"
49841    fi
49842  fi
49843
49844
49845  if test "x$path" != "x$new_path"; then
49846    MSVC_DLL="$new_path"
49847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49848$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49849  fi
49850
49851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49852
49853  path="$MSVC_DLL"
49854  has_colon=`$ECHO $path | $GREP ^.:`
49855  new_path="$path"
49856  if test "x$has_colon" = x; then
49857    # Not in mixed or Windows style, start by that.
49858    new_path=`cmd //c echo $path`
49859  fi
49860
49861
49862  input_path="$new_path"
49863  # Check if we need to convert this using DOS-style short mode. If the path
49864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49865  # take no chances and rewrite it.
49866  # Note: m4 eats our [], so we need to use [ and ] instead.
49867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49868  if test "x$has_forbidden_chars" != x; then
49869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49871  fi
49872
49873
49874  windows_path="$new_path"
49875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49876    unix_path=`$CYGPATH -u "$windows_path"`
49877    new_path="$unix_path"
49878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49880    new_path="$unix_path"
49881  fi
49882
49883  if test "x$path" != "x$new_path"; then
49884    MSVC_DLL="$new_path"
49885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49886$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49887  fi
49888
49889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49891
49892    else
49893      # We're on a unix platform. Hooray! :)
49894      path="$MSVC_DLL"
49895      has_space=`$ECHO "$path" | $GREP " "`
49896      if test "x$has_space" != x; then
49897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49898$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49900      fi
49901
49902      # Use eval to expand a potential ~
49903      eval path="$path"
49904      if test ! -f "$path" && test ! -d "$path"; then
49905        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49906      fi
49907
49908      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49909    fi
49910  fi
49911
49912      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49913$as_echo_n "checking for $DLL_NAME... " >&6; }
49914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49915$as_echo "$MSVC_DLL" >&6; }
49916    else
49917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49918$as_echo "incorrect, ignoring" >&6; }
49919      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49920$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49921    fi
49922  fi
49923
49924    if test "x$MSVC_DLL" = x; then
49925      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49926    fi
49927    MSVCR_DLL="$MSVC_DLL"
49928  else
49929
49930  DLL_NAME="${MSVCR_NAME}"
49931  MSVC_DLL=
49932
49933  if test "x$MSVC_DLL" = x; then
49934    # Probe: Using well-known location from Visual Studio 10.0
49935    if test "x$VCINSTALLDIR" != x; then
49936      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49937
49938  windows_path="$CYGWIN_VC_INSTALL_DIR"
49939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49940    unix_path=`$CYGPATH -u "$windows_path"`
49941    CYGWIN_VC_INSTALL_DIR="$unix_path"
49942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49944    CYGWIN_VC_INSTALL_DIR="$unix_path"
49945  fi
49946
49947      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49948        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49949      else
49950        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49951      fi
49952      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49953
49954  DLL_NAME="$DLL_NAME"
49955  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49956  METHOD="well-known location in VCINSTALLDIR"
49957  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49958    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49959$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49960
49961    # Need to check if the found msvcr is correct architecture
49962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49963$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49964    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49966      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49967      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49968      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49969        CORRECT_MSVCR_ARCH="PE32 executable"
49970      else
49971        CORRECT_MSVCR_ARCH="PE32+ executable"
49972      fi
49973    else
49974      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49975        CORRECT_MSVCR_ARCH=386
49976      else
49977        CORRECT_MSVCR_ARCH=x86-64
49978      fi
49979    fi
49980    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49982$as_echo "ok" >&6; }
49983      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49984
49985  # Only process if variable expands to non-empty
49986
49987  if test "x$MSVC_DLL" != x; then
49988    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49989
49990  # Input might be given as Windows format, start by converting to
49991  # unix format.
49992  path="$MSVC_DLL"
49993  new_path=`$CYGPATH -u "$path"`
49994
49995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49998  # "foo.exe" is OK but "foo" is an error.
49999  #
50000  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50001  # It is also a way to make sure we got the proper file name for the real test later on.
50002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50003  if test "x$test_shortpath" = x; then
50004    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50005$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50006    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50007  fi
50008
50009  # Call helper function which possibly converts this using DOS-style short mode.
50010  # If so, the updated path is stored in $new_path.
50011
50012  input_path="$new_path"
50013  # Check if we need to convert this using DOS-style short mode. If the path
50014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50015  # take no chances and rewrite it.
50016  # Note: m4 eats our [], so we need to use [ and ] instead.
50017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50018  if test "x$has_forbidden_chars" != x; then
50019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50023      # Going to short mode and back again did indeed matter. Since short mode is
50024      # case insensitive, let's make it lowercase to improve readability.
50025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50026      # Now convert it back to Unix-style (cygpath)
50027      input_path=`$CYGPATH -u "$shortmode_path"`
50028      new_path="$input_path"
50029    fi
50030  fi
50031
50032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50033  if test "x$test_cygdrive_prefix" = x; then
50034    # As a simple fix, exclude /usr/bin since it's not a real path.
50035    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50037      # a path prefixed by /cygdrive for fixpath to work.
50038      new_path="$CYGWIN_ROOT_PATH$input_path"
50039    fi
50040  fi
50041
50042
50043  if test "x$path" != "x$new_path"; then
50044    MSVC_DLL="$new_path"
50045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50046$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50047  fi
50048
50049    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50050
50051  path="$MSVC_DLL"
50052  has_colon=`$ECHO $path | $GREP ^.:`
50053  new_path="$path"
50054  if test "x$has_colon" = x; then
50055    # Not in mixed or Windows style, start by that.
50056    new_path=`cmd //c echo $path`
50057  fi
50058
50059
50060  input_path="$new_path"
50061  # Check if we need to convert this using DOS-style short mode. If the path
50062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50063  # take no chances and rewrite it.
50064  # Note: m4 eats our [], so we need to use [ and ] instead.
50065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50066  if test "x$has_forbidden_chars" != x; then
50067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50068    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50069  fi
50070
50071
50072  windows_path="$new_path"
50073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50074    unix_path=`$CYGPATH -u "$windows_path"`
50075    new_path="$unix_path"
50076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50078    new_path="$unix_path"
50079  fi
50080
50081  if test "x$path" != "x$new_path"; then
50082    MSVC_DLL="$new_path"
50083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50084$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50085  fi
50086
50087  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50088  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50089
50090    else
50091      # We're on a unix platform. Hooray! :)
50092      path="$MSVC_DLL"
50093      has_space=`$ECHO "$path" | $GREP " "`
50094      if test "x$has_space" != x; then
50095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50096$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50097        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50098      fi
50099
50100      # Use eval to expand a potential ~
50101      eval path="$path"
50102      if test ! -f "$path" && test ! -d "$path"; then
50103        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50104      fi
50105
50106      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50107    fi
50108  fi
50109
50110      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50111$as_echo_n "checking for $DLL_NAME... " >&6; }
50112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50113$as_echo "$MSVC_DLL" >&6; }
50114    else
50115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50116$as_echo "incorrect, ignoring" >&6; }
50117      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50118$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50119    fi
50120  fi
50121
50122    fi
50123  fi
50124
50125  if test "x$MSVC_DLL" = x; then
50126    # Probe: Check in the Boot JDK directory.
50127    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50128
50129  DLL_NAME="$DLL_NAME"
50130  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50131  METHOD="well-known location in Boot JDK"
50132  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50133    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50134$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50135
50136    # Need to check if the found msvcr is correct architecture
50137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50138$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50139    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50140    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50141      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50142      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50143      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50144        CORRECT_MSVCR_ARCH="PE32 executable"
50145      else
50146        CORRECT_MSVCR_ARCH="PE32+ executable"
50147      fi
50148    else
50149      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50150        CORRECT_MSVCR_ARCH=386
50151      else
50152        CORRECT_MSVCR_ARCH=x86-64
50153      fi
50154    fi
50155    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50157$as_echo "ok" >&6; }
50158      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50159
50160  # Only process if variable expands to non-empty
50161
50162  if test "x$MSVC_DLL" != x; then
50163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50164
50165  # Input might be given as Windows format, start by converting to
50166  # unix format.
50167  path="$MSVC_DLL"
50168  new_path=`$CYGPATH -u "$path"`
50169
50170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50173  # "foo.exe" is OK but "foo" is an error.
50174  #
50175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50176  # It is also a way to make sure we got the proper file name for the real test later on.
50177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50178  if test "x$test_shortpath" = x; then
50179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50180$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50181    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50182  fi
50183
50184  # Call helper function which possibly converts this using DOS-style short mode.
50185  # If so, the updated path is stored in $new_path.
50186
50187  input_path="$new_path"
50188  # Check if we need to convert this using DOS-style short mode. If the path
50189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50190  # take no chances and rewrite it.
50191  # Note: m4 eats our [], so we need to use [ and ] instead.
50192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50193  if test "x$has_forbidden_chars" != x; then
50194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50198      # Going to short mode and back again did indeed matter. Since short mode is
50199      # case insensitive, let's make it lowercase to improve readability.
50200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50201      # Now convert it back to Unix-style (cygpath)
50202      input_path=`$CYGPATH -u "$shortmode_path"`
50203      new_path="$input_path"
50204    fi
50205  fi
50206
50207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50208  if test "x$test_cygdrive_prefix" = x; then
50209    # As a simple fix, exclude /usr/bin since it's not a real path.
50210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50212      # a path prefixed by /cygdrive for fixpath to work.
50213      new_path="$CYGWIN_ROOT_PATH$input_path"
50214    fi
50215  fi
50216
50217
50218  if test "x$path" != "x$new_path"; then
50219    MSVC_DLL="$new_path"
50220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50221$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50222  fi
50223
50224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50225
50226  path="$MSVC_DLL"
50227  has_colon=`$ECHO $path | $GREP ^.:`
50228  new_path="$path"
50229  if test "x$has_colon" = x; then
50230    # Not in mixed or Windows style, start by that.
50231    new_path=`cmd //c echo $path`
50232  fi
50233
50234
50235  input_path="$new_path"
50236  # Check if we need to convert this using DOS-style short mode. If the path
50237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50238  # take no chances and rewrite it.
50239  # Note: m4 eats our [], so we need to use [ and ] instead.
50240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50241  if test "x$has_forbidden_chars" != x; then
50242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50244  fi
50245
50246
50247  windows_path="$new_path"
50248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50249    unix_path=`$CYGPATH -u "$windows_path"`
50250    new_path="$unix_path"
50251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50253    new_path="$unix_path"
50254  fi
50255
50256  if test "x$path" != "x$new_path"; then
50257    MSVC_DLL="$new_path"
50258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50259$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50260  fi
50261
50262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50264
50265    else
50266      # We're on a unix platform. Hooray! :)
50267      path="$MSVC_DLL"
50268      has_space=`$ECHO "$path" | $GREP " "`
50269      if test "x$has_space" != x; then
50270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50271$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50272        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50273      fi
50274
50275      # Use eval to expand a potential ~
50276      eval path="$path"
50277      if test ! -f "$path" && test ! -d "$path"; then
50278        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50279      fi
50280
50281      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50282    fi
50283  fi
50284
50285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50286$as_echo_n "checking for $DLL_NAME... " >&6; }
50287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50288$as_echo "$MSVC_DLL" >&6; }
50289    else
50290      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50291$as_echo "incorrect, ignoring" >&6; }
50292      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50293$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50294    fi
50295  fi
50296
50297  fi
50298
50299  if test "x$MSVC_DLL" = x; then
50300    # Probe: Look in the Windows system32 directory
50301    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50302
50303  windows_path="$CYGWIN_SYSTEMROOT"
50304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50305    unix_path=`$CYGPATH -u "$windows_path"`
50306    CYGWIN_SYSTEMROOT="$unix_path"
50307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50309    CYGWIN_SYSTEMROOT="$unix_path"
50310  fi
50311
50312    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50313
50314  DLL_NAME="$DLL_NAME"
50315  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50316  METHOD="well-known location in SYSTEMROOT"
50317  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50318    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50319$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50320
50321    # Need to check if the found msvcr is correct architecture
50322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50323$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50324    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50326      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50327      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50328      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50329        CORRECT_MSVCR_ARCH="PE32 executable"
50330      else
50331        CORRECT_MSVCR_ARCH="PE32+ executable"
50332      fi
50333    else
50334      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50335        CORRECT_MSVCR_ARCH=386
50336      else
50337        CORRECT_MSVCR_ARCH=x86-64
50338      fi
50339    fi
50340    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50341      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50342$as_echo "ok" >&6; }
50343      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50344
50345  # Only process if variable expands to non-empty
50346
50347  if test "x$MSVC_DLL" != x; then
50348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50349
50350  # Input might be given as Windows format, start by converting to
50351  # unix format.
50352  path="$MSVC_DLL"
50353  new_path=`$CYGPATH -u "$path"`
50354
50355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50358  # "foo.exe" is OK but "foo" is an error.
50359  #
50360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50361  # It is also a way to make sure we got the proper file name for the real test later on.
50362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50363  if test "x$test_shortpath" = x; then
50364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50365$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50366    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50367  fi
50368
50369  # Call helper function which possibly converts this using DOS-style short mode.
50370  # If so, the updated path is stored in $new_path.
50371
50372  input_path="$new_path"
50373  # Check if we need to convert this using DOS-style short mode. If the path
50374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50375  # take no chances and rewrite it.
50376  # Note: m4 eats our [], so we need to use [ and ] instead.
50377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50378  if test "x$has_forbidden_chars" != x; then
50379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50383      # Going to short mode and back again did indeed matter. Since short mode is
50384      # case insensitive, let's make it lowercase to improve readability.
50385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50386      # Now convert it back to Unix-style (cygpath)
50387      input_path=`$CYGPATH -u "$shortmode_path"`
50388      new_path="$input_path"
50389    fi
50390  fi
50391
50392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50393  if test "x$test_cygdrive_prefix" = x; then
50394    # As a simple fix, exclude /usr/bin since it's not a real path.
50395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50397      # a path prefixed by /cygdrive for fixpath to work.
50398      new_path="$CYGWIN_ROOT_PATH$input_path"
50399    fi
50400  fi
50401
50402
50403  if test "x$path" != "x$new_path"; then
50404    MSVC_DLL="$new_path"
50405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50406$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50407  fi
50408
50409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50410
50411  path="$MSVC_DLL"
50412  has_colon=`$ECHO $path | $GREP ^.:`
50413  new_path="$path"
50414  if test "x$has_colon" = x; then
50415    # Not in mixed or Windows style, start by that.
50416    new_path=`cmd //c echo $path`
50417  fi
50418
50419
50420  input_path="$new_path"
50421  # Check if we need to convert this using DOS-style short mode. If the path
50422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50423  # take no chances and rewrite it.
50424  # Note: m4 eats our [], so we need to use [ and ] instead.
50425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50426  if test "x$has_forbidden_chars" != x; then
50427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50429  fi
50430
50431
50432  windows_path="$new_path"
50433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50434    unix_path=`$CYGPATH -u "$windows_path"`
50435    new_path="$unix_path"
50436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50438    new_path="$unix_path"
50439  fi
50440
50441  if test "x$path" != "x$new_path"; then
50442    MSVC_DLL="$new_path"
50443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50444$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50445  fi
50446
50447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50449
50450    else
50451      # We're on a unix platform. Hooray! :)
50452      path="$MSVC_DLL"
50453      has_space=`$ECHO "$path" | $GREP " "`
50454      if test "x$has_space" != x; then
50455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50456$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50457        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50458      fi
50459
50460      # Use eval to expand a potential ~
50461      eval path="$path"
50462      if test ! -f "$path" && test ! -d "$path"; then
50463        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50464      fi
50465
50466      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50467    fi
50468  fi
50469
50470      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50471$as_echo_n "checking for $DLL_NAME... " >&6; }
50472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50473$as_echo "$MSVC_DLL" >&6; }
50474    else
50475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50476$as_echo "incorrect, ignoring" >&6; }
50477      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50478$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50479    fi
50480  fi
50481
50482  fi
50483
50484  if test "x$MSVC_DLL" = x; then
50485    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50486    if test "x$VS100COMNTOOLS" != x; then
50487      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50488
50489  windows_path="$CYGWIN_VS_TOOLS_DIR"
50490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50491    unix_path=`$CYGPATH -u "$windows_path"`
50492    CYGWIN_VS_TOOLS_DIR="$unix_path"
50493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50495    CYGWIN_VS_TOOLS_DIR="$unix_path"
50496  fi
50497
50498      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50499        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50500	    | $GREP -i /x64/ | $HEAD --lines 1`
50501      else
50502        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50503	    | $GREP -i /x86/ | $HEAD --lines 1`
50504      fi
50505
50506  DLL_NAME="$DLL_NAME"
50507  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50508  METHOD="search of VS100COMNTOOLS"
50509  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50510    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50511$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50512
50513    # Need to check if the found msvcr is correct architecture
50514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50515$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50516    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50518      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50519      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50520      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50521        CORRECT_MSVCR_ARCH="PE32 executable"
50522      else
50523        CORRECT_MSVCR_ARCH="PE32+ executable"
50524      fi
50525    else
50526      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50527        CORRECT_MSVCR_ARCH=386
50528      else
50529        CORRECT_MSVCR_ARCH=x86-64
50530      fi
50531    fi
50532    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50534$as_echo "ok" >&6; }
50535      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50536
50537  # Only process if variable expands to non-empty
50538
50539  if test "x$MSVC_DLL" != x; then
50540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50541
50542  # Input might be given as Windows format, start by converting to
50543  # unix format.
50544  path="$MSVC_DLL"
50545  new_path=`$CYGPATH -u "$path"`
50546
50547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50550  # "foo.exe" is OK but "foo" is an error.
50551  #
50552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50553  # It is also a way to make sure we got the proper file name for the real test later on.
50554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50555  if test "x$test_shortpath" = x; then
50556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50557$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50558    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50559  fi
50560
50561  # Call helper function which possibly converts this using DOS-style short mode.
50562  # If so, the updated path is stored in $new_path.
50563
50564  input_path="$new_path"
50565  # Check if we need to convert this using DOS-style short mode. If the path
50566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50567  # take no chances and rewrite it.
50568  # Note: m4 eats our [], so we need to use [ and ] instead.
50569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50570  if test "x$has_forbidden_chars" != x; then
50571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50575      # Going to short mode and back again did indeed matter. Since short mode is
50576      # case insensitive, let's make it lowercase to improve readability.
50577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50578      # Now convert it back to Unix-style (cygpath)
50579      input_path=`$CYGPATH -u "$shortmode_path"`
50580      new_path="$input_path"
50581    fi
50582  fi
50583
50584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50585  if test "x$test_cygdrive_prefix" = x; then
50586    # As a simple fix, exclude /usr/bin since it's not a real path.
50587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50589      # a path prefixed by /cygdrive for fixpath to work.
50590      new_path="$CYGWIN_ROOT_PATH$input_path"
50591    fi
50592  fi
50593
50594
50595  if test "x$path" != "x$new_path"; then
50596    MSVC_DLL="$new_path"
50597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50598$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50599  fi
50600
50601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50602
50603  path="$MSVC_DLL"
50604  has_colon=`$ECHO $path | $GREP ^.:`
50605  new_path="$path"
50606  if test "x$has_colon" = x; then
50607    # Not in mixed or Windows style, start by that.
50608    new_path=`cmd //c echo $path`
50609  fi
50610
50611
50612  input_path="$new_path"
50613  # Check if we need to convert this using DOS-style short mode. If the path
50614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50615  # take no chances and rewrite it.
50616  # Note: m4 eats our [], so we need to use [ and ] instead.
50617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50618  if test "x$has_forbidden_chars" != x; then
50619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50621  fi
50622
50623
50624  windows_path="$new_path"
50625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50626    unix_path=`$CYGPATH -u "$windows_path"`
50627    new_path="$unix_path"
50628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50630    new_path="$unix_path"
50631  fi
50632
50633  if test "x$path" != "x$new_path"; then
50634    MSVC_DLL="$new_path"
50635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50636$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50637  fi
50638
50639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50641
50642    else
50643      # We're on a unix platform. Hooray! :)
50644      path="$MSVC_DLL"
50645      has_space=`$ECHO "$path" | $GREP " "`
50646      if test "x$has_space" != x; then
50647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50648$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50649        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50650      fi
50651
50652      # Use eval to expand a potential ~
50653      eval path="$path"
50654      if test ! -f "$path" && test ! -d "$path"; then
50655        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50656      fi
50657
50658      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50659    fi
50660  fi
50661
50662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50663$as_echo_n "checking for $DLL_NAME... " >&6; }
50664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50665$as_echo "$MSVC_DLL" >&6; }
50666    else
50667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50668$as_echo "incorrect, ignoring" >&6; }
50669      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50670$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50671    fi
50672  fi
50673
50674    fi
50675  fi
50676
50677  if test "x$MSVC_DLL" = x; then
50678    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50679    # (This was the original behaviour; kept since it might turn something up)
50680    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50681      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50682        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50683	    | $GREP x64 | $HEAD --lines 1`
50684      else
50685        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50686	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50687        if test "x$POSSIBLE_MSVC_DLL" = x; then
50688          # We're grasping at straws now...
50689          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50690	      | $HEAD --lines 1`
50691        fi
50692      fi
50693
50694
50695  DLL_NAME="$DLL_NAME"
50696  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50697  METHOD="search of VCINSTALLDIR"
50698  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50700$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50701
50702    # Need to check if the found msvcr is correct architecture
50703    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50704$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50705    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50707      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50708      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50709      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50710        CORRECT_MSVCR_ARCH="PE32 executable"
50711      else
50712        CORRECT_MSVCR_ARCH="PE32+ executable"
50713      fi
50714    else
50715      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50716        CORRECT_MSVCR_ARCH=386
50717      else
50718        CORRECT_MSVCR_ARCH=x86-64
50719      fi
50720    fi
50721    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50723$as_echo "ok" >&6; }
50724      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50725
50726  # Only process if variable expands to non-empty
50727
50728  if test "x$MSVC_DLL" != x; then
50729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50730
50731  # Input might be given as Windows format, start by converting to
50732  # unix format.
50733  path="$MSVC_DLL"
50734  new_path=`$CYGPATH -u "$path"`
50735
50736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50739  # "foo.exe" is OK but "foo" is an error.
50740  #
50741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50742  # It is also a way to make sure we got the proper file name for the real test later on.
50743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50744  if test "x$test_shortpath" = x; then
50745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50746$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50747    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50748  fi
50749
50750  # Call helper function which possibly converts this using DOS-style short mode.
50751  # If so, the updated path is stored in $new_path.
50752
50753  input_path="$new_path"
50754  # Check if we need to convert this using DOS-style short mode. If the path
50755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50756  # take no chances and rewrite it.
50757  # Note: m4 eats our [], so we need to use [ and ] instead.
50758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50759  if test "x$has_forbidden_chars" != x; then
50760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50764      # Going to short mode and back again did indeed matter. Since short mode is
50765      # case insensitive, let's make it lowercase to improve readability.
50766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50767      # Now convert it back to Unix-style (cygpath)
50768      input_path=`$CYGPATH -u "$shortmode_path"`
50769      new_path="$input_path"
50770    fi
50771  fi
50772
50773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50774  if test "x$test_cygdrive_prefix" = x; then
50775    # As a simple fix, exclude /usr/bin since it's not a real path.
50776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50778      # a path prefixed by /cygdrive for fixpath to work.
50779      new_path="$CYGWIN_ROOT_PATH$input_path"
50780    fi
50781  fi
50782
50783
50784  if test "x$path" != "x$new_path"; then
50785    MSVC_DLL="$new_path"
50786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50787$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50788  fi
50789
50790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50791
50792  path="$MSVC_DLL"
50793  has_colon=`$ECHO $path | $GREP ^.:`
50794  new_path="$path"
50795  if test "x$has_colon" = x; then
50796    # Not in mixed or Windows style, start by that.
50797    new_path=`cmd //c echo $path`
50798  fi
50799
50800
50801  input_path="$new_path"
50802  # Check if we need to convert this using DOS-style short mode. If the path
50803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50804  # take no chances and rewrite it.
50805  # Note: m4 eats our [], so we need to use [ and ] instead.
50806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50807  if test "x$has_forbidden_chars" != x; then
50808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50810  fi
50811
50812
50813  windows_path="$new_path"
50814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50815    unix_path=`$CYGPATH -u "$windows_path"`
50816    new_path="$unix_path"
50817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50819    new_path="$unix_path"
50820  fi
50821
50822  if test "x$path" != "x$new_path"; then
50823    MSVC_DLL="$new_path"
50824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50825$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50826  fi
50827
50828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50830
50831    else
50832      # We're on a unix platform. Hooray! :)
50833      path="$MSVC_DLL"
50834      has_space=`$ECHO "$path" | $GREP " "`
50835      if test "x$has_space" != x; then
50836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50837$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50839      fi
50840
50841      # Use eval to expand a potential ~
50842      eval path="$path"
50843      if test ! -f "$path" && test ! -d "$path"; then
50844        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50845      fi
50846
50847      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50848    fi
50849  fi
50850
50851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50852$as_echo_n "checking for $DLL_NAME... " >&6; }
50853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50854$as_echo "$MSVC_DLL" >&6; }
50855    else
50856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50857$as_echo "incorrect, ignoring" >&6; }
50858      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50859$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50860    fi
50861  fi
50862
50863    fi
50864  fi
50865
50866  if test "x$MSVC_DLL" = x; then
50867    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50868$as_echo_n "checking for $DLL_NAME... " >&6; }
50869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50870$as_echo "no" >&6; }
50871    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50872  fi
50873
50874    MSVCR_DLL="$MSVC_DLL"
50875  fi
50876
50877
50878
50879# Check whether --with-msvcp-dll was given.
50880if test "${with_msvcp_dll+set}" = set; then :
50881  withval=$with_msvcp_dll;
50882fi
50883
50884
50885  if test "x$MSVCP_NAME" != "x"; then
50886    if test "x$with_msvcp_dll" != x; then
50887      # If given explicitely by user, do not probe. If not present, fail directly.
50888
50889  DLL_NAME="$MSVCP_NAME"
50890  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50891  METHOD="--with-msvcp-dll"
50892  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50893    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50894$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50895
50896    # Need to check if the found msvcr is correct architecture
50897    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50898$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50899    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50901      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50902      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50903      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50904        CORRECT_MSVCR_ARCH="PE32 executable"
50905      else
50906        CORRECT_MSVCR_ARCH="PE32+ executable"
50907      fi
50908    else
50909      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50910        CORRECT_MSVCR_ARCH=386
50911      else
50912        CORRECT_MSVCR_ARCH=x86-64
50913      fi
50914    fi
50915    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50917$as_echo "ok" >&6; }
50918      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50919
50920  # Only process if variable expands to non-empty
50921
50922  if test "x$MSVC_DLL" != x; then
50923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50924
50925  # Input might be given as Windows format, start by converting to
50926  # unix format.
50927  path="$MSVC_DLL"
50928  new_path=`$CYGPATH -u "$path"`
50929
50930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50933  # "foo.exe" is OK but "foo" is an error.
50934  #
50935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50936  # It is also a way to make sure we got the proper file name for the real test later on.
50937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50938  if test "x$test_shortpath" = x; then
50939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50940$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50941    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50942  fi
50943
50944  # Call helper function which possibly converts this using DOS-style short mode.
50945  # If so, the updated path is stored in $new_path.
50946
50947  input_path="$new_path"
50948  # Check if we need to convert this using DOS-style short mode. If the path
50949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50950  # take no chances and rewrite it.
50951  # Note: m4 eats our [], so we need to use [ and ] instead.
50952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50953  if test "x$has_forbidden_chars" != x; then
50954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50958      # Going to short mode and back again did indeed matter. Since short mode is
50959      # case insensitive, let's make it lowercase to improve readability.
50960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50961      # Now convert it back to Unix-style (cygpath)
50962      input_path=`$CYGPATH -u "$shortmode_path"`
50963      new_path="$input_path"
50964    fi
50965  fi
50966
50967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50968  if test "x$test_cygdrive_prefix" = x; then
50969    # As a simple fix, exclude /usr/bin since it's not a real path.
50970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50972      # a path prefixed by /cygdrive for fixpath to work.
50973      new_path="$CYGWIN_ROOT_PATH$input_path"
50974    fi
50975  fi
50976
50977
50978  if test "x$path" != "x$new_path"; then
50979    MSVC_DLL="$new_path"
50980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50981$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50982  fi
50983
50984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50985
50986  path="$MSVC_DLL"
50987  has_colon=`$ECHO $path | $GREP ^.:`
50988  new_path="$path"
50989  if test "x$has_colon" = x; then
50990    # Not in mixed or Windows style, start by that.
50991    new_path=`cmd //c echo $path`
50992  fi
50993
50994
50995  input_path="$new_path"
50996  # Check if we need to convert this using DOS-style short mode. If the path
50997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50998  # take no chances and rewrite it.
50999  # Note: m4 eats our [], so we need to use [ and ] instead.
51000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51001  if test "x$has_forbidden_chars" != x; then
51002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51004  fi
51005
51006
51007  windows_path="$new_path"
51008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51009    unix_path=`$CYGPATH -u "$windows_path"`
51010    new_path="$unix_path"
51011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51013    new_path="$unix_path"
51014  fi
51015
51016  if test "x$path" != "x$new_path"; then
51017    MSVC_DLL="$new_path"
51018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51019$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51020  fi
51021
51022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51024
51025    else
51026      # We're on a unix platform. Hooray! :)
51027      path="$MSVC_DLL"
51028      has_space=`$ECHO "$path" | $GREP " "`
51029      if test "x$has_space" != x; then
51030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51031$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51033      fi
51034
51035      # Use eval to expand a potential ~
51036      eval path="$path"
51037      if test ! -f "$path" && test ! -d "$path"; then
51038        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51039      fi
51040
51041      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51042    fi
51043  fi
51044
51045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51046$as_echo_n "checking for $DLL_NAME... " >&6; }
51047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51048$as_echo "$MSVC_DLL" >&6; }
51049    else
51050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51051$as_echo "incorrect, ignoring" >&6; }
51052      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51053$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51054    fi
51055  fi
51056
51057      if test "x$MSVC_DLL" = x; then
51058        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51059      fi
51060      MSVCP_DLL="$MSVC_DLL"
51061    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51062
51063  DLL_NAME="$MSVCP_NAME"
51064  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51065  METHOD="devkit"
51066  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51067    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51068$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51069
51070    # Need to check if the found msvcr is correct architecture
51071    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51072$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51073    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51075      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51076      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51077      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51078        CORRECT_MSVCR_ARCH="PE32 executable"
51079      else
51080        CORRECT_MSVCR_ARCH="PE32+ executable"
51081      fi
51082    else
51083      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51084        CORRECT_MSVCR_ARCH=386
51085      else
51086        CORRECT_MSVCR_ARCH=x86-64
51087      fi
51088    fi
51089    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51090      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51091$as_echo "ok" >&6; }
51092      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51093
51094  # Only process if variable expands to non-empty
51095
51096  if test "x$MSVC_DLL" != x; then
51097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51098
51099  # Input might be given as Windows format, start by converting to
51100  # unix format.
51101  path="$MSVC_DLL"
51102  new_path=`$CYGPATH -u "$path"`
51103
51104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51107  # "foo.exe" is OK but "foo" is an error.
51108  #
51109  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51110  # It is also a way to make sure we got the proper file name for the real test later on.
51111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51112  if test "x$test_shortpath" = x; then
51113    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51114$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51115    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51116  fi
51117
51118  # Call helper function which possibly converts this using DOS-style short mode.
51119  # If so, the updated path is stored in $new_path.
51120
51121  input_path="$new_path"
51122  # Check if we need to convert this using DOS-style short mode. If the path
51123  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51124  # take no chances and rewrite it.
51125  # Note: m4 eats our [], so we need to use [ and ] instead.
51126  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51127  if test "x$has_forbidden_chars" != x; then
51128    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51129    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51130    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51131    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51132      # Going to short mode and back again did indeed matter. Since short mode is
51133      # case insensitive, let's make it lowercase to improve readability.
51134      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51135      # Now convert it back to Unix-style (cygpath)
51136      input_path=`$CYGPATH -u "$shortmode_path"`
51137      new_path="$input_path"
51138    fi
51139  fi
51140
51141  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51142  if test "x$test_cygdrive_prefix" = x; then
51143    # As a simple fix, exclude /usr/bin since it's not a real path.
51144    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51145      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51146      # a path prefixed by /cygdrive for fixpath to work.
51147      new_path="$CYGWIN_ROOT_PATH$input_path"
51148    fi
51149  fi
51150
51151
51152  if test "x$path" != "x$new_path"; then
51153    MSVC_DLL="$new_path"
51154    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51155$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51156  fi
51157
51158    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51159
51160  path="$MSVC_DLL"
51161  has_colon=`$ECHO $path | $GREP ^.:`
51162  new_path="$path"
51163  if test "x$has_colon" = x; then
51164    # Not in mixed or Windows style, start by that.
51165    new_path=`cmd //c echo $path`
51166  fi
51167
51168
51169  input_path="$new_path"
51170  # Check if we need to convert this using DOS-style short mode. If the path
51171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51172  # take no chances and rewrite it.
51173  # Note: m4 eats our [], so we need to use [ and ] instead.
51174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51175  if test "x$has_forbidden_chars" != x; then
51176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51178  fi
51179
51180
51181  windows_path="$new_path"
51182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51183    unix_path=`$CYGPATH -u "$windows_path"`
51184    new_path="$unix_path"
51185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51187    new_path="$unix_path"
51188  fi
51189
51190  if test "x$path" != "x$new_path"; then
51191    MSVC_DLL="$new_path"
51192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51193$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51194  fi
51195
51196  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51197  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51198
51199    else
51200      # We're on a unix platform. Hooray! :)
51201      path="$MSVC_DLL"
51202      has_space=`$ECHO "$path" | $GREP " "`
51203      if test "x$has_space" != x; then
51204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51205$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51206        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51207      fi
51208
51209      # Use eval to expand a potential ~
51210      eval path="$path"
51211      if test ! -f "$path" && test ! -d "$path"; then
51212        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51213      fi
51214
51215      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51216    fi
51217  fi
51218
51219      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51220$as_echo_n "checking for $DLL_NAME... " >&6; }
51221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51222$as_echo "$MSVC_DLL" >&6; }
51223    else
51224      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51225$as_echo "incorrect, ignoring" >&6; }
51226      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51227$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51228    fi
51229  fi
51230
51231      if test "x$MSVC_DLL" = x; then
51232        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51233      fi
51234      MSVCP_DLL="$MSVC_DLL"
51235    else
51236
51237  DLL_NAME="${MSVCP_NAME}"
51238  MSVC_DLL=
51239
51240  if test "x$MSVC_DLL" = x; then
51241    # Probe: Using well-known location from Visual Studio 10.0
51242    if test "x$VCINSTALLDIR" != x; then
51243      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51244
51245  windows_path="$CYGWIN_VC_INSTALL_DIR"
51246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51247    unix_path=`$CYGPATH -u "$windows_path"`
51248    CYGWIN_VC_INSTALL_DIR="$unix_path"
51249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51251    CYGWIN_VC_INSTALL_DIR="$unix_path"
51252  fi
51253
51254      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51255        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51256      else
51257        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51258      fi
51259      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51260
51261  DLL_NAME="$DLL_NAME"
51262  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51263  METHOD="well-known location in VCINSTALLDIR"
51264  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51265    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51266$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51267
51268    # Need to check if the found msvcr is correct architecture
51269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51270$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51271    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51273      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51274      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51275      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51276        CORRECT_MSVCR_ARCH="PE32 executable"
51277      else
51278        CORRECT_MSVCR_ARCH="PE32+ executable"
51279      fi
51280    else
51281      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51282        CORRECT_MSVCR_ARCH=386
51283      else
51284        CORRECT_MSVCR_ARCH=x86-64
51285      fi
51286    fi
51287    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51288      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51289$as_echo "ok" >&6; }
51290      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51291
51292  # Only process if variable expands to non-empty
51293
51294  if test "x$MSVC_DLL" != x; then
51295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51296
51297  # Input might be given as Windows format, start by converting to
51298  # unix format.
51299  path="$MSVC_DLL"
51300  new_path=`$CYGPATH -u "$path"`
51301
51302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51305  # "foo.exe" is OK but "foo" is an error.
51306  #
51307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51308  # It is also a way to make sure we got the proper file name for the real test later on.
51309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51310  if test "x$test_shortpath" = x; then
51311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51312$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51313    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51314  fi
51315
51316  # Call helper function which possibly converts this using DOS-style short mode.
51317  # If so, the updated path is stored in $new_path.
51318
51319  input_path="$new_path"
51320  # Check if we need to convert this using DOS-style short mode. If the path
51321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51322  # take no chances and rewrite it.
51323  # Note: m4 eats our [], so we need to use [ and ] instead.
51324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51325  if test "x$has_forbidden_chars" != x; then
51326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51330      # Going to short mode and back again did indeed matter. Since short mode is
51331      # case insensitive, let's make it lowercase to improve readability.
51332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51333      # Now convert it back to Unix-style (cygpath)
51334      input_path=`$CYGPATH -u "$shortmode_path"`
51335      new_path="$input_path"
51336    fi
51337  fi
51338
51339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51340  if test "x$test_cygdrive_prefix" = x; then
51341    # As a simple fix, exclude /usr/bin since it's not a real path.
51342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51344      # a path prefixed by /cygdrive for fixpath to work.
51345      new_path="$CYGWIN_ROOT_PATH$input_path"
51346    fi
51347  fi
51348
51349
51350  if test "x$path" != "x$new_path"; then
51351    MSVC_DLL="$new_path"
51352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51353$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51354  fi
51355
51356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51357
51358  path="$MSVC_DLL"
51359  has_colon=`$ECHO $path | $GREP ^.:`
51360  new_path="$path"
51361  if test "x$has_colon" = x; then
51362    # Not in mixed or Windows style, start by that.
51363    new_path=`cmd //c echo $path`
51364  fi
51365
51366
51367  input_path="$new_path"
51368  # Check if we need to convert this using DOS-style short mode. If the path
51369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51370  # take no chances and rewrite it.
51371  # Note: m4 eats our [], so we need to use [ and ] instead.
51372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51373  if test "x$has_forbidden_chars" != x; then
51374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51376  fi
51377
51378
51379  windows_path="$new_path"
51380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51381    unix_path=`$CYGPATH -u "$windows_path"`
51382    new_path="$unix_path"
51383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51385    new_path="$unix_path"
51386  fi
51387
51388  if test "x$path" != "x$new_path"; then
51389    MSVC_DLL="$new_path"
51390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51391$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51392  fi
51393
51394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51396
51397    else
51398      # We're on a unix platform. Hooray! :)
51399      path="$MSVC_DLL"
51400      has_space=`$ECHO "$path" | $GREP " "`
51401      if test "x$has_space" != x; then
51402        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51403$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51404        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51405      fi
51406
51407      # Use eval to expand a potential ~
51408      eval path="$path"
51409      if test ! -f "$path" && test ! -d "$path"; then
51410        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51411      fi
51412
51413      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51414    fi
51415  fi
51416
51417      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51418$as_echo_n "checking for $DLL_NAME... " >&6; }
51419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51420$as_echo "$MSVC_DLL" >&6; }
51421    else
51422      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51423$as_echo "incorrect, ignoring" >&6; }
51424      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51425$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51426    fi
51427  fi
51428
51429    fi
51430  fi
51431
51432  if test "x$MSVC_DLL" = x; then
51433    # Probe: Check in the Boot JDK directory.
51434    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51435
51436  DLL_NAME="$DLL_NAME"
51437  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51438  METHOD="well-known location in Boot JDK"
51439  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51440    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51441$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51442
51443    # Need to check if the found msvcr is correct architecture
51444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51445$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51446    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51448      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51449      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51450      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51451        CORRECT_MSVCR_ARCH="PE32 executable"
51452      else
51453        CORRECT_MSVCR_ARCH="PE32+ executable"
51454      fi
51455    else
51456      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51457        CORRECT_MSVCR_ARCH=386
51458      else
51459        CORRECT_MSVCR_ARCH=x86-64
51460      fi
51461    fi
51462    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51464$as_echo "ok" >&6; }
51465      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51466
51467  # Only process if variable expands to non-empty
51468
51469  if test "x$MSVC_DLL" != x; then
51470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51471
51472  # Input might be given as Windows format, start by converting to
51473  # unix format.
51474  path="$MSVC_DLL"
51475  new_path=`$CYGPATH -u "$path"`
51476
51477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51480  # "foo.exe" is OK but "foo" is an error.
51481  #
51482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51483  # It is also a way to make sure we got the proper file name for the real test later on.
51484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51485  if test "x$test_shortpath" = x; then
51486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51487$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51488    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51489  fi
51490
51491  # Call helper function which possibly converts this using DOS-style short mode.
51492  # If so, the updated path is stored in $new_path.
51493
51494  input_path="$new_path"
51495  # Check if we need to convert this using DOS-style short mode. If the path
51496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51497  # take no chances and rewrite it.
51498  # Note: m4 eats our [], so we need to use [ and ] instead.
51499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51500  if test "x$has_forbidden_chars" != x; then
51501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51505      # Going to short mode and back again did indeed matter. Since short mode is
51506      # case insensitive, let's make it lowercase to improve readability.
51507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51508      # Now convert it back to Unix-style (cygpath)
51509      input_path=`$CYGPATH -u "$shortmode_path"`
51510      new_path="$input_path"
51511    fi
51512  fi
51513
51514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51515  if test "x$test_cygdrive_prefix" = x; then
51516    # As a simple fix, exclude /usr/bin since it's not a real path.
51517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51519      # a path prefixed by /cygdrive for fixpath to work.
51520      new_path="$CYGWIN_ROOT_PATH$input_path"
51521    fi
51522  fi
51523
51524
51525  if test "x$path" != "x$new_path"; then
51526    MSVC_DLL="$new_path"
51527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51528$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51529  fi
51530
51531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51532
51533  path="$MSVC_DLL"
51534  has_colon=`$ECHO $path | $GREP ^.:`
51535  new_path="$path"
51536  if test "x$has_colon" = x; then
51537    # Not in mixed or Windows style, start by that.
51538    new_path=`cmd //c echo $path`
51539  fi
51540
51541
51542  input_path="$new_path"
51543  # Check if we need to convert this using DOS-style short mode. If the path
51544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51545  # take no chances and rewrite it.
51546  # Note: m4 eats our [], so we need to use [ and ] instead.
51547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51548  if test "x$has_forbidden_chars" != x; then
51549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51551  fi
51552
51553
51554  windows_path="$new_path"
51555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51556    unix_path=`$CYGPATH -u "$windows_path"`
51557    new_path="$unix_path"
51558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51560    new_path="$unix_path"
51561  fi
51562
51563  if test "x$path" != "x$new_path"; then
51564    MSVC_DLL="$new_path"
51565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51566$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51567  fi
51568
51569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51571
51572    else
51573      # We're on a unix platform. Hooray! :)
51574      path="$MSVC_DLL"
51575      has_space=`$ECHO "$path" | $GREP " "`
51576      if test "x$has_space" != x; then
51577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51580      fi
51581
51582      # Use eval to expand a potential ~
51583      eval path="$path"
51584      if test ! -f "$path" && test ! -d "$path"; then
51585        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51586      fi
51587
51588      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51589    fi
51590  fi
51591
51592      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51593$as_echo_n "checking for $DLL_NAME... " >&6; }
51594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51595$as_echo "$MSVC_DLL" >&6; }
51596    else
51597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51598$as_echo "incorrect, ignoring" >&6; }
51599      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51600$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51601    fi
51602  fi
51603
51604  fi
51605
51606  if test "x$MSVC_DLL" = x; then
51607    # Probe: Look in the Windows system32 directory
51608    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51609
51610  windows_path="$CYGWIN_SYSTEMROOT"
51611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51612    unix_path=`$CYGPATH -u "$windows_path"`
51613    CYGWIN_SYSTEMROOT="$unix_path"
51614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51616    CYGWIN_SYSTEMROOT="$unix_path"
51617  fi
51618
51619    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51620
51621  DLL_NAME="$DLL_NAME"
51622  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51623  METHOD="well-known location in SYSTEMROOT"
51624  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51625    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51626$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51627
51628    # Need to check if the found msvcr is correct architecture
51629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51630$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51631    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51633      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51634      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51635      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51636        CORRECT_MSVCR_ARCH="PE32 executable"
51637      else
51638        CORRECT_MSVCR_ARCH="PE32+ executable"
51639      fi
51640    else
51641      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51642        CORRECT_MSVCR_ARCH=386
51643      else
51644        CORRECT_MSVCR_ARCH=x86-64
51645      fi
51646    fi
51647    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51649$as_echo "ok" >&6; }
51650      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51651
51652  # Only process if variable expands to non-empty
51653
51654  if test "x$MSVC_DLL" != x; then
51655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51656
51657  # Input might be given as Windows format, start by converting to
51658  # unix format.
51659  path="$MSVC_DLL"
51660  new_path=`$CYGPATH -u "$path"`
51661
51662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51665  # "foo.exe" is OK but "foo" is an error.
51666  #
51667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51668  # It is also a way to make sure we got the proper file name for the real test later on.
51669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51670  if test "x$test_shortpath" = x; then
51671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51672$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51673    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51674  fi
51675
51676  # Call helper function which possibly converts this using DOS-style short mode.
51677  # If so, the updated path is stored in $new_path.
51678
51679  input_path="$new_path"
51680  # Check if we need to convert this using DOS-style short mode. If the path
51681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51682  # take no chances and rewrite it.
51683  # Note: m4 eats our [], so we need to use [ and ] instead.
51684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51685  if test "x$has_forbidden_chars" != x; then
51686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51690      # Going to short mode and back again did indeed matter. Since short mode is
51691      # case insensitive, let's make it lowercase to improve readability.
51692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51693      # Now convert it back to Unix-style (cygpath)
51694      input_path=`$CYGPATH -u "$shortmode_path"`
51695      new_path="$input_path"
51696    fi
51697  fi
51698
51699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51700  if test "x$test_cygdrive_prefix" = x; then
51701    # As a simple fix, exclude /usr/bin since it's not a real path.
51702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51704      # a path prefixed by /cygdrive for fixpath to work.
51705      new_path="$CYGWIN_ROOT_PATH$input_path"
51706    fi
51707  fi
51708
51709
51710  if test "x$path" != "x$new_path"; then
51711    MSVC_DLL="$new_path"
51712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51713$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51714  fi
51715
51716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51717
51718  path="$MSVC_DLL"
51719  has_colon=`$ECHO $path | $GREP ^.:`
51720  new_path="$path"
51721  if test "x$has_colon" = x; then
51722    # Not in mixed or Windows style, start by that.
51723    new_path=`cmd //c echo $path`
51724  fi
51725
51726
51727  input_path="$new_path"
51728  # Check if we need to convert this using DOS-style short mode. If the path
51729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51730  # take no chances and rewrite it.
51731  # Note: m4 eats our [], so we need to use [ and ] instead.
51732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51733  if test "x$has_forbidden_chars" != x; then
51734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51736  fi
51737
51738
51739  windows_path="$new_path"
51740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51741    unix_path=`$CYGPATH -u "$windows_path"`
51742    new_path="$unix_path"
51743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51745    new_path="$unix_path"
51746  fi
51747
51748  if test "x$path" != "x$new_path"; then
51749    MSVC_DLL="$new_path"
51750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51751$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51752  fi
51753
51754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51756
51757    else
51758      # We're on a unix platform. Hooray! :)
51759      path="$MSVC_DLL"
51760      has_space=`$ECHO "$path" | $GREP " "`
51761      if test "x$has_space" != x; then
51762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51763$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51765      fi
51766
51767      # Use eval to expand a potential ~
51768      eval path="$path"
51769      if test ! -f "$path" && test ! -d "$path"; then
51770        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51771      fi
51772
51773      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51774    fi
51775  fi
51776
51777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51778$as_echo_n "checking for $DLL_NAME... " >&6; }
51779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51780$as_echo "$MSVC_DLL" >&6; }
51781    else
51782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51783$as_echo "incorrect, ignoring" >&6; }
51784      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51785$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51786    fi
51787  fi
51788
51789  fi
51790
51791  if test "x$MSVC_DLL" = x; then
51792    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51793    if test "x$VS100COMNTOOLS" != x; then
51794      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51795
51796  windows_path="$CYGWIN_VS_TOOLS_DIR"
51797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51798    unix_path=`$CYGPATH -u "$windows_path"`
51799    CYGWIN_VS_TOOLS_DIR="$unix_path"
51800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51802    CYGWIN_VS_TOOLS_DIR="$unix_path"
51803  fi
51804
51805      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51806        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51807	    | $GREP -i /x64/ | $HEAD --lines 1`
51808      else
51809        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51810	    | $GREP -i /x86/ | $HEAD --lines 1`
51811      fi
51812
51813  DLL_NAME="$DLL_NAME"
51814  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51815  METHOD="search of VS100COMNTOOLS"
51816  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51817    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51818$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51819
51820    # Need to check if the found msvcr is correct architecture
51821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51822$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51823    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51825      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51826      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51827      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51828        CORRECT_MSVCR_ARCH="PE32 executable"
51829      else
51830        CORRECT_MSVCR_ARCH="PE32+ executable"
51831      fi
51832    else
51833      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51834        CORRECT_MSVCR_ARCH=386
51835      else
51836        CORRECT_MSVCR_ARCH=x86-64
51837      fi
51838    fi
51839    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51841$as_echo "ok" >&6; }
51842      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51843
51844  # Only process if variable expands to non-empty
51845
51846  if test "x$MSVC_DLL" != x; then
51847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51848
51849  # Input might be given as Windows format, start by converting to
51850  # unix format.
51851  path="$MSVC_DLL"
51852  new_path=`$CYGPATH -u "$path"`
51853
51854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51857  # "foo.exe" is OK but "foo" is an error.
51858  #
51859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51860  # It is also a way to make sure we got the proper file name for the real test later on.
51861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51862  if test "x$test_shortpath" = x; then
51863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51864$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51865    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51866  fi
51867
51868  # Call helper function which possibly converts this using DOS-style short mode.
51869  # If so, the updated path is stored in $new_path.
51870
51871  input_path="$new_path"
51872  # Check if we need to convert this using DOS-style short mode. If the path
51873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51874  # take no chances and rewrite it.
51875  # Note: m4 eats our [], so we need to use [ and ] instead.
51876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51877  if test "x$has_forbidden_chars" != x; then
51878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51882      # Going to short mode and back again did indeed matter. Since short mode is
51883      # case insensitive, let's make it lowercase to improve readability.
51884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51885      # Now convert it back to Unix-style (cygpath)
51886      input_path=`$CYGPATH -u "$shortmode_path"`
51887      new_path="$input_path"
51888    fi
51889  fi
51890
51891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51892  if test "x$test_cygdrive_prefix" = x; then
51893    # As a simple fix, exclude /usr/bin since it's not a real path.
51894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51896      # a path prefixed by /cygdrive for fixpath to work.
51897      new_path="$CYGWIN_ROOT_PATH$input_path"
51898    fi
51899  fi
51900
51901
51902  if test "x$path" != "x$new_path"; then
51903    MSVC_DLL="$new_path"
51904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51905$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51906  fi
51907
51908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51909
51910  path="$MSVC_DLL"
51911  has_colon=`$ECHO $path | $GREP ^.:`
51912  new_path="$path"
51913  if test "x$has_colon" = x; then
51914    # Not in mixed or Windows style, start by that.
51915    new_path=`cmd //c echo $path`
51916  fi
51917
51918
51919  input_path="$new_path"
51920  # Check if we need to convert this using DOS-style short mode. If the path
51921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51922  # take no chances and rewrite it.
51923  # Note: m4 eats our [], so we need to use [ and ] instead.
51924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51925  if test "x$has_forbidden_chars" != x; then
51926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51928  fi
51929
51930
51931  windows_path="$new_path"
51932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51933    unix_path=`$CYGPATH -u "$windows_path"`
51934    new_path="$unix_path"
51935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51937    new_path="$unix_path"
51938  fi
51939
51940  if test "x$path" != "x$new_path"; then
51941    MSVC_DLL="$new_path"
51942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51943$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51944  fi
51945
51946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51948
51949    else
51950      # We're on a unix platform. Hooray! :)
51951      path="$MSVC_DLL"
51952      has_space=`$ECHO "$path" | $GREP " "`
51953      if test "x$has_space" != x; then
51954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51955$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51957      fi
51958
51959      # Use eval to expand a potential ~
51960      eval path="$path"
51961      if test ! -f "$path" && test ! -d "$path"; then
51962        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51963      fi
51964
51965      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51966    fi
51967  fi
51968
51969      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51970$as_echo_n "checking for $DLL_NAME... " >&6; }
51971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51972$as_echo "$MSVC_DLL" >&6; }
51973    else
51974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51975$as_echo "incorrect, ignoring" >&6; }
51976      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51977$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51978    fi
51979  fi
51980
51981    fi
51982  fi
51983
51984  if test "x$MSVC_DLL" = x; then
51985    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51986    # (This was the original behaviour; kept since it might turn something up)
51987    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51988      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51989        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51990	    | $GREP x64 | $HEAD --lines 1`
51991      else
51992        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51993	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51994        if test "x$POSSIBLE_MSVC_DLL" = x; then
51995          # We're grasping at straws now...
51996          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51997	      | $HEAD --lines 1`
51998        fi
51999      fi
52000
52001
52002  DLL_NAME="$DLL_NAME"
52003  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52004  METHOD="search of VCINSTALLDIR"
52005  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52006    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52007$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52008
52009    # Need to check if the found msvcr is correct architecture
52010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52011$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52012    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52014      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52015      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52016      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52017        CORRECT_MSVCR_ARCH="PE32 executable"
52018      else
52019        CORRECT_MSVCR_ARCH="PE32+ executable"
52020      fi
52021    else
52022      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52023        CORRECT_MSVCR_ARCH=386
52024      else
52025        CORRECT_MSVCR_ARCH=x86-64
52026      fi
52027    fi
52028    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52030$as_echo "ok" >&6; }
52031      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52032
52033  # Only process if variable expands to non-empty
52034
52035  if test "x$MSVC_DLL" != x; then
52036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52037
52038  # Input might be given as Windows format, start by converting to
52039  # unix format.
52040  path="$MSVC_DLL"
52041  new_path=`$CYGPATH -u "$path"`
52042
52043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52046  # "foo.exe" is OK but "foo" is an error.
52047  #
52048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52049  # It is also a way to make sure we got the proper file name for the real test later on.
52050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52051  if test "x$test_shortpath" = x; then
52052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52053$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52054    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52055  fi
52056
52057  # Call helper function which possibly converts this using DOS-style short mode.
52058  # If so, the updated path is stored in $new_path.
52059
52060  input_path="$new_path"
52061  # Check if we need to convert this using DOS-style short mode. If the path
52062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52063  # take no chances and rewrite it.
52064  # Note: m4 eats our [], so we need to use [ and ] instead.
52065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52066  if test "x$has_forbidden_chars" != x; then
52067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52071      # Going to short mode and back again did indeed matter. Since short mode is
52072      # case insensitive, let's make it lowercase to improve readability.
52073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52074      # Now convert it back to Unix-style (cygpath)
52075      input_path=`$CYGPATH -u "$shortmode_path"`
52076      new_path="$input_path"
52077    fi
52078  fi
52079
52080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52081  if test "x$test_cygdrive_prefix" = x; then
52082    # As a simple fix, exclude /usr/bin since it's not a real path.
52083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52085      # a path prefixed by /cygdrive for fixpath to work.
52086      new_path="$CYGWIN_ROOT_PATH$input_path"
52087    fi
52088  fi
52089
52090
52091  if test "x$path" != "x$new_path"; then
52092    MSVC_DLL="$new_path"
52093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52094$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52095  fi
52096
52097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52098
52099  path="$MSVC_DLL"
52100  has_colon=`$ECHO $path | $GREP ^.:`
52101  new_path="$path"
52102  if test "x$has_colon" = x; then
52103    # Not in mixed or Windows style, start by that.
52104    new_path=`cmd //c echo $path`
52105  fi
52106
52107
52108  input_path="$new_path"
52109  # Check if we need to convert this using DOS-style short mode. If the path
52110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52111  # take no chances and rewrite it.
52112  # Note: m4 eats our [], so we need to use [ and ] instead.
52113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52114  if test "x$has_forbidden_chars" != x; then
52115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52117  fi
52118
52119
52120  windows_path="$new_path"
52121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52122    unix_path=`$CYGPATH -u "$windows_path"`
52123    new_path="$unix_path"
52124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52126    new_path="$unix_path"
52127  fi
52128
52129  if test "x$path" != "x$new_path"; then
52130    MSVC_DLL="$new_path"
52131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52132$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52133  fi
52134
52135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52137
52138    else
52139      # We're on a unix platform. Hooray! :)
52140      path="$MSVC_DLL"
52141      has_space=`$ECHO "$path" | $GREP " "`
52142      if test "x$has_space" != x; then
52143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52144$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52146      fi
52147
52148      # Use eval to expand a potential ~
52149      eval path="$path"
52150      if test ! -f "$path" && test ! -d "$path"; then
52151        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52152      fi
52153
52154      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52155    fi
52156  fi
52157
52158      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52159$as_echo_n "checking for $DLL_NAME... " >&6; }
52160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52161$as_echo "$MSVC_DLL" >&6; }
52162    else
52163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52164$as_echo "incorrect, ignoring" >&6; }
52165      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52166$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52167    fi
52168  fi
52169
52170    fi
52171  fi
52172
52173  if test "x$MSVC_DLL" = x; then
52174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52175$as_echo_n "checking for $DLL_NAME... " >&6; }
52176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52177$as_echo "no" >&6; }
52178    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52179  fi
52180
52181      MSVCP_DLL="$MSVC_DLL"
52182    fi
52183
52184  fi
52185
52186
52187
52188# Check whether --with-dxsdk was given.
52189if test "${with_dxsdk+set}" = set; then :
52190  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52191$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52192fi
52193
52194
52195
52196
52197# Check whether --with-dxsdk-lib was given.
52198if test "${with_dxsdk_lib+set}" = set; then :
52199  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52200$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52201fi
52202
52203
52204
52205
52206# Check whether --with-dxsdk-include was given.
52207if test "${with_dxsdk_include+set}" = set; then :
52208  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52209$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52210fi
52211
52212
52213  fi
52214
52215
52216###############################################################################
52217#
52218# We need to do some final tweaking, when everything else is done.
52219#
52220###############################################################################
52221
52222
52223  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52224
52225
52226  # The name of the Service Agent jar.
52227  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52228  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52229    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52230  fi
52231
52232
52233
52234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52235$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52236
52237    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52238      ENABLE_INTREE_EC=yes
52239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52240$as_echo "yes" >&6; }
52241    else
52242      ENABLE_INTREE_EC=no
52243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52244$as_echo "no" >&6; }
52245    fi
52246
52247
52248
52249
52250###############################################################################
52251#
52252# Configure parts of the build that only affect the build performance,
52253# not the result.
52254#
52255###############################################################################
52256
52257
52258  # How many cores do we have on this build system?
52259
52260# Check whether --with-num-cores was given.
52261if test "${with_num_cores+set}" = set; then :
52262  withval=$with_num_cores;
52263fi
52264
52265  if test "x$with_num_cores" = x; then
52266    # The number of cores were not specified, try to probe them.
52267
52268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52269$as_echo_n "checking for number of cores... " >&6; }
52270  NUM_CORES=1
52271  FOUND_CORES=no
52272
52273  if test -f /proc/cpuinfo; then
52274    # Looks like a Linux (or cygwin) system
52275    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52276    FOUND_CORES=yes
52277  elif test -x /usr/sbin/psrinfo; then
52278    # Looks like a Solaris system
52279    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52280    FOUND_CORES=yes
52281  elif test -x /usr/sbin/system_profiler; then
52282    # Looks like a MacOSX system
52283    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52284    FOUND_CORES=yes
52285  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52286    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52287    FOUND_CORES=yes
52288  elif test -n "$NUMBER_OF_PROCESSORS"; then
52289    # On windows, look in the env
52290    NUM_CORES=$NUMBER_OF_PROCESSORS
52291    FOUND_CORES=yes
52292  fi
52293
52294  if test "x$FOUND_CORES" = xyes; then
52295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52296$as_echo "$NUM_CORES" >&6; }
52297  else
52298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52299$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52300    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52301$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52302  fi
52303
52304  else
52305    NUM_CORES=$with_num_cores
52306  fi
52307
52308
52309
52310  # How much memory do we have on this build system?
52311
52312# Check whether --with-memory-size was given.
52313if test "${with_memory_size+set}" = set; then :
52314  withval=$with_memory_size;
52315fi
52316
52317  if test "x$with_memory_size" = x; then
52318    # The memory size was not specified, try to probe it.
52319
52320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52321$as_echo_n "checking for memory size... " >&6; }
52322  # Default to 1024 MB
52323  MEMORY_SIZE=1024
52324  FOUND_MEM=no
52325
52326  if test -f /proc/meminfo; then
52327    # Looks like a Linux (or cygwin) system
52328    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52329    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52330    FOUND_MEM=yes
52331  elif test -x /usr/sbin/prtconf; then
52332    # Looks like a Solaris or AIX system
52333    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52334    FOUND_MEM=yes
52335  elif test -x /usr/sbin/system_profiler; then
52336    # Looks like a MacOSX system
52337    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52338    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52339    FOUND_MEM=yes
52340  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52341    # Windows, but without cygwin
52342    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52343    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52344    FOUND_MEM=yes
52345  fi
52346
52347  if test "x$FOUND_MEM" = xyes; then
52348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52349$as_echo "$MEMORY_SIZE MB" >&6; }
52350  else
52351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52352$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52353    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52354$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52355  fi
52356
52357  else
52358    MEMORY_SIZE=$with_memory_size
52359  fi
52360
52361
52362
52363  # Provide a decent default number of parallel jobs for make depending on
52364  # number of cores, amount of memory and machine architecture.
52365
52366# Check whether --with-jobs was given.
52367if test "${with_jobs+set}" = set; then :
52368  withval=$with_jobs;
52369fi
52370
52371  if test "x$with_jobs" = x; then
52372    # Number of jobs was not specified, calculate.
52373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52374$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52375    # Approximate memory in GB.
52376    memory_gb=`expr $MEMORY_SIZE / 1024`
52377    # Pick the lowest of memory in gb and number of cores.
52378    if test "$memory_gb" -lt "$NUM_CORES"; then
52379      JOBS="$memory_gb"
52380    else
52381      JOBS="$NUM_CORES"
52382      # On bigger machines, leave some room for other processes to run
52383      if test "$JOBS" -gt "4"; then
52384        JOBS=`expr $JOBS '*' 90 / 100`
52385      fi
52386    fi
52387    # Cap number of jobs to 16
52388    if test "$JOBS" -gt "16"; then
52389      JOBS=16
52390    fi
52391    if test "$JOBS" -eq "0"; then
52392      JOBS=1
52393    fi
52394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52395$as_echo "$JOBS" >&6; }
52396  else
52397    JOBS=$with_jobs
52398  fi
52399
52400
52401
52402# Setup arguments for the boot jdk (after cores and memory have been setup)
52403
52404  ##############################################################################
52405  #
52406  # Specify jvm options for anything that is run with the Boot JDK.
52407  # Not all JVM:s accept the same arguments on the command line.
52408  #
52409
52410# Check whether --with-boot-jdk-jvmargs was given.
52411if test "${with_boot_jdk_jvmargs+set}" = set; then :
52412  withval=$with_boot_jdk_jvmargs;
52413fi
52414
52415
52416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52417$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52418
52419  # Disable special log output when a debug build is used as Boot JDK...
52420
52421  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52422  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52423  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52424  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52425  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52426  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52427    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52428    JVM_ARG_OK=true
52429  else
52430    $ECHO "Arg failed:" >&5
52431    $ECHO "$OUTPUT" >&5
52432    JVM_ARG_OK=false
52433  fi
52434
52435
52436  # Apply user provided options.
52437
52438  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52439  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52440  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52441  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52442  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52443  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52444    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52445    JVM_ARG_OK=true
52446  else
52447    $ECHO "Arg failed:" >&5
52448    $ECHO "$OUTPUT" >&5
52449    JVM_ARG_OK=false
52450  fi
52451
52452
52453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52454$as_echo "$boot_jdk_jvmargs" >&6; }
52455
52456  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52457  JAVA_FLAGS=$boot_jdk_jvmargs
52458
52459
52460
52461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52462$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52463
52464  # Starting amount of heap memory.
52465
52466  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52467  $ECHO "Command: $JAVA -Xms64M -version" >&5
52468  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52469  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52470  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52471  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52472    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52473    JVM_ARG_OK=true
52474  else
52475    $ECHO "Arg failed:" >&5
52476    $ECHO "$OUTPUT" >&5
52477    JVM_ARG_OK=false
52478  fi
52479
52480
52481  # Maximum amount of heap memory.
52482  # Maximum stack size.
52483  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52484  if test "x$BUILD_NUM_BITS" = x32; then
52485    if test "$JVM_MAX_HEAP" -gt "1100"; then
52486      JVM_MAX_HEAP=1100
52487    elif test "$JVM_MAX_HEAP" -lt "512"; then
52488      JVM_MAX_HEAP=512
52489    fi
52490    STACK_SIZE=768
52491  else
52492    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52493    # pointers are used. Apparently, we need to increase the heap and stack
52494    # space for the jvm. More specifically, when running javac to build huge
52495    # jdk batch
52496    if test "$JVM_MAX_HEAP" -gt "1600"; then
52497      JVM_MAX_HEAP=1600
52498    elif test "$JVM_MAX_HEAP" -lt "512"; then
52499      JVM_MAX_HEAP=512
52500    fi
52501    STACK_SIZE=1536
52502  fi
52503
52504  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52505  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52506  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52507  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52508  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52509  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52510    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52511    JVM_ARG_OK=true
52512  else
52513    $ECHO "Arg failed:" >&5
52514    $ECHO "$OUTPUT" >&5
52515    JVM_ARG_OK=false
52516  fi
52517
52518
52519  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52520  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52521  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52522  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52523  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52524  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52525    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52526    JVM_ARG_OK=true
52527  else
52528    $ECHO "Arg failed:" >&5
52529    $ECHO "$OUTPUT" >&5
52530    JVM_ARG_OK=false
52531  fi
52532
52533
52534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52535$as_echo "$boot_jdk_jvmargs_big" >&6; }
52536
52537  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52538
52539
52540
52541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52542$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52543
52544  # Use serial gc for small short lived tools if possible
52545
52546  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52547  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52548  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52549  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52550  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52551  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52552    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52553    JVM_ARG_OK=true
52554  else
52555    $ECHO "Arg failed:" >&5
52556    $ECHO "$OUTPUT" >&5
52557    JVM_ARG_OK=false
52558  fi
52559
52560
52561  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52562  $ECHO "Command: $JAVA -Xms32M -version" >&5
52563  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52564  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52565  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52566  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52567    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52568    JVM_ARG_OK=true
52569  else
52570    $ECHO "Arg failed:" >&5
52571    $ECHO "$OUTPUT" >&5
52572    JVM_ARG_OK=false
52573  fi
52574
52575
52576  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52577  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52578  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52579  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52580  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52581  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52582    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52583    JVM_ARG_OK=true
52584  else
52585    $ECHO "Arg failed:" >&5
52586    $ECHO "$OUTPUT" >&5
52587    JVM_ARG_OK=false
52588  fi
52589
52590
52591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52592$as_echo "$boot_jdk_jvmargs_small" >&6; }
52593
52594  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52595
52596
52597  JAVA_TOOL_FLAGS_SMALL=""
52598  for f in $JAVA_FLAGS_SMALL; do
52599    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52600  done
52601
52602
52603
52604# Setup smart javac (after cores and memory have been setup)
52605
52606
52607# Check whether --with-sjavac-server-java was given.
52608if test "${with_sjavac_server_java+set}" = set; then :
52609  withval=$with_sjavac_server_java;
52610fi
52611
52612
52613  if test "x$with_sjavac_server_java" != x; then
52614    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52615    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52616    if test "x$FOUND_VERSION" = x; then
52617      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52618    fi
52619  else
52620    SJAVAC_SERVER_JAVA="$JAVA"
52621  fi
52622
52623
52624  if test "$MEMORY_SIZE" -gt "3000"; then
52625
52626  $ECHO "Check if jvm arg is ok: -d64" >&5
52627  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52628  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52629  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52630  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52631  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52632    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52633    JVM_ARG_OK=true
52634  else
52635    $ECHO "Arg failed:" >&5
52636    $ECHO "$OUTPUT" >&5
52637    JVM_ARG_OK=false
52638  fi
52639
52640    if test "$JVM_ARG_OK" = true; then
52641      JVM_64BIT=true
52642      JVM_ARG_OK=false
52643    fi
52644  fi
52645
52646  MX_VALUE=`expr $MEMORY_SIZE / 2`
52647  if test "$JVM_64BIT" = true; then
52648    # Set ms lower than mx since more than one instance of the server might
52649    # get launched at the same time before they figure out which instance won.
52650    MS_VALUE=512
52651    if test "$MX_VALUE" -gt "2048"; then
52652      MX_VALUE=2048
52653    fi
52654  else
52655    MS_VALUE=256
52656    if test "$MX_VALUE" -gt "1500"; then
52657      MX_VALUE=1500
52658    fi
52659  fi
52660  if test "$MX_VALUE" -lt "512"; then
52661    MX_VALUE=512
52662  fi
52663
52664  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52665  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52666  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52667  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52668  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52669  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52670    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52671    JVM_ARG_OK=true
52672  else
52673    $ECHO "Arg failed:" >&5
52674    $ECHO "$OUTPUT" >&5
52675    JVM_ARG_OK=false
52676  fi
52677
52678
52679
52680  # Check whether --enable-sjavac was given.
52681if test "${enable_sjavac+set}" = set; then :
52682  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52683else
52684  ENABLE_SJAVAC='no'
52685fi
52686
52687  if test "x$JVM_ARG_OK" = "xfalse"; then
52688    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52689$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52690    ENABLE_SJAVAC=no;
52691  fi
52692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52693$as_echo_n "checking whether to use sjavac... " >&6; }
52694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52695$as_echo "$ENABLE_SJAVAC" >&6; }
52696
52697
52698
52699# Can the C/C++ compiler use precompiled headers?
52700
52701
52702  ###############################################################################
52703  #
52704  # Can the C/C++ compiler use precompiled headers?
52705  #
52706  # Check whether --enable-precompiled-headers was given.
52707if test "${enable_precompiled_headers+set}" = set; then :
52708  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52709else
52710  ENABLE_PRECOMPH=yes
52711fi
52712
52713
52714  USE_PRECOMPILED_HEADER=1
52715  if test "x$ENABLE_PRECOMPH" = xno; then
52716    USE_PRECOMPILED_HEADER=0
52717  fi
52718
52719  if test "x$ENABLE_PRECOMPH" = xyes; then
52720    # Check that the compiler actually supports precomp headers.
52721    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52723$as_echo_n "checking that precompiled headers work... " >&6; }
52724      echo "int alfa();" > conftest.h
52725      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52726      if test ! -f conftest.hpp.gch; then
52727        USE_PRECOMPILED_HEADER=0
52728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52729$as_echo "no" >&6; }
52730      else
52731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52732$as_echo "yes" >&6; }
52733      fi
52734      rm -f conftest.h conftest.hpp.gch
52735    fi
52736  fi
52737
52738
52739
52740
52741# Setup use of ccache, if available
52742
52743  # Check whether --enable-ccache was given.
52744if test "${enable_ccache+set}" = set; then :
52745  enableval=$enable_ccache;
52746fi
52747
52748
52749  CCACHE=
52750  CCACHE_STATUS=
52751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52752$as_echo_n "checking is ccache enabled... " >&6; }
52753  if test "x$enable_ccache" = xyes; then
52754    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52755      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52756$as_echo "yes" >&6; }
52757      OLD_PATH="$PATH"
52758      if test "x$TOOLCHAIN_PATH" != x; then
52759        PATH=$TOOLCHAIN_PATH:$PATH
52760      fi
52761
52762
52763
52764  # Publish this variable in the help.
52765
52766
52767  if test "x$CCACHE" = x; then
52768    # The variable is not set by user, try to locate tool using the code snippet
52769    for ac_prog in ccache
52770do
52771  # Extract the first word of "$ac_prog", so it can be a program name with args.
52772set dummy $ac_prog; ac_word=$2
52773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52774$as_echo_n "checking for $ac_word... " >&6; }
52775if ${ac_cv_path_CCACHE+:} false; then :
52776  $as_echo_n "(cached) " >&6
52777else
52778  case $CCACHE in
52779  [\\/]* | ?:[\\/]*)
52780  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52781  ;;
52782  *)
52783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52784for as_dir in $PATH
52785do
52786  IFS=$as_save_IFS
52787  test -z "$as_dir" && as_dir=.
52788    for ac_exec_ext in '' $ac_executable_extensions; do
52789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52790    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52792    break 2
52793  fi
52794done
52795  done
52796IFS=$as_save_IFS
52797
52798  ;;
52799esac
52800fi
52801CCACHE=$ac_cv_path_CCACHE
52802if test -n "$CCACHE"; then
52803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52804$as_echo "$CCACHE" >&6; }
52805else
52806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52807$as_echo "no" >&6; }
52808fi
52809
52810
52811  test -n "$CCACHE" && break
52812done
52813
52814  else
52815    # The variable is set, but is it from the command line or the environment?
52816
52817    # Try to remove the string !CCACHE! from our list.
52818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52820      # If it failed, the variable was not from the command line. Ignore it,
52821      # but warn the user (except for BASH, which is always set by the calling BASH).
52822      if test "xCCACHE" != xBASH; then
52823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52824$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52825      fi
52826      # Try to locate tool using the code snippet
52827      for ac_prog in ccache
52828do
52829  # Extract the first word of "$ac_prog", so it can be a program name with args.
52830set dummy $ac_prog; ac_word=$2
52831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52832$as_echo_n "checking for $ac_word... " >&6; }
52833if ${ac_cv_path_CCACHE+:} false; then :
52834  $as_echo_n "(cached) " >&6
52835else
52836  case $CCACHE in
52837  [\\/]* | ?:[\\/]*)
52838  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52839  ;;
52840  *)
52841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52842for as_dir in $PATH
52843do
52844  IFS=$as_save_IFS
52845  test -z "$as_dir" && as_dir=.
52846    for ac_exec_ext in '' $ac_executable_extensions; do
52847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52848    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52850    break 2
52851  fi
52852done
52853  done
52854IFS=$as_save_IFS
52855
52856  ;;
52857esac
52858fi
52859CCACHE=$ac_cv_path_CCACHE
52860if test -n "$CCACHE"; then
52861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52862$as_echo "$CCACHE" >&6; }
52863else
52864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52865$as_echo "no" >&6; }
52866fi
52867
52868
52869  test -n "$CCACHE" && break
52870done
52871
52872    else
52873      # If it succeeded, then it was overridden by the user. We will use it
52874      # for the tool.
52875
52876      # First remove it from the list of overridden variables, so we can test
52877      # for unknown variables in the end.
52878      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
52879
52880      # Check if the provided tool contains a complete path.
52881      tool_specified="$CCACHE"
52882      tool_basename="${tool_specified##*/}"
52883      if test "x$tool_basename" = "x$tool_specified"; then
52884        # A command without a complete path is provided, search $PATH.
52885        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
52886$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
52887        # Extract the first word of "$tool_basename", so it can be a program name with args.
52888set dummy $tool_basename; ac_word=$2
52889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52890$as_echo_n "checking for $ac_word... " >&6; }
52891if ${ac_cv_path_CCACHE+:} false; then :
52892  $as_echo_n "(cached) " >&6
52893else
52894  case $CCACHE in
52895  [\\/]* | ?:[\\/]*)
52896  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52897  ;;
52898  *)
52899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52900for as_dir in $PATH
52901do
52902  IFS=$as_save_IFS
52903  test -z "$as_dir" && as_dir=.
52904    for ac_exec_ext in '' $ac_executable_extensions; do
52905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52906    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52908    break 2
52909  fi
52910done
52911  done
52912IFS=$as_save_IFS
52913
52914  ;;
52915esac
52916fi
52917CCACHE=$ac_cv_path_CCACHE
52918if test -n "$CCACHE"; then
52919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52920$as_echo "$CCACHE" >&6; }
52921else
52922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52923$as_echo "no" >&6; }
52924fi
52925
52926
52927        if test "x$CCACHE" = x; then
52928          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52929        fi
52930      else
52931        # Otherwise we believe it is a complete path. Use it as it is.
52932        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52933$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52935$as_echo_n "checking for CCACHE... " >&6; }
52936        if test ! -x "$tool_specified"; then
52937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52938$as_echo "not found" >&6; }
52939          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52940        fi
52941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52942$as_echo "$tool_specified" >&6; }
52943      fi
52944    fi
52945  fi
52946
52947
52948
52949  if test "x$CCACHE" = x; then
52950    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52951  fi
52952
52953
52954      PATH="$OLD_PATH"
52955      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52956      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52957    else
52958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52959$as_echo "no" >&6; }
52960      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
52961$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
52962    fi
52963  elif test "x$enable_ccache" = xno; then
52964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52965$as_echo "no, explicitly disabled" >&6; }
52966    CCACHE_STATUS="Disabled"
52967  elif test "x$enable_ccache" = x; then
52968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52969$as_echo "no" >&6; }
52970  else
52971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52972$as_echo "unknown" >&6; }
52973    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52974  fi
52975
52976
52977
52978# Check whether --with-ccache-dir was given.
52979if test "${with_ccache_dir+set}" = set; then :
52980  withval=$with_ccache_dir;
52981fi
52982
52983
52984  if test "x$with_ccache_dir" != x; then
52985    # When using a non home ccache directory, assume the use is to share ccache files
52986    # with other users. Thus change the umask.
52987    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52988    if test "x$CCACHE" = x; then
52989      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52990$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52991    fi
52992  fi
52993
52994  if test "x$CCACHE" != x; then
52995
52996  if test "x$CCACHE" != x; then
52997    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
52998      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
52999          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53000      if test "x$HAS_BAD_CCACHE" != "x"; then
53001        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53002      fi
53003      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53004$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53005      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53006      PUSHED_FLAGS="$CXXFLAGS"
53007      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53008      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53009/* end confdefs.h.  */
53010
53011int
53012main ()
53013{
53014
53015  ;
53016  return 0;
53017}
53018_ACEOF
53019if ac_fn_cxx_try_compile "$LINENO"; then :
53020  CC_KNOWS_CCACHE_TRICK=yes
53021else
53022  CC_KNOWS_CCACHE_TRICK=no
53023fi
53024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53025      CXXFLAGS="$PUSHED_FLAGS"
53026      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53028$as_echo "yes" >&6; }
53029        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53030
53031        CCACHE_SLOPPINESS=pch_defines,time_macros
53032      else
53033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53034$as_echo "no" >&6; }
53035        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53036      fi
53037    fi
53038
53039    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53040        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53041
53042    if test "x$SET_CCACHE_DIR" != x; then
53043      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53044      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53045    fi
53046  fi
53047
53048  fi
53049
53050
53051###############################################################################
53052#
53053# And now the finish...
53054#
53055###############################################################################
53056
53057# Check for some common pitfalls
53058
53059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53060    file_to_test="$SRC_ROOT/LICENSE"
53061    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53062      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
53063    fi
53064  fi
53065
53066
53067  # Did user specify any unknown variables?
53068
53069  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53070    # Replace the separating ! with spaces before presenting for end user.
53071    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53072    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53073$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53074  fi
53075
53076
53077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53078$as_echo_n "checking if build directory is on local disk... " >&6; }
53079
53080  # df -l lists only local disks; if the given directory is not found then
53081  # a non-zero exit code is given
53082  if test "x$DF" = x; then
53083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53084      # msys does not have df; use Windows "net use" instead.
53085      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53086      if test "x$IS_NETWORK_DISK" = x; then
53087        OUTPUT_DIR_IS_LOCAL="yes"
53088      else
53089        OUTPUT_DIR_IS_LOCAL="no"
53090      fi
53091    else
53092      # No df here, say it's local
53093      OUTPUT_DIR_IS_LOCAL="yes"
53094    fi
53095  else
53096    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53097      OUTPUT_DIR_IS_LOCAL="yes"
53098    else
53099      OUTPUT_DIR_IS_LOCAL="no"
53100    fi
53101  fi
53102
53103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53104$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53105
53106
53107
53108  # Check if the user has any old-style ALT_ variables set.
53109  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53110
53111  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53112  # Since we can't properly handle the dependencies for this, warn the user about the situation
53113  if test -e $OUTPUT_ROOT/spec.gmk; then
53114    IS_RECONFIGURE=yes
53115  else
53116    IS_RECONFIGURE=no
53117  fi
53118
53119
53120# At the end, call the custom hook. (Dummy macro if no custom sources available)
53121
53122
53123# We're messing a bit with internal autoconf variables to put the config.status
53124# in the output directory instead of the current directory.
53125CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53126
53127# Create the actual output files. Now the main work of configure is done.
53128cat >confcache <<\_ACEOF
53129# This file is a shell script that caches the results of configure
53130# tests run on this system so they can be shared between configure
53131# scripts and configure runs, see configure's option --config-cache.
53132# It is not useful on other systems.  If it contains results you don't
53133# want to keep, you may remove or edit it.
53134#
53135# config.status only pays attention to the cache file if you give it
53136# the --recheck option to rerun configure.
53137#
53138# `ac_cv_env_foo' variables (set or unset) will be overridden when
53139# loading this file, other *unset* `ac_cv_foo' will be assigned the
53140# following values.
53141
53142_ACEOF
53143
53144# The following way of writing the cache mishandles newlines in values,
53145# but we know of no workaround that is simple, portable, and efficient.
53146# So, we kill variables containing newlines.
53147# Ultrix sh set writes to stderr and can't be redirected directly,
53148# and sets the high bit in the cache file unless we assign to the vars.
53149(
53150  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53151    eval ac_val=\$$ac_var
53152    case $ac_val in #(
53153    *${as_nl}*)
53154      case $ac_var in #(
53155      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53156$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53157      esac
53158      case $ac_var in #(
53159      _ | IFS | as_nl) ;; #(
53160      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53161      *) { eval $ac_var=; unset $ac_var;} ;;
53162      esac ;;
53163    esac
53164  done
53165
53166  (set) 2>&1 |
53167    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53168    *${as_nl}ac_space=\ *)
53169      # `set' does not quote correctly, so add quotes: double-quote
53170      # substitution turns \\\\ into \\, and sed turns \\ into \.
53171      sed -n \
53172	"s/'/'\\\\''/g;
53173	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53174      ;; #(
53175    *)
53176      # `set' quotes correctly as required by POSIX, so do not add quotes.
53177      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53178      ;;
53179    esac |
53180    sort
53181) |
53182  sed '
53183     /^ac_cv_env_/b end
53184     t clear
53185     :clear
53186     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53187     t end
53188     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53189     :end' >>confcache
53190if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53191  if test -w "$cache_file"; then
53192    if test "x$cache_file" != "x/dev/null"; then
53193      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53194$as_echo "$as_me: updating cache $cache_file" >&6;}
53195      if test ! -f "$cache_file" || test -h "$cache_file"; then
53196	cat confcache >"$cache_file"
53197      else
53198        case $cache_file in #(
53199        */* | ?:*)
53200	  mv -f confcache "$cache_file"$$ &&
53201	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53202        *)
53203	  mv -f confcache "$cache_file" ;;
53204	esac
53205      fi
53206    fi
53207  else
53208    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53209$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53210  fi
53211fi
53212rm -f confcache
53213
53214test "x$prefix" = xNONE && prefix=$ac_default_prefix
53215# Let make expand exec_prefix.
53216test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53217
53218# Transform confdefs.h into DEFS.
53219# Protect against shell expansion while executing Makefile rules.
53220# Protect against Makefile macro expansion.
53221#
53222# If the first sed substitution is executed (which looks for macros that
53223# take arguments), then branch to the quote section.  Otherwise,
53224# look for a macro that doesn't take arguments.
53225ac_script='
53226:mline
53227/\\$/{
53228 N
53229 s,\\\n,,
53230 b mline
53231}
53232t clear
53233:clear
53234s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53235t quote
53236s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53237t quote
53238b any
53239:quote
53240s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53241s/\[/\\&/g
53242s/\]/\\&/g
53243s/\$/$$/g
53244H
53245:any
53246${
53247	g
53248	s/^\n//
53249	s/\n/ /g
53250	p
53251}
53252'
53253DEFS=`sed -n "$ac_script" confdefs.h`
53254
53255
53256ac_libobjs=
53257ac_ltlibobjs=
53258U=
53259for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53260  # 1. Remove the extension, and $U if already installed.
53261  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53262  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53263  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53264  #    will be set to the directory where LIBOBJS objects are built.
53265  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53266  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53267done
53268LIBOBJS=$ac_libobjs
53269
53270LTLIBOBJS=$ac_ltlibobjs
53271
53272
53273
53274: "${CONFIG_STATUS=./config.status}"
53275ac_write_fail=0
53276ac_clean_files_save=$ac_clean_files
53277ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53278{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53279$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53280as_write_fail=0
53281cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53282#! $SHELL
53283# Generated by $as_me.
53284# Run this file to recreate the current configuration.
53285# Compiler output produced by configure, useful for debugging
53286# configure, is in config.log if it exists.
53287
53288debug=false
53289ac_cs_recheck=false
53290ac_cs_silent=false
53291
53292SHELL=\${CONFIG_SHELL-$SHELL}
53293export SHELL
53294_ASEOF
53295cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53296## -------------------- ##
53297## M4sh Initialization. ##
53298## -------------------- ##
53299
53300# Be more Bourne compatible
53301DUALCASE=1; export DUALCASE # for MKS sh
53302if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53303  emulate sh
53304  NULLCMD=:
53305  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53306  # is contrary to our usage.  Disable this feature.
53307  alias -g '${1+"$@"}'='"$@"'
53308  setopt NO_GLOB_SUBST
53309else
53310  case `(set -o) 2>/dev/null` in #(
53311  *posix*) :
53312    set -o posix ;; #(
53313  *) :
53314     ;;
53315esac
53316fi
53317
53318
53319as_nl='
53320'
53321export as_nl
53322# Printing a long string crashes Solaris 7 /usr/bin/printf.
53323as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53324as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53325as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53326# Prefer a ksh shell builtin over an external printf program on Solaris,
53327# but without wasting forks for bash or zsh.
53328if test -z "$BASH_VERSION$ZSH_VERSION" \
53329    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53330  as_echo='print -r --'
53331  as_echo_n='print -rn --'
53332elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53333  as_echo='printf %s\n'
53334  as_echo_n='printf %s'
53335else
53336  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53337    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53338    as_echo_n='/usr/ucb/echo -n'
53339  else
53340    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53341    as_echo_n_body='eval
53342      arg=$1;
53343      case $arg in #(
53344      *"$as_nl"*)
53345	expr "X$arg" : "X\\(.*\\)$as_nl";
53346	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53347      esac;
53348      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53349    '
53350    export as_echo_n_body
53351    as_echo_n='sh -c $as_echo_n_body as_echo'
53352  fi
53353  export as_echo_body
53354  as_echo='sh -c $as_echo_body as_echo'
53355fi
53356
53357# The user is always right.
53358if test "${PATH_SEPARATOR+set}" != set; then
53359  PATH_SEPARATOR=:
53360  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53361    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53362      PATH_SEPARATOR=';'
53363  }
53364fi
53365
53366
53367# IFS
53368# We need space, tab and new line, in precisely that order.  Quoting is
53369# there to prevent editors from complaining about space-tab.
53370# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53371# splitting by setting IFS to empty value.)
53372IFS=" ""	$as_nl"
53373
53374# Find who we are.  Look in the path if we contain no directory separator.
53375as_myself=
53376case $0 in #((
53377  *[\\/]* ) as_myself=$0 ;;
53378  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53379for as_dir in $PATH
53380do
53381  IFS=$as_save_IFS
53382  test -z "$as_dir" && as_dir=.
53383    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53384  done
53385IFS=$as_save_IFS
53386
53387     ;;
53388esac
53389# We did not find ourselves, most probably we were run as `sh COMMAND'
53390# in which case we are not to be found in the path.
53391if test "x$as_myself" = x; then
53392  as_myself=$0
53393fi
53394if test ! -f "$as_myself"; then
53395  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53396  exit 1
53397fi
53398
53399# Unset variables that we do not need and which cause bugs (e.g. in
53400# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53401# suppresses any "Segmentation fault" message there.  '((' could
53402# trigger a bug in pdksh 5.2.14.
53403for as_var in BASH_ENV ENV MAIL MAILPATH
53404do eval test x\${$as_var+set} = xset \
53405  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53406done
53407PS1='$ '
53408PS2='> '
53409PS4='+ '
53410
53411# NLS nuisances.
53412LC_ALL=C
53413export LC_ALL
53414LANGUAGE=C
53415export LANGUAGE
53416
53417# CDPATH.
53418(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53419
53420
53421# as_fn_error STATUS ERROR [LINENO LOG_FD]
53422# ----------------------------------------
53423# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53424# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53425# script with STATUS, using 1 if that was 0.
53426as_fn_error ()
53427{
53428  as_status=$1; test $as_status -eq 0 && as_status=1
53429  if test "$4"; then
53430    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53431    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53432  fi
53433  $as_echo "$as_me: error: $2" >&2
53434  as_fn_exit $as_status
53435} # as_fn_error
53436
53437
53438# as_fn_set_status STATUS
53439# -----------------------
53440# Set $? to STATUS, without forking.
53441as_fn_set_status ()
53442{
53443  return $1
53444} # as_fn_set_status
53445
53446# as_fn_exit STATUS
53447# -----------------
53448# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53449as_fn_exit ()
53450{
53451  set +e
53452  as_fn_set_status $1
53453  exit $1
53454} # as_fn_exit
53455
53456# as_fn_unset VAR
53457# ---------------
53458# Portably unset VAR.
53459as_fn_unset ()
53460{
53461  { eval $1=; unset $1;}
53462}
53463as_unset=as_fn_unset
53464# as_fn_append VAR VALUE
53465# ----------------------
53466# Append the text in VALUE to the end of the definition contained in VAR. Take
53467# advantage of any shell optimizations that allow amortized linear growth over
53468# repeated appends, instead of the typical quadratic growth present in naive
53469# implementations.
53470if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53471  eval 'as_fn_append ()
53472  {
53473    eval $1+=\$2
53474  }'
53475else
53476  as_fn_append ()
53477  {
53478    eval $1=\$$1\$2
53479  }
53480fi # as_fn_append
53481
53482# as_fn_arith ARG...
53483# ------------------
53484# Perform arithmetic evaluation on the ARGs, and store the result in the
53485# global $as_val. Take advantage of shells that can avoid forks. The arguments
53486# must be portable across $(()) and expr.
53487if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53488  eval 'as_fn_arith ()
53489  {
53490    as_val=$(( $* ))
53491  }'
53492else
53493  as_fn_arith ()
53494  {
53495    as_val=`expr "$@" || test $? -eq 1`
53496  }
53497fi # as_fn_arith
53498
53499
53500if expr a : '\(a\)' >/dev/null 2>&1 &&
53501   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53502  as_expr=expr
53503else
53504  as_expr=false
53505fi
53506
53507if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53508  as_basename=basename
53509else
53510  as_basename=false
53511fi
53512
53513if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53514  as_dirname=dirname
53515else
53516  as_dirname=false
53517fi
53518
53519as_me=`$as_basename -- "$0" ||
53520$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53521	 X"$0" : 'X\(//\)$' \| \
53522	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53523$as_echo X/"$0" |
53524    sed '/^.*\/\([^/][^/]*\)\/*$/{
53525	    s//\1/
53526	    q
53527	  }
53528	  /^X\/\(\/\/\)$/{
53529	    s//\1/
53530	    q
53531	  }
53532	  /^X\/\(\/\).*/{
53533	    s//\1/
53534	    q
53535	  }
53536	  s/.*/./; q'`
53537
53538# Avoid depending upon Character Ranges.
53539as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53540as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53541as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53542as_cr_digits='0123456789'
53543as_cr_alnum=$as_cr_Letters$as_cr_digits
53544
53545ECHO_C= ECHO_N= ECHO_T=
53546case `echo -n x` in #(((((
53547-n*)
53548  case `echo 'xy\c'` in
53549  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53550  xy)  ECHO_C='\c';;
53551  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53552       ECHO_T='	';;
53553  esac;;
53554*)
53555  ECHO_N='-n';;
53556esac
53557
53558rm -f conf$$ conf$$.exe conf$$.file
53559if test -d conf$$.dir; then
53560  rm -f conf$$.dir/conf$$.file
53561else
53562  rm -f conf$$.dir
53563  mkdir conf$$.dir 2>/dev/null
53564fi
53565if (echo >conf$$.file) 2>/dev/null; then
53566  if ln -s conf$$.file conf$$ 2>/dev/null; then
53567    as_ln_s='ln -s'
53568    # ... but there are two gotchas:
53569    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53570    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53571    # In both cases, we have to default to `cp -pR'.
53572    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53573      as_ln_s='cp -pR'
53574  elif ln conf$$.file conf$$ 2>/dev/null; then
53575    as_ln_s=ln
53576  else
53577    as_ln_s='cp -pR'
53578  fi
53579else
53580  as_ln_s='cp -pR'
53581fi
53582rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53583rmdir conf$$.dir 2>/dev/null
53584
53585
53586# as_fn_mkdir_p
53587# -------------
53588# Create "$as_dir" as a directory, including parents if necessary.
53589as_fn_mkdir_p ()
53590{
53591
53592  case $as_dir in #(
53593  -*) as_dir=./$as_dir;;
53594  esac
53595  test -d "$as_dir" || eval $as_mkdir_p || {
53596    as_dirs=
53597    while :; do
53598      case $as_dir in #(
53599      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53600      *) as_qdir=$as_dir;;
53601      esac
53602      as_dirs="'$as_qdir' $as_dirs"
53603      as_dir=`$as_dirname -- "$as_dir" ||
53604$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53605	 X"$as_dir" : 'X\(//\)[^/]' \| \
53606	 X"$as_dir" : 'X\(//\)$' \| \
53607	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53608$as_echo X"$as_dir" |
53609    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53610	    s//\1/
53611	    q
53612	  }
53613	  /^X\(\/\/\)[^/].*/{
53614	    s//\1/
53615	    q
53616	  }
53617	  /^X\(\/\/\)$/{
53618	    s//\1/
53619	    q
53620	  }
53621	  /^X\(\/\).*/{
53622	    s//\1/
53623	    q
53624	  }
53625	  s/.*/./; q'`
53626      test -d "$as_dir" && break
53627    done
53628    test -z "$as_dirs" || eval "mkdir $as_dirs"
53629  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53630
53631
53632} # as_fn_mkdir_p
53633if mkdir -p . 2>/dev/null; then
53634  as_mkdir_p='mkdir -p "$as_dir"'
53635else
53636  test -d ./-p && rmdir ./-p
53637  as_mkdir_p=false
53638fi
53639
53640
53641# as_fn_executable_p FILE
53642# -----------------------
53643# Test if FILE is an executable regular file.
53644as_fn_executable_p ()
53645{
53646  test -f "$1" && test -x "$1"
53647} # as_fn_executable_p
53648as_test_x='test -x'
53649as_executable_p=as_fn_executable_p
53650
53651# Sed expression to map a string onto a valid CPP name.
53652as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53653
53654# Sed expression to map a string onto a valid variable name.
53655as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53656
53657
53658exec 6>&1
53659## ----------------------------------- ##
53660## Main body of $CONFIG_STATUS script. ##
53661## ----------------------------------- ##
53662_ASEOF
53663test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53664
53665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53666# Save the log message, to keep $0 and so on meaningful, and to
53667# report actual input values of CONFIG_FILES etc. instead of their
53668# values after options handling.
53669ac_log="
53670This file was extended by OpenJDK $as_me jdk9, which was
53671generated by GNU Autoconf 2.69.  Invocation command line was
53672
53673  CONFIG_FILES    = $CONFIG_FILES
53674  CONFIG_HEADERS  = $CONFIG_HEADERS
53675  CONFIG_LINKS    = $CONFIG_LINKS
53676  CONFIG_COMMANDS = $CONFIG_COMMANDS
53677  $ $0 $@
53678
53679on `(hostname || uname -n) 2>/dev/null | sed 1q`
53680"
53681
53682_ACEOF
53683
53684case $ac_config_files in *"
53685"*) set x $ac_config_files; shift; ac_config_files=$*;;
53686esac
53687
53688
53689
53690cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53691# Files that config.status was made for.
53692config_files="$ac_config_files"
53693
53694_ACEOF
53695
53696cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53697ac_cs_usage="\
53698\`$as_me' instantiates files and other configuration actions
53699from templates according to the current configuration.  Unless the files
53700and actions are specified as TAGs, all are instantiated by default.
53701
53702Usage: $0 [OPTION]... [TAG]...
53703
53704  -h, --help       print this help, then exit
53705  -V, --version    print version number and configuration settings, then exit
53706      --config     print configuration, then exit
53707  -q, --quiet, --silent
53708                   do not print progress messages
53709  -d, --debug      don't remove temporary files
53710      --recheck    update $as_me by reconfiguring in the same conditions
53711      --file=FILE[:TEMPLATE]
53712                   instantiate the configuration file FILE
53713
53714Configuration files:
53715$config_files
53716
53717Report bugs to <build-dev@openjdk.java.net>.
53718OpenJDK home page: <http://openjdk.java.net>."
53719
53720_ACEOF
53721cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53722ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53723ac_cs_version="\\
53724OpenJDK config.status jdk9
53725configured by $0, generated by GNU Autoconf 2.69,
53726  with options \\"\$ac_cs_config\\"
53727
53728Copyright (C) 2012 Free Software Foundation, Inc.
53729This config.status script is free software; the Free Software Foundation
53730gives unlimited permission to copy, distribute and modify it."
53731
53732ac_pwd='$ac_pwd'
53733srcdir='$srcdir'
53734AWK='$AWK'
53735test -n "\$AWK" || AWK=awk
53736_ACEOF
53737
53738cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53739# The default lists apply if the user does not specify any file.
53740ac_need_defaults=:
53741while test $# != 0
53742do
53743  case $1 in
53744  --*=?*)
53745    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53746    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53747    ac_shift=:
53748    ;;
53749  --*=)
53750    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53751    ac_optarg=
53752    ac_shift=:
53753    ;;
53754  *)
53755    ac_option=$1
53756    ac_optarg=$2
53757    ac_shift=shift
53758    ;;
53759  esac
53760
53761  case $ac_option in
53762  # Handling of the options.
53763  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53764    ac_cs_recheck=: ;;
53765  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53766    $as_echo "$ac_cs_version"; exit ;;
53767  --config | --confi | --conf | --con | --co | --c )
53768    $as_echo "$ac_cs_config"; exit ;;
53769  --debug | --debu | --deb | --de | --d | -d )
53770    debug=: ;;
53771  --file | --fil | --fi | --f )
53772    $ac_shift
53773    case $ac_optarg in
53774    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53775    '') as_fn_error $? "missing file argument" ;;
53776    esac
53777    as_fn_append CONFIG_FILES " '$ac_optarg'"
53778    ac_need_defaults=false;;
53779  --he | --h |  --help | --hel | -h )
53780    $as_echo "$ac_cs_usage"; exit ;;
53781  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53782  | -silent | --silent | --silen | --sile | --sil | --si | --s)
53783    ac_cs_silent=: ;;
53784
53785  # This is an error.
53786  -*) as_fn_error $? "unrecognized option: \`$1'
53787Try \`$0 --help' for more information." ;;
53788
53789  *) as_fn_append ac_config_targets " $1"
53790     ac_need_defaults=false ;;
53791
53792  esac
53793  shift
53794done
53795
53796ac_configure_extra_args=
53797
53798if $ac_cs_silent; then
53799  exec 6>/dev/null
53800  ac_configure_extra_args="$ac_configure_extra_args --silent"
53801fi
53802
53803_ACEOF
53804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53805if \$ac_cs_recheck; then
53806  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53807  shift
53808  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53809  CONFIG_SHELL='$SHELL'
53810  export CONFIG_SHELL
53811  exec "\$@"
53812fi
53813
53814_ACEOF
53815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53816exec 5>>config.log
53817{
53818  echo
53819  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53820## Running $as_me. ##
53821_ASBOX
53822  $as_echo "$ac_log"
53823} >&5
53824
53825_ACEOF
53826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53827_ACEOF
53828
53829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53830
53831# Handling of arguments.
53832for ac_config_target in $ac_config_targets
53833do
53834  case $ac_config_target in
53835    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53836    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53837    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53838    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53839    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53840
53841  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53842  esac
53843done
53844
53845
53846# If the user did not use the arguments to specify the items to instantiate,
53847# then the envvar interface is used.  Set only those that are not.
53848# We use the long form for the default assignment because of an extremely
53849# bizarre bug on SunOS 4.1.3.
53850if $ac_need_defaults; then
53851  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53852fi
53853
53854# Have a temporary directory for convenience.  Make it in the build tree
53855# simply because there is no reason against having it here, and in addition,
53856# creating and moving files from /tmp can sometimes cause problems.
53857# Hook for its removal unless debugging.
53858# Note that there is a small window in which the directory will not be cleaned:
53859# after its creation but before its name has been assigned to `$tmp'.
53860$debug ||
53861{
53862  tmp= ac_tmp=
53863  trap 'exit_status=$?
53864  : "${ac_tmp:=$tmp}"
53865  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
53866' 0
53867  trap 'as_fn_exit 1' 1 2 13 15
53868}
53869# Create a (secure) tmp directory for tmp files.
53870
53871{
53872  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
53873  test -d "$tmp"
53874}  ||
53875{
53876  tmp=./conf$$-$RANDOM
53877  (umask 077 && mkdir "$tmp")
53878} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
53879ac_tmp=$tmp
53880
53881# Set up the scripts for CONFIG_FILES section.
53882# No need to generate them if there are no CONFIG_FILES.
53883# This happens for instance with `./config.status config.h'.
53884if test -n "$CONFIG_FILES"; then
53885
53886
53887ac_cr=`echo X | tr X '\015'`
53888# On cygwin, bash can eat \r inside `` if the user requested igncr.
53889# But we know of no other shell where ac_cr would be empty at this
53890# point, so we can use a bashism as a fallback.
53891if test "x$ac_cr" = x; then
53892  eval ac_cr=\$\'\\r\'
53893fi
53894ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53895if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53896  ac_cs_awk_cr='\\r'
53897else
53898  ac_cs_awk_cr=$ac_cr
53899fi
53900
53901echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53902_ACEOF
53903
53904
53905{
53906  echo "cat >conf$$subs.awk <<_ACEOF" &&
53907  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53908  echo "_ACEOF"
53909} >conf$$subs.sh ||
53910  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53911ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53912ac_delim='%!_!# '
53913for ac_last_try in false false false false false :; do
53914  . ./conf$$subs.sh ||
53915    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53916
53917  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53918  if test $ac_delim_n = $ac_delim_num; then
53919    break
53920  elif $ac_last_try; then
53921    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53922  else
53923    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53924  fi
53925done
53926rm -f conf$$subs.sh
53927
53928cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53929cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53930_ACEOF
53931sed -n '
53932h
53933s/^/S["/; s/!.*/"]=/
53934p
53935g
53936s/^[^!]*!//
53937:repl
53938t repl
53939s/'"$ac_delim"'$//
53940t delim
53941:nl
53942h
53943s/\(.\{148\}\)..*/\1/
53944t more1
53945s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53946p
53947n
53948b repl
53949:more1
53950s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53951p
53952g
53953s/.\{148\}//
53954t nl
53955:delim
53956h
53957s/\(.\{148\}\)..*/\1/
53958t more2
53959s/["\\]/\\&/g; s/^/"/; s/$/"/
53960p
53961b
53962:more2
53963s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53964p
53965g
53966s/.\{148\}//
53967t delim
53968' <conf$$subs.awk | sed '
53969/^[^""]/{
53970  N
53971  s/\n//
53972}
53973' >>$CONFIG_STATUS || ac_write_fail=1
53974rm -f conf$$subs.awk
53975cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53976_ACAWK
53977cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53978  for (key in S) S_is_set[key] = 1
53979  FS = ""
53980
53981}
53982{
53983  line = $ 0
53984  nfields = split(line, field, "@")
53985  substed = 0
53986  len = length(field[1])
53987  for (i = 2; i < nfields; i++) {
53988    key = field[i]
53989    keylen = length(key)
53990    if (S_is_set[key]) {
53991      value = S[key]
53992      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53993      len += length(value) + length(field[++i])
53994      substed = 1
53995    } else
53996      len += 1 + keylen
53997  }
53998
53999  print line
54000}
54001
54002_ACAWK
54003_ACEOF
54004cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54005if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54006  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54007else
54008  cat
54009fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54010  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54011_ACEOF
54012
54013# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54014# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54015# trailing colons and then remove the whole line if VPATH becomes empty
54016# (actually we leave an empty line to preserve line numbers).
54017if test "x$srcdir" = x.; then
54018  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54019h
54020s///
54021s/^/:/
54022s/[	 ]*$/:/
54023s/:\$(srcdir):/:/g
54024s/:\${srcdir}:/:/g
54025s/:@srcdir@:/:/g
54026s/^:*//
54027s/:*$//
54028x
54029s/\(=[	 ]*\).*/\1/
54030G
54031s/\n//
54032s/^[^=]*=[	 ]*$//
54033}'
54034fi
54035
54036cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54037fi # test -n "$CONFIG_FILES"
54038
54039
54040eval set X "  :F $CONFIG_FILES      "
54041shift
54042for ac_tag
54043do
54044  case $ac_tag in
54045  :[FHLC]) ac_mode=$ac_tag; continue;;
54046  esac
54047  case $ac_mode$ac_tag in
54048  :[FHL]*:*);;
54049  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54050  :[FH]-) ac_tag=-:-;;
54051  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54052  esac
54053  ac_save_IFS=$IFS
54054  IFS=:
54055  set x $ac_tag
54056  IFS=$ac_save_IFS
54057  shift
54058  ac_file=$1
54059  shift
54060
54061  case $ac_mode in
54062  :L) ac_source=$1;;
54063  :[FH])
54064    ac_file_inputs=
54065    for ac_f
54066    do
54067      case $ac_f in
54068      -) ac_f="$ac_tmp/stdin";;
54069      *) # Look for the file first in the build tree, then in the source tree
54070	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54071	 # because $ac_f cannot contain `:'.
54072	 test -f "$ac_f" ||
54073	   case $ac_f in
54074	   [\\/$]*) false;;
54075	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54076	   esac ||
54077	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54078      esac
54079      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54080      as_fn_append ac_file_inputs " '$ac_f'"
54081    done
54082
54083    # Let's still pretend it is `configure' which instantiates (i.e., don't
54084    # use $as_me), people would be surprised to read:
54085    #    /* config.h.  Generated by config.status.  */
54086    configure_input='Generated from '`
54087	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54088	`' by configure.'
54089    if test x"$ac_file" != x-; then
54090      configure_input="$ac_file.  $configure_input"
54091      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54092$as_echo "$as_me: creating $ac_file" >&6;}
54093    fi
54094    # Neutralize special characters interpreted by sed in replacement strings.
54095    case $configure_input in #(
54096    *\&* | *\|* | *\\* )
54097       ac_sed_conf_input=`$as_echo "$configure_input" |
54098       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54099    *) ac_sed_conf_input=$configure_input;;
54100    esac
54101
54102    case $ac_tag in
54103    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54104      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54105    esac
54106    ;;
54107  esac
54108
54109  ac_dir=`$as_dirname -- "$ac_file" ||
54110$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54111	 X"$ac_file" : 'X\(//\)[^/]' \| \
54112	 X"$ac_file" : 'X\(//\)$' \| \
54113	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54114$as_echo X"$ac_file" |
54115    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54116	    s//\1/
54117	    q
54118	  }
54119	  /^X\(\/\/\)[^/].*/{
54120	    s//\1/
54121	    q
54122	  }
54123	  /^X\(\/\/\)$/{
54124	    s//\1/
54125	    q
54126	  }
54127	  /^X\(\/\).*/{
54128	    s//\1/
54129	    q
54130	  }
54131	  s/.*/./; q'`
54132  as_dir="$ac_dir"; as_fn_mkdir_p
54133  ac_builddir=.
54134
54135case "$ac_dir" in
54136.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54137*)
54138  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54139  # A ".." for each directory in $ac_dir_suffix.
54140  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54141  case $ac_top_builddir_sub in
54142  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54143  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54144  esac ;;
54145esac
54146ac_abs_top_builddir=$ac_pwd
54147ac_abs_builddir=$ac_pwd$ac_dir_suffix
54148# for backward compatibility:
54149ac_top_builddir=$ac_top_build_prefix
54150
54151case $srcdir in
54152  .)  # We are building in place.
54153    ac_srcdir=.
54154    ac_top_srcdir=$ac_top_builddir_sub
54155    ac_abs_top_srcdir=$ac_pwd ;;
54156  [\\/]* | ?:[\\/]* )  # Absolute name.
54157    ac_srcdir=$srcdir$ac_dir_suffix;
54158    ac_top_srcdir=$srcdir
54159    ac_abs_top_srcdir=$srcdir ;;
54160  *) # Relative name.
54161    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54162    ac_top_srcdir=$ac_top_build_prefix$srcdir
54163    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54164esac
54165ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54166
54167
54168  case $ac_mode in
54169  :F)
54170  #
54171  # CONFIG_FILE
54172  #
54173
54174_ACEOF
54175
54176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54177# If the template does not know about datarootdir, expand it.
54178# FIXME: This hack should be removed a few years after 2.60.
54179ac_datarootdir_hack=; ac_datarootdir_seen=
54180ac_sed_dataroot='
54181/datarootdir/ {
54182  p
54183  q
54184}
54185/@datadir@/p
54186/@docdir@/p
54187/@infodir@/p
54188/@localedir@/p
54189/@mandir@/p'
54190case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54191*datarootdir*) ac_datarootdir_seen=yes;;
54192*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54193  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54194$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54195_ACEOF
54196cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54197  ac_datarootdir_hack='
54198  s&@datadir@&$datadir&g
54199  s&@docdir@&$docdir&g
54200  s&@infodir@&$infodir&g
54201  s&@localedir@&$localedir&g
54202  s&@mandir@&$mandir&g
54203  s&\\\${datarootdir}&$datarootdir&g' ;;
54204esac
54205_ACEOF
54206
54207# Neutralize VPATH when `$srcdir' = `.'.
54208# Shell code in configure.ac might set extrasub.
54209# FIXME: do we really want to maintain this feature?
54210cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54211ac_sed_extra="$ac_vpsub
54212$extrasub
54213_ACEOF
54214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54215:t
54216/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54217s|@configure_input@|$ac_sed_conf_input|;t t
54218s&@top_builddir@&$ac_top_builddir_sub&;t t
54219s&@top_build_prefix@&$ac_top_build_prefix&;t t
54220s&@srcdir@&$ac_srcdir&;t t
54221s&@abs_srcdir@&$ac_abs_srcdir&;t t
54222s&@top_srcdir@&$ac_top_srcdir&;t t
54223s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54224s&@builddir@&$ac_builddir&;t t
54225s&@abs_builddir@&$ac_abs_builddir&;t t
54226s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54227$ac_datarootdir_hack
54228"
54229eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54230  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54231
54232test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54233  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54234  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54235      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54236  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54237which seems to be undefined.  Please make sure it is defined" >&5
54238$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54239which seems to be undefined.  Please make sure it is defined" >&2;}
54240
54241  rm -f "$ac_tmp/stdin"
54242  case $ac_file in
54243  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54244  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54245  esac \
54246  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54247 ;;
54248
54249
54250
54251  esac
54252
54253done # for ac_tag
54254
54255
54256as_fn_exit 0
54257_ACEOF
54258ac_clean_files=$ac_clean_files_save
54259
54260test $ac_write_fail = 0 ||
54261  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54262
54263
54264# configure is writing to config.log, and then calls config.status.
54265# config.status does its own redirection, appending to config.log.
54266# Unfortunately, on DOS this fails, as config.log is still kept open
54267# by configure, so config.status won't be able to write to it; its
54268# output is simply discarded.  So we exec the FD to /dev/null,
54269# effectively closing config.log, so it can be properly (re)opened and
54270# appended to by config.status.  When coming back to configure, we
54271# need to make the FD available again.
54272if test "$no_create" != yes; then
54273  ac_cs_success=:
54274  ac_config_status_args=
54275  test "$silent" = yes &&
54276    ac_config_status_args="$ac_config_status_args --quiet"
54277  exec 5>/dev/null
54278  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54279  exec 5>>config.log
54280  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54281  # would make configure fail if this is the last instruction.
54282  $ac_cs_success || as_fn_exit 1
54283fi
54284if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54285  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54286$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54287fi
54288
54289
54290# After AC_OUTPUT, we need to do final work
54291
54292
54293  # Try to move config.log (generated by autoconf) to the configure-support directory.
54294  if test -e ./config.log; then
54295    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54296  fi
54297
54298  # Rotate our log file (configure.log)
54299  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54300    $RM -f "$OUTPUT_ROOT/configure.log.old"
54301  fi
54302  if test -e "$OUTPUT_ROOT/configure.log"; then
54303    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54304  fi
54305
54306  # Move configure.log from current directory to the build output root
54307  if test -e ./configure.log; then
54308    echo found it
54309    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54310  fi
54311
54312  # Make the compare script executable
54313  $CHMOD +x $OUTPUT_ROOT/compare.sh
54314
54315
54316# Finally output some useful information to the user
54317
54318  # Finally output some useful information to the user
54319
54320  printf "\n"
54321  printf "====================================================\n"
54322  if test "x$no_create" != "xyes"; then
54323    if test "x$IS_RECONFIGURE" != "xyes"; then
54324      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54325    else
54326      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54327    fi
54328  else
54329    if test "x$IS_RECONFIGURE" != "xyes"; then
54330      printf "A configuration has been successfully checked but not created\n"
54331    else
54332      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54333    fi
54334  fi
54335  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54336    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54337  else
54338    printf "using default settings.\n"
54339  fi
54340
54341  printf "\n"
54342  printf "Configuration summary:\n"
54343  printf "* Debug level:    $DEBUG_LEVEL\n"
54344  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54345  printf "* JDK variant:    $JDK_VARIANT\n"
54346  printf "* JVM variants:   $with_jvm_variants\n"
54347  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54348
54349  printf "\n"
54350  printf "Tools summary:\n"
54351  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54352    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54353  fi
54354  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54355  if test "x$TOOLCHAIN_VERSION" != "x"; then
54356    print_version=" $TOOLCHAIN_VERSION"
54357  fi
54358  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54359  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54360  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54361
54362  printf "\n"
54363  printf "Build performance summary:\n"
54364  printf "* Cores to use:   $JOBS\n"
54365  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54366  if test "x$CCACHE_STATUS" != "x"; then
54367    printf "* ccache status:  $CCACHE_STATUS\n"
54368  fi
54369  printf "\n"
54370
54371  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54372    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54373    printf "will result in longer build times.\n"
54374    printf "\n"
54375  fi
54376
54377  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54378    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54379    printf "These are not respected, and will be ignored. It is recommended\n"
54380    printf "that you clean your environment. The following variables are set:\n"
54381    printf "$FOUND_ALT_VARIABLES\n"
54382    printf "\n"
54383  fi
54384
54385  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54386    printf "WARNING: Your build output directory is not on a local disk.\n"
54387    printf "This will severely degrade build performance!\n"
54388    printf "It is recommended that you create an output directory on a local disk,\n"
54389    printf "and run the configure script again from that directory.\n"
54390    printf "\n"
54391  fi
54392
54393  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54394    printf "WARNING: The result of this configuration has overridden an older\n"
54395    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54396    printf "proper build. Failure to do so might result in strange build problems.\n"
54397    printf "\n"
54398  fi
54399
54400  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54401    printf "WARNING: The result of this configuration was not saved.\n"
54402    printf "You should run without '--no-create | -n' to create the configuration.\n"
54403    printf "\n"
54404  fi
54405
54406
54407
54408  # Locate config.log.
54409  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54410    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54411  elif test -e "./config.log"; then
54412    CONFIG_LOG_PATH="."
54413  fi
54414
54415  if test -e "$CONFIG_LOG_PATH/config.log"; then
54416    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54417    if test $? -eq 0; then
54418      printf "The following warnings were produced. Repeated here for convenience:\n"
54419      # We must quote sed expression (using []) to stop m4 from eating the [].
54420      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54421      printf "\n"
54422    fi
54423  fi
54424
54425